Skip to main content
All agent endpoints require authentication via Bearer token.

List agents

Retrieve all agents for the authenticated user.

Headers

string
required
Bearer token for authentication. Format: Bearer <jwt>

Response

Returns an array of agent objects.
object[]

Status codes

  • 200 - Agents retrieved successfully
  • 401 - Unauthorized (missing or invalid token)
  • 500 - Internal server error

Create agent

Create a new agent with an API key and service permissions.
The full API key is only shown once during creation. Store it securely.

Headers

string
required
Bearer token for authentication. Format: Bearer <jwt>

Request body

string
required
Agent name (3-100 characters).
number[]
required
Array of service IDs this agent can access. Must contain at least one valid service ID owned by the user.

Response

object
string
Full API key. Only returned during creation. Store securely.

Status codes

  • 201 - Agent created successfully
  • 400 - Validation error (invalid request body)
  • 401 - Unauthorized (missing or invalid token)
  • 404 - One or more service IDs not found
  • 500 - Internal server error

Get agent

Retrieve a single agent by ID. Ownership is verified.

Headers

string
required
Bearer token for authentication. Format: Bearer <jwt>

Path parameters

number
required
Agent ID.

Response

number
Unique agent identifier.
number
Owner user ID.
string
Agent name.
string
First 12 characters of the API key.
boolean
Whether the agent is active.
string
ISO 8601 timestamp of last API request.
object[]
Array of services this agent can access.
string
ISO 8601 timestamp of agent creation.
string
ISO 8601 timestamp of last update.

Status codes

  • 200 - Agent retrieved successfully
  • 400 - Invalid agent ID
  • 401 - Unauthorized (missing or invalid token)
  • 404 - Agent not found
  • 500 - Internal server error

Update agent

Update agent details (name or active status).

Headers

string
required
Bearer token for authentication. Format: Bearer <jwt>

Path parameters

number
required
Agent ID.

Request body

string
Agent name (3-100 characters). Optional.
boolean
Whether the agent is active. Set to false to revoke access. Optional.
At least one field must be provided for update.

Response

Returns the updated agent object.

Status codes

  • 200 - Agent updated successfully
  • 400 - Validation error (invalid agent ID or request body)
  • 401 - Unauthorized (missing or invalid token)
  • 404 - Agent not found
  • 500 - Internal server error

Delete agent

Delete an agent. This cascades to delete all agent-service associations.
This action is irreversible. The agent’s API key will be permanently revoked.

Headers

string
required
Bearer token for authentication. Format: Bearer <jwt>

Path parameters

number
required
Agent ID.

Response

string
Success message confirming deletion.

Status codes

  • 200 - Agent deleted successfully
  • 400 - Invalid agent ID
  • 401 - Unauthorized (missing or invalid token)
  • 404 - Agent not found
  • 500 - Internal server error

Update agent services

Update the services an agent can access. This replaces all existing service associations.
This replaces ALL service associations. Any services not included will be removed from the agent’s access.

Headers

string
required
Bearer token for authentication. Format: Bearer <jwt>

Path parameters

number
required
Agent ID.

Request body

number[]
required
Array of service IDs this agent can access. Must contain at least one valid service ID owned by the user.

Response

string
Success message confirming service update.
object[]
Array of services this agent can now access.

Status codes

  • 200 - Agent services updated successfully
  • 400 - Validation error (invalid agent ID or request body)
  • 401 - Unauthorized (missing or invalid token)
  • 404 - Agent or one or more services not found
  • 500 - Internal server error