Skip to content

Endpoints

API channel (AI chat)

Run your AI agent from your own app or website. Turn the channel on under Channels → API first. These routes take an API key only.

Paths are relative to the base URL. Each card lists the permission the call needs and every parameter, with its type and limits.

POST
/messages

Send a customer message to the AI agent. The agent replies a little later, like in a real DM: to the callback URL set under Channels → API, or poll GET /conversations/:id/messages.

API key only
Legacy response format

JSON body

  • messagerequiredstring

    The customer's message.

  • conversationIdoptionalinteger

    Continue an API-channel conversation. Omit to start a new one.

  • messageIdoptionalstring

    Your ID for this message, used to ignore duplicates.

  • externalUserIdoptionalstring

    Your ID for the customer.

  • externalUsernameoptionalstring

    The customer's username in your app.

  • externalFirstNameoptionalstring

    The customer's first name.

  • externalChatIdoptionalstring

    Your chat or thread ID.

  • Answers 202 { conversationId, status: "buffering", delivery: "callback" | "polling" }.
  • 403 when the API channel is not enabled under Channels → API.
POST
/chat

Synchronous one-shot chat: send a message and wait for the AI reply. Answers { conversationId, response, messages }.

API key only
Legacy response format

JSON body

  • messagerequiredstring

    The customer's message.

  • conversationIdoptionalinteger

    Continue a conversation.

  • externalUserIdoptionalstring

    Your ID for the customer.

  • externalUsernameoptionalstring

    The customer's username in your app.

  • externalFirstNameoptionalstring

    The customer's first name.

  • externalChatIdoptionalstring

    Your chat or thread ID.

GET
/agents

Returns the workspace's agent as [{ id, systemPrompt }], or [] before setup.

API key only
Legacy response format