The Zyeta API is organized around REST principles, using standard HTTP verbs, returning JSON responses, and using standard HTTP status codes to indicate errors.

Base URL

All API requests should be made to the following base URL:

https://api.zyeta.io

For local development, the base URL is:

http://localhost:8000

Authentication

All API endpoints require authentication. See the Authentication Guide for details on how to authenticate your requests.

Response Format

Responses are returned in JSON format. Successful responses typically include:

{
  "status": "success",
  "data": {
    // Response data here
  }
}

Error responses follow a consistent structure:

{
  "status": "error",
  "error": {
    "code": "ERROR_CODE",
    "message": "Human-readable error message",
    "details": {} // Optional additional details
  }
}

HTTP Status Codes

The API uses standard HTTP status codes to indicate the success or failure of a request:

CodeDescription
200OK - The request was successful
201Created - A new resource was successfully created
400Bad Request - The request was invalid
401Unauthorized - Authentication failed or not provided
403Forbidden - The authenticated user doesn’t have permission
404Not Found - The requested resource doesn’t exist
422Unprocessable Entity - Validation error
429Too Many Requests - Rate limit exceeded
500Internal Server Error - Something went wrong on the server

Rate Limiting

API requests are subject to rate limiting to ensure stability and fair usage. The current limits are:

  • 100 requests per minute per IP address
  • 1000 requests per hour per authenticated user

Rate limit headers are included in all API responses:

X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1620000000

Pagination

For endpoints that return lists of items, the API uses cursor-based pagination. Parameters:

  • limit: Number of items to return (default: 20, max: 100)
  • cursor: Cursor for pagination (obtained from previous responses)

Paginated responses include:

{
  "status": "success",
  "data": [
    // Items here
  ],
  "pagination": {
    "next_cursor": "next_page_cursor",
    "has_more": true
  }
}

API Endpoints

The Zyeta API is organized into the following categories:

OpenAPI Specification

The complete OpenAPI specification for the Zyeta API is available at:

https://api.zyeta.io/openapi.json

You can also explore the API interactively using Swagger UI:

https://api.zyeta.io/docs

Client Libraries

Official client libraries for the Zyeta API:

Webhooks

Zyeta supports webhooks for real-time notifications about events in your account. See the Webhooks Guide for details.