API Reference

Complete API documentation for OpenClaw gateway and services

⚡ Quick Start

Base URL

https://your-domain.com/api

Authentication

Most endpoints require an API key or valid session. Include the header:

Authorization: Bearer YOUR_API_KEY

Response Format

All API responses follow a consistent JSON format with success and data fields.

Core API

MethodEndpointDescription
GET/api/trackTrack clicks and get affiliate statistics
POST/api/trackReport conversions and track affiliate sales
GET/api/docsFetch all available documentation
GET/api/docs/[slug]Get specific documentation by slug

Configuration API

MethodEndpointDescription
GET/api/configGet current configuration
POST/api/configUpdate gateway configuration
DELETE/api/config/cacheClear configuration cache

Channels API

MethodEndpointDescription
POST/api/channels/webhookHandle webhook events from channels
GET/api/channels/statusCheck channel connection status
POST/api/channels/sendSend messages through connected channels

Skills API

MethodEndpointDescription
GET/api/skillsList all loaded AI skills
POST/api/skills/loadLoad a skill from file or URL
POST/api/skills/unloadUnload a skill
POST/api/skills/executeExecute a skill with parameters

📝 Response Formats

JSON

Standard JSON response with success flag

{"success": true, "data": {...}}

JSONP

JSON with Padding for cross-domain requests

callback({"success": true})

Error

Standardized error response format

{"success": false, "error": "Error message"}

📊 HTTP Status Codes

200 OK

Request successful

201 Created

Resource created successfully

400 Bad Request

Invalid request parameters

401 Unauthorized

Missing or invalid authentication

404 Not Found

Resource not found

500 Server Error

Internal server error

🚀 Start Building

Ready to integrate with OpenClaw? Check out our getting started guide.

Getting Started Guide