SYS: OPERATIONALUPTIME: 99.8%

API REFERENCE

API Overview

The YourAutomation API is a RESTful service that allows you to create, manage, and execute AI agents programmatically. All requests use JSON and require authentication via API key.

Base URL

https://api.yourautomation.ai/v1

All API paths in this documentation are relative to this base URL.

Authentication

Include your API key in the Authorization header of every request:

Authorization header
Authorization: Bearer ya_live_sk_your_api_key_here

Request Format

All request bodies must be JSON with the appropriate content type:

Headers
Content-Type: application/json Authorization: Bearer ya_live_sk_...

Pagination

List endpoints return paginated results using cursor-based pagination:

Pagination parameters
GET /v1/agents?limit=20&after=agt_abc123 // Response { "data": [...], "hasMore": true, "nextCursor": "agt_def456" }
ParameterDefaultDescription
limit20Number of items per page (1-100)
afterCursor for the next page (from nextCursor)
beforeCursor for the previous page

Rate Limiting

Rate limit information is included in response headers:

Rate limit headers
X-RateLimit-Limit: 300 X-RateLimit-Remaining: 287 X-RateLimit-Reset: 1710547200

When rate limited, you receive a 429 status with a Retry-After header.

Error Format

All errors return a consistent JSON structure:

Error response
{ "error": { "type": "invalid_request_error", "code": "missing_required_field", "message": "The 'model' field is required when creating an agent", "param": "model", "requestId": "req_abc123def456" } }

Note

Always include the requestId when contacting support about an error. It helps us trace the exact request.

All Endpoints

MethodEndpointDescription
POST/v1/agentsCreate a new agent
GET/v1/agentsList all agents
GET/v1/agents/:idRetrieve an agent
PATCH/v1/agents/:idUpdate an agent
DELETE/v1/agents/:idDelete an agent
POST/v1/agents/:id/executeExecute an agent
GET/v1/executionsList executions
GET/v1/executions/:idRetrieve execution
POST/v1/executions/:id/cancelCancel execution
GET/v1/conversations/:idGet conversation
DELETE/v1/conversations/:idDelete conversation
POST/v1/keysCreate API key
GET/v1/keysList API keys
DELETE/v1/keys/:idRevoke API key
POST/v1/webhooksCreate webhook
GET/v1/webhooksList webhooks
PATCH/v1/webhooks/:idUpdate webhook
DELETE/v1/webhooks/:idDelete webhook