Skip to main content
POST
/
ai
/
chats
Create chat
curl --request POST \
  --url https://api.getcargo.io/v1/ai/chats \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "trigger": {
    "type": "<string>",
    "connectorUuid": "<string>",
    "meta": {}
  },
  "name": "<string>",
  "agentUuid": "<string>",
  "releaseUuid": "<string>"
}
'
{
  "chat": {
    "uuid": "<string>",
    "slug": "<string>",
    "workspaceUuid": "<string>",
    "userUuid": "<string>",
    "agentUuid": "<string>",
    "releaseUuid": "<string>",
    "name": "<string>",
    "trigger": "<unknown>",
    "activeStreamUuid": "<string>",
    "creditsUsedCount": 123,
    "createdAt": "<string>",
    "updatedAt": "<string>",
    "deletedAt": "<string>",
    "lastMessage": {
      "uuid": "<string>",
      "workspaceUuid": "<string>",
      "agentUuid": "<string>",
      "releaseUuid": "<string>",
      "chatUuid": "<string>",
      "userUuid": "<string>",
      "status": "pending",
      "errorMessage": "<string>",
      "type": "user",
      "createdAt": "<string>",
      "updatedAt": "<string>",
      "finishedAt": "<string>",
      "deletedAt": "<string>"
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request body schema.

trigger
Trigger · object
required

Trigger configuration for the chat.

name
string

Chat name.

agentUuid
string

Agent identifier for the chat.

releaseUuid
string

Release identifier for the chat.

Response

Successful response

chat
Chat · object
required

Created chat details.