Skip to main content
POST
/
ai
/
messages
Create message
curl --request POST \
  --url https://api.getcargo.io/v1/ai/messages \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "chatUuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "parts": [
    "<unknown>"
  ],
  "tools": [
    {
      "name": "<string>",
      "slug": "<string>",
      "description": "<string>",
      "isBulkAllowed": true,
      "config": {},
      "kind": "<string>",
      "toolUuid": "<string>",
      "templateSlug": "<string>"
    }
  ],
  "resources": [
    {
      "kind": "<string>",
      "name": "<string>",
      "slug": "<string>",
      "description": "<string>",
      "integrationSlug": "<string>",
      "modelUuid": "<string>",
      "filter": {
        "conjonction": "or",
        "groups": [
          "<unknown>"
        ]
      },
      "selectedColumnSlugs": [
        "<string>"
      ],
      "limit": 123,
      "prompt": "<string>"
    }
  ],
  "capabilities": [
    {
      "slug": "<string>"
    }
  ],
  "mcpClients": [
    {
      "name": "<string>",
      "url": "<string>",
      "authentication": {
        "issuedAt": "<string>",
        "accessToken": "<string>",
        "expiresIn": 123,
        "refreshToken": "<string>",
        "scope": "<string>",
        "tokenType": "<string>",
        "clientId": "<string>"
      },
      "disabledToolSlugs": [
        "<string>"
      ]
    }
  ],
  "skillUuids": [
    "<string>"
  ],
  "systemPrompt": "<string>",
  "withReasoning": true,
  "temperature": 123,
  "maxSteps": 123,
  "integrationSlug": "<string>",
  "connectorUuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "languageModelSlug": "<string>"
}
'
{
  "userMessage": {
    "uuid": "<string>",
    "workspaceUuid": "<string>",
    "agentUuid": "<string>",
    "releaseUuid": "<string>",
    "chatUuid": "<string>",
    "userUuid": "<string>",
    "status": "pending",
    "errorMessage": "<string>",
    "type": "user",
    "parts": [
      "<unknown>"
    ],
    "tools": [
      {
        "name": "<string>",
        "slug": "<string>",
        "description": "<string>",
        "isBulkAllowed": true,
        "config": {},
        "kind": "<string>",
        "toolUuid": "<string>",
        "templateSlug": "<string>"
      }
    ],
    "resources": [
      {
        "kind": "<string>",
        "name": "<string>",
        "slug": "<string>",
        "description": "<string>",
        "integrationSlug": "<string>",
        "modelUuid": "<string>",
        "filter": {
          "conjonction": "or",
          "groups": [
            "<unknown>"
          ]
        },
        "selectedColumnSlugs": [
          "<string>"
        ],
        "limit": 123,
        "prompt": "<string>"
      }
    ],
    "capabilities": [
      {
        "slug": "<string>"
      }
    ],
    "mcpClients": [
      {
        "name": "<string>",
        "url": "<string>",
        "authentication": {
          "issuedAt": "<string>",
          "accessToken": "<string>",
          "expiresIn": 123,
          "refreshToken": "<string>",
          "scope": "<string>",
          "tokenType": "<string>",
          "clientId": "<string>"
        },
        "disabledToolSlugs": [
          "<string>"
        ]
      }
    ],
    "skillUuids": [
      "<string>"
    ],
    "systemPrompt": "<string>",
    "withReasoning": true,
    "temperature": 123,
    "maxSteps": 123,
    "integrationSlug": "<string>",
    "connectorUuid": "<string>",
    "languageModelSlug": "<string>",
    "evaluatedTools": {},
    "usage": {
      "tokensUsedCount": 123,
      "creditsUsedCount": 123,
      "languageModelSlug": "<string>",
      "connectorUuid": "<string>"
    },
    "output": "<unknown>",
    "meta": {},
    "suggestedActions": [
      {
        "text": "<string>",
        "tools": [
          {
            "slug": "<string>"
          }
        ]
      }
    ],
    "temporalWorkflowId": "<string>",
    "createdAt": "<string>",
    "updatedAt": "<string>",
    "finishedAt": "<string>",
    "deletedAt": "<string>"
  },
  "assistantMessage": {
    "uuid": "<string>",
    "workspaceUuid": "<string>",
    "agentUuid": "<string>",
    "releaseUuid": "<string>",
    "chatUuid": "<string>",
    "userUuid": "<string>",
    "status": "pending",
    "errorMessage": "<string>",
    "type": "user",
    "parts": [
      "<unknown>"
    ],
    "tools": [
      {
        "name": "<string>",
        "slug": "<string>",
        "description": "<string>",
        "isBulkAllowed": true,
        "config": {},
        "kind": "<string>",
        "toolUuid": "<string>",
        "templateSlug": "<string>"
      }
    ],
    "resources": [
      {
        "kind": "<string>",
        "name": "<string>",
        "slug": "<string>",
        "description": "<string>",
        "integrationSlug": "<string>",
        "modelUuid": "<string>",
        "filter": {
          "conjonction": "or",
          "groups": [
            "<unknown>"
          ]
        },
        "selectedColumnSlugs": [
          "<string>"
        ],
        "limit": 123,
        "prompt": "<string>"
      }
    ],
    "capabilities": [
      {
        "slug": "<string>"
      }
    ],
    "mcpClients": [
      {
        "name": "<string>",
        "url": "<string>",
        "authentication": {
          "issuedAt": "<string>",
          "accessToken": "<string>",
          "expiresIn": 123,
          "refreshToken": "<string>",
          "scope": "<string>",
          "tokenType": "<string>",
          "clientId": "<string>"
        },
        "disabledToolSlugs": [
          "<string>"
        ]
      }
    ],
    "skillUuids": [
      "<string>"
    ],
    "systemPrompt": "<string>",
    "withReasoning": true,
    "temperature": 123,
    "maxSteps": 123,
    "integrationSlug": "<string>",
    "connectorUuid": "<string>",
    "languageModelSlug": "<string>",
    "evaluatedTools": {},
    "usage": {
      "tokensUsedCount": 123,
      "creditsUsedCount": 123,
      "languageModelSlug": "<string>",
      "connectorUuid": "<string>"
    },
    "output": "<unknown>",
    "meta": {},
    "suggestedActions": [
      {
        "text": "<string>",
        "tools": [
          {
            "slug": "<string>"
          }
        ]
      }
    ],
    "temporalWorkflowId": "<string>",
    "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.

chatUuid
string<uuid>
required

Chat identifier.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$
parts
any[]
required

Message parts.

tools
Tools · object[]

Tools available for the message.

resources
Resources · object[]

Resources available for the message.

capabilities
Capabilities · object[]

Capabilities available for the message.

mcpClients
MCP clients · object[]

MCP clients to use for the message.

skillUuids
string[]

UUIDs of skills to use for the message.

systemPrompt
string

System prompt for the message.

withReasoning
boolean

Whether to include reasoning.

temperature
number

Sampling temperature.

maxSteps
number

Maximum number of steps.

integrationSlug
string

Integration identifier.

connectorUuid
string<uuid>

Connector identifier.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$
languageModelSlug
string

Language model identifier.

Response

Successful response

userMessage
User message · object
required

The created user message.

assistantMessage
Assistant message · object
required

The created assistant message (initially pending while processing).