Assign & Unassign Conversation

Route a conversation to the person or queue that should answer it. An assignment sets both an agent and a team on the conversation, pushes it into that agent’s inbox live, notifies them, and appends an entry to the assignment history.

Assign Conversation

POST/v2.0/conversations/assign

Body Parameters

ParameterTypeDescription
conversationIdstringTarget conversation id. Required unless phone is given
phonestringCustomer identifier — WhatsApp number without +, or the Instagram / Messenger sender id
channelstringwhatsapp | instagram | messengerDefault: whatsapp
businessNumberstringYour business number or platform id. Defaults to the org's only active WhatsApp sender
agentIdstringAgent to assign. Required unless teamId is given
teamIdstringTeam to assign. Required unless agentId is given

Choosing the assignee

A conversation always ends up with both an agent and a team. Send whichever you know and Sendiee resolves the other side:

You sendWhat happens
agentId + teamIdAssigned exactly as given. The agent must be a member of that team.
teamId onlyThe next agent is picked by the team round-robin — the same rotation the app uses, so load stays even.
agentId onlyTheir team is inferred when they belong to exactly one; otherwise you get TEAM_REQUIRED.

Code Example

# Hand the conversation to the Sales queue — round-robin picks the agent
curl -X POST "https://api.sendiee.com/v2.0/conversations/assign" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "phone": "919876543210", "teamId": "6710a1f4c93b2e0012aa7f01" }'

Response — 200 OK

{
  "success": true,
  "data": {
    "_id": "66c3f0a19d2b4e0011ab9911",
    "assignedTeamId": "6710a1f4c93b2e0012aa7f01",
    "assignedAgentId": "6708b2d1c93b2e0012aa1001",
    "assignmentHistory": [
      {
        "_id": "66c400119d2b4e0011abaa01",
        "action": "assigned",
        "assignedAgentId": "6708b2d1c93b2e0012aa1001",
        "assignedAgentName": "Aarti Menon",
        "assignedTeamId": "6710a1f4c93b2e0012aa7f01",
        "assignedTeamName": "Sales",
        "assignedBy": null,
        "assignedByName": "API key sk_Ab12Cd34",
        "source": "manual",
        "assignedAt": "2026-09-09T07:41:12.114Z"
      }
    ]
  }
}

data.assignmentHistoryis the conversation’s recent trail (up to 100 entries, oldest first) so you can render the timeline without a second call.

Errors

StatusCodeMeaning
400LOCATOR_REQUIREDNeither conversationId nor phone was sent
400ASSIGNEE_REQUIREDNeither agentId nor teamId was sent
400TEAM_REQUIREDThe agent belongs to zero or several teams — send teamId too
400VALIDATION_ERRORThe team does not exist in this org, or is deactivated
403FORBIDDENThe agent is not an active member of the org, or not on the target team
404NOT_FOUNDUnknown agent id, or no conversation for that customer
409NO_AVAILABLE_AGENTTeam-only assign, but the team has no assignable agent

Try It — Assign

Try it — API Playground

Leave blank to target by phone instead

Only needed with phone, when the contact is not on WhatsApp

Unassign Conversation

Clears both the agent and the team, returning the conversation to the unassigned pool. The previous assignee’s inbox drops it immediately, and an unassigned entry is appended to the history.

POST/v2.0/conversations/unassign

Body Parameters

ParameterTypeDescription
conversationIdstringTarget conversation id. Required unless phone is given
phonestringCustomer identifier, same rules as assign
channelstringwhatsapp | instagram | messengerDefault: whatsapp
businessNumberstringYour business number or platform id

Code Example

curl -X POST "https://api.sendiee.com/v2.0/conversations/unassign" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "conversationId": "66c3f0a19d2b4e0011ab9911" }'

Response — 200 OK

{
  "success": true,
  "data": {
    "_id": "66c3f0a19d2b4e0011ab9911",
    "assignedTeamId": null,
    "assignedAgentId": null,
    "assignmentHistory": [
      {
        "_id": "66c400119d2b4e0011abaa01",
        "action": "assigned",
        "assignedAgentId": "6708b2d1c93b2e0012aa1001",
        "assignedAgentName": "Aarti Menon",
        "assignedTeamId": "6710a1f4c93b2e0012aa7f01",
        "assignedTeamName": "Sales",
        "assignedBy": null,
        "assignedByName": "API key sk_Ab12Cd34",
        "source": "manual",
        "assignedAt": "2026-09-09T07:41:12.114Z"
      },
      {
        "_id": "66c400559d2b4e0011abaa02",
        "action": "unassigned",
        "assignedAgentId": null,
        "assignedAgentName": "",
        "assignedTeamId": null,
        "assignedTeamName": "",
        "assignedBy": null,
        "assignedByName": "API key sk_Ab12Cd34",
        "source": "manual",
        "assignedAt": "2026-09-09T08:02:44.501Z"
      }
    ]
  }
}