Deployments.ai Docs
Runtime

Archive a conversation thread

POST /v1/threads/{threadId}/archive · SDK archiveThread · CLI deployments thread archive

POST
/v1/threads/{threadId}/archive

Requires runs:write.

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}$

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

ThreadResponse

application/json
  1. response
createdAt*string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
updatedAt*string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
version*number|||
environmentId*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
organizationId*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
projectId*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
workspaceId?string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
agentDeploymentId?string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
archived*boolean
channel*string
continuedFromThreadId?string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
createdBy*
executionBindingId?string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
executionPurpose*string
Value in"customer""evaluation""preview"
externalThreadKey?string
id*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
object*"thread"
Value in"thread"
pinned*boolean
pinnedAgentReleaseId?string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
streamId*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
title*string
curl -X POST "https://example.com/v1/threads/string/archive"
{  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "version": 0,  "environmentId": "string",  "organizationId": "string",  "projectId": "string",  "workspaceId": "string",  "agentDeploymentId": "string",  "archived": true,  "channel": "string",  "continuedFromThreadId": "string",  "createdBy": {    "id": "string",    "type": "agent"  },  "executionBindingId": "string",  "executionPurpose": "customer",  "externalThreadKey": "string",  "id": "string",  "object": "thread",  "pinned": true,  "pinnedAgentReleaseId": "string",  "streamId": "string",  "title": "string"}