Saltar al contenido principal
PUT
/
v1
/
thread
/
{threadId}
curl -X PUT "https://api.contactship.ai/v1/thread/thr-b2c3d4e5-f6a7-8901-bcde-f12345678901" \
  -H "x-api-key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"status": "closed"}'
{
  "id": "thr-b2c3d4e5-f6a7-8901-bcde-f12345678901",
  "channel_id": "chn_y0xspd9p1v7vla6wkwc2z01u",
  "channel_type": "WABA",
  "contact_id": "c1d2e3f4-a5b6-7890-cdef-123456789012",
  "organization_id": "org-f1e2d3c4-b5a6-7890-1234-567890abcdef",
  "status": "closed",
  "assignee": null,
  "assignee_type": null,
  "updated_at": "2026-04-06T16:00:00Z"
}
Updates properties of a conversation thread such as its status or assignee. Use this to close threads, reopen them, or reassign them between agents and users.

Headers

x-api-key
string
requerido
Your API key for authentication.

Path Parameters

threadId
string
requerido
The UUID of the thread to update.

Body

status
string
New status for the thread. Common values: open, closed.
assignee
string
UUID of the user or agent to assign the thread to. Pass null to unassign.
assignee_type
string
Type of assignee: user or agent. Required when setting assignee.

Response

Returns the updated thread object.

Error Codes

  • 400 Bad Request — Invalid fields
  • 401 Unauthorized — Invalid or missing API key
  • 404 Not Found — Thread not found
  • 500 Internal Server Error — Server-side error

Code Examples

curl -X PUT "https://api.contactship.ai/v1/thread/thr-b2c3d4e5-f6a7-8901-bcde-f12345678901" \
  -H "x-api-key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"status": "closed"}'
{
  "id": "thr-b2c3d4e5-f6a7-8901-bcde-f12345678901",
  "channel_id": "chn_y0xspd9p1v7vla6wkwc2z01u",
  "channel_type": "WABA",
  "contact_id": "c1d2e3f4-a5b6-7890-cdef-123456789012",
  "organization_id": "org-f1e2d3c4-b5a6-7890-1234-567890abcdef",
  "status": "closed",
  "assignee": null,
  "assignee_type": null,
  "updated_at": "2026-04-06T16:00:00Z"
}