API Reference
Complete reference for the ServoAgent REST and GraphQL APIs, backed by the same published OpenAPI spec served from the platform.
Base URL
https://api.servoagent.com/v1Use JSON request and response bodies, send a Bearer API key on every authenticated request, and include `X-Request-Id` when you need client-side traceability.
Authentication
Bearer API keys
Workspace-scoped keys with granular scopes and rotation support.
Spec format
OpenAPI 3.1
JSON and YAML specs are published from the same service used by the platform.
Live tooling
REST + GraphQL
Use the Explorer for live requests and generated snippets across supported SDKs.
Core resources
Every resource page includes scopes, request examples, and endpoint-level summaries.
Agents
Create, version, and execute agents. Agents are the core runtime unit for automation workflows.
/agentsList all agents in the workspace.
/agentsCreate a new agent draft.
/agents/{agentId}Fetch a single agent by ID.
/agents/{agentId}Update agent metadata and config.
/agents/{agentId}Delete an existing agent.
/agents/{agentId}/executeExecute the agent and create a run record.
Runs
Inspect runtime status, outputs, and step traces for every agent execution.
/runsList runs with status filtering.
/runs/{runId}Get a run with output payload.
/runs/{runId}/stepsRetrieve ordered execution steps for observability.
Contacts
Store and update contact records for CRM integrations and audience segmentation.
/contactsList contacts with paging and search.
/contactsCreate a new contact.
/contacts/{contactId}Fetch one contact record.
/contacts/{contactId}Update profile fields.
/contacts/{contactId}Delete a contact.
Webhooks
Subscribe to events, test deliveries, and rotate webhook secrets securely.
/webhooksList webhook endpoints.
/webhooksCreate a webhook endpoint.
/webhooks/{webhookId}/testTrigger a test event delivery.
/webhooks/{webhookId}/deliveriesReview delivery attempts and status.
/webhooks/{webhookId}/rotate-secretRotate endpoint signing secret.
/webhooks/{webhookId}Delete a webhook endpoint.
API Keys
Create, rotate, and revoke keys used by production integrations and background jobs.
/keysList workspace API keys.
/keysCreate a new scoped API key.
/keys/{keyId}Revoke an active API key.
/keys/{keyId}/rollRotate a key without changing client workflows.
GraphQL
Use the explorer and GraphQL endpoint for flexible read-heavy integrations and internal tooling.
/graphqlExecute GraphQL queries and mutations.
Request headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer token using a workspace API key. |
Content-Type | POST/PATCH | Use application/json for request bodies. |
X-Request-Id | Optional | Client-provided trace identifier for support and observability. |
Pagination shape
{
"data": [...],
"pagination": {
"total": 100,
"limit": 20,
"offset": 40,
"hasMore": true
}
}Error envelope
{
"error": {
"code": "invalid_request",
"message": "agentId is required",
"requestId": "req_01HXYZ..."
}
}