Skip to main content

REST API

Use the REST API to integrate your agent into any application — mobile apps, backends, custom frontends, or third-party services.

Authentication

Create an Agent API Key for server-to-server access:
Response:
[!WARNING] The api_key is only returned once upon creation. Store it securely.

Send a Message

POST /v1/agents/:agent_id/chat

Request Parameters

Response

Session Management

Sessions maintain conversation context across messages. Pass the same session_id to continue a conversation:
The agent remembers the full conversation within a session (based on the dashboard history retention).

Integration Examples

Node.js

Python

Error Handling

Best Practices

  • Reuse sessions for multi-turn conversations to preserve context
  • Store API keys securely — never expose them in client-side code (e.g. front-end React apps without a proxy)