Unassign Conversation

Remove an agent or a team from a conversation. Supply its conversation_id in the path and either agent_id or user_group_id in the JSON body, not both. Other agents and teams on the conversation are not changed.

Unassigning an agent or team that is currently assigned also removes a Chatway AI assistant from the conversation. Unassigning an agent or team that is not assigned succeeds without changes and returns changed: false, so it is safe to retry.

Returns 200 OK with the resulting assignment.

POST https://developers.chatway.app/api/v1/conversations/{conversation_id}/unassign

Example request

curl -X POST "https://developers.chatway.app/api/v1/conversations/0f46c0a1-8938-40e3-b2b5-bb56f569fcab/unassign" \
  -H "X-API-KEY: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_id": "26fa75f2-7ac1-47b4-84e1-b943491ba4da"
}'

Parameters

NameInRequiredTypeDescription
conversation_idpathYesstringConversation ID Example: 0f46c0a1-8938-40e3-b2b5-bb56f569fcab

Request body

application/json

Responses

200

application/json

422

404

Conversation not found

application/json

409

Another change to this conversation is in progress. Retry the request.

application/json

429

Conversation action limit reached. Each account can assign or unassign up to 30 conversations per minute, shared with its MCP connections. Wait for the number of seconds in the Retry-After header before retrying.

application/json

Examples

Request body example

{
    "agent_id": "26fa75f2-7ac1-47b4-84e1-b943491ba4da"
}

Response 200 example

{
    "message": "Conversation unassigned.",
    "data": {
        "conversation_id": "0f46c0a1-8938-40e3-b2b5-bb56f569fcab",
        "agent_id": "26fa75f2-7ac1-47b4-84e1-b943491ba4da",
        "user_group_id": null,
        "is_assigned": false,
        "changed": true
    }
}