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"}'
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 '{"assignee": "agent-a1b2c3d4-e5f6-7890-abcd-ef1234567890", "assignee_type": "agent"}'
const threadId = 'thr-b2c3d4e5-f6a7-8901-bcde-f12345678901';
const response = await fetch(
`https://api.contactship.ai/v1/thread/${threadId}`,
{
method: 'PUT',
headers: {
'x-api-key': 'your-api-key',
'Content-Type': 'application/json',
},
body: JSON.stringify({ status: 'closed' }),
}
);
const thread = await response.json();
import requests
thread_id = 'thr-b2c3d4e5-f6a7-8901-bcde-f12345678901'
response = requests.put(
f'https://api.contactship.ai/v1/thread/{thread_id}',
headers={'x-api-key': 'your-api-key'},
json={'status': 'closed'},
)
print(response.json())
{
"id": "thr-b2c3d4e5-f6a7-8901-bcde-f12345678901",
"channel_id": "chn_a1b2c3d4e5f6g7h8i9j0k1l2",
"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"
}
Canales y conversaciones
Update Thread
Update the status or assignee of a conversation thread
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"}'
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 '{"assignee": "agent-a1b2c3d4-e5f6-7890-abcd-ef1234567890", "assignee_type": "agent"}'
const threadId = 'thr-b2c3d4e5-f6a7-8901-bcde-f12345678901';
const response = await fetch(
`https://api.contactship.ai/v1/thread/${threadId}`,
{
method: 'PUT',
headers: {
'x-api-key': 'your-api-key',
'Content-Type': 'application/json',
},
body: JSON.stringify({ status: 'closed' }),
}
);
const thread = await response.json();
import requests
thread_id = 'thr-b2c3d4e5-f6a7-8901-bcde-f12345678901'
response = requests.put(
f'https://api.contactship.ai/v1/thread/{thread_id}',
headers={'x-api-key': 'your-api-key'},
json={'status': 'closed'},
)
print(response.json())
{
"id": "thr-b2c3d4e5-f6a7-8901-bcde-f12345678901",
"channel_id": "chn_a1b2c3d4e5f6g7h8i9j0k1l2",
"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
Path Parameters
Body
Response
Returns the updated thread object.Error Codes
400 Bad Request— Invalid fields401 Unauthorized— Invalid or missing API key404 Not Found— Thread not found500 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"}'
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 '{"assignee": "agent-a1b2c3d4-e5f6-7890-abcd-ef1234567890", "assignee_type": "agent"}'
const threadId = 'thr-b2c3d4e5-f6a7-8901-bcde-f12345678901';
const response = await fetch(
`https://api.contactship.ai/v1/thread/${threadId}`,
{
method: 'PUT',
headers: {
'x-api-key': 'your-api-key',
'Content-Type': 'application/json',
},
body: JSON.stringify({ status: 'closed' }),
}
);
const thread = await response.json();
import requests
thread_id = 'thr-b2c3d4e5-f6a7-8901-bcde-f12345678901'
response = requests.put(
f'https://api.contactship.ai/v1/thread/{thread_id}',
headers={'x-api-key': 'your-api-key'},
json={'status': 'closed'},
)
print(response.json())
{
"id": "thr-b2c3d4e5-f6a7-8901-bcde-f12345678901",
"channel_id": "chn_a1b2c3d4e5f6g7h8i9j0k1l2",
"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"
}
