API Reference
The Kesk API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes and authentication.
Base URL
All API requests should be made to:
https://api.kesk.app/v1Authentication
The Kesk API uses OAuth 2.0 for authentication. Include your access token in the Authorization header:
Authorization: Bearer YOUR_ACCESS_TOKENSee Authentication for details on obtaining tokens.
Request Format
All POST and PUT requests should include:
Content-Type: application/jsonResponse Format
All responses are returned in JSON format:
{
"success": true,
"data": { ... },
"meta": {
"page": 1,
"per_page": 20,
"total": 100
}
}Error Handling
Errors are returned with appropriate HTTP status codes and a JSON body:
{
"success": false,
"error": {
"code": "invalid_request",
"message": "The request was invalid",
"details": [
{
"field": "email",
"message": "Email is required"
}
]
}
}HTTP Status Codes
| Code | Description |
|---|---|
| 200 | Success |
| 201 | Created |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 429 | Rate Limited |
| 500 | Server Error |
Rate Limiting
API requests are limited to:
- Test mode: 100 requests per minute
- Production: 1,000 requests per minute
Rate limit information is included in response headers:
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1640000000Pagination
List endpoints support pagination:
GET /v1/orders?page=2&per_page=50Filtering
Most list endpoints support filtering:
GET /v1/orders?status=pending&created_after=2024-01-01