Deployments.ai Docs
Runtime

List thread messages

GET /v1/threads/{threadId}/messages · SDK listThreadMessages · CLI deployments thread messages, deployments message list

GET
/v1/threads/{threadId}/messages

Requires runs:read.

Authorization

headerAuthorizationBearer <token>

Opaque bearer credential scoped to one service account and tenant.

Path Parameters

threadId*string
Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$

Query Parameters

cursor?string

Opaque cursor returned by the previous page.

Length1 <= length <= 4096
limit?integer

Maximum number of resources to return.

Range1 <= value <= 100

Header Parameters

x-deployments-environment?string

Required with a platform bearer JWT, where the three tenant headers select an environment the caller can access through active organization membership. Optional with an API key; when supplied, it must match the key's tenant.

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
x-deployments-organization?string

Required with a platform bearer JWT, where the three tenant headers select an environment the caller can access through active organization membership. Optional with an API key; when supplied, it must match the key's tenant.

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
x-deployments-project?string

Required with a platform bearer JWT, where the three tenant headers select an environment the caller can access through active organization membership. Optional with an API key; when supplied, it must match the key's tenant.

Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$

Response Body

ListThreadMessagesResponse

application/json
  1. response
messages*array<>
nextCursor?|null
curl -X GET "https://example.com/v1/threads/string/messages"
{  "messages": [    {      "environmentId": "string",      "organizationId": "string",      "projectId": "string",      "agentDeploymentId": "string",      "body": "string",      "bodyAccess": {        "byteSize": 0,        "contentType": "string",        "expiresAt": "2019-08-24T14:15:22Z",        "sha256": "string",        "url": "string"      },      "contentHash": "string",      "createdAt": "2019-08-24T14:15:22Z",      "id": "string",      "inputArtifacts": [        "string"      ],      "inputOmissions": [        {          "name": "string",          "reason": "too_large"        }      ],      "metadata": {        "property1": null,        "property2": null      },      "object": "message",      "role": "assistant",      "runId": "string",      "sequence": 0,      "streamEventId": "string",      "threadId": "string",      "unlistedInputOmissions": 1    }  ],  "nextCursor": "string"}