Skip to content
Splashify Pro
Docs

Chat Assignment

Assign an open conversation to a specific agent by their email, or release it by sending an empty agent_email. Useful when your routing logic lives outside Splashify — e.g. you decide assignment based on CRM ownership, language preference, or an external scheduling system, and just want to push the result back into Splashify so the agent gets the conversation in their inbox. Assigning fires the team_member_assigned webhook; releasing fires team_member_unassigned.

Endpoint

POST

https://api.splashifypro.com/api/v1/public/assignment/

Headers

Request body

json
{
  "user_phone_number": "919876543210",
  "agent_email": "[email protected]"
}

Without team_id and team_name, the conversation keeps its team. A released conversation that has a team goes back to that team's queue.

Example — assign

bash
curl -X POST https://api.splashifypro.com/api/v1/public/assignment/ \
  -H "Authorization: Basic YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "user_phone_number": "919876543210",
    "agent_email": "[email protected]"
  }'

Example — release

bash
curl -X POST https://api.splashifypro.com/api/v1/public/assignment/ \
  -H "Authorization: Basic YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "user_phone_number": "919876543210",
    "agent_email": ""
  }'

Example: send to a team queue

bash
curl -X POST https://api.splashifypro.com/api/v1/public/assignment/ \
  -H "Authorization: Basic YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "user_phone_number": "919876543210",
    "team_name": "Sales"
  }'

The answer is "message": "Chat Queued Successfully" with team_id and team_name. The conversation waits in the Sales queue until someone on the team picks it, and the conversation_queued webhook fires. When the team takes turns or gives chats to the least busy person, it goes to one person as soon as someone can take it, and team_member_assigned fires too. See Teams.

Successful response — 200 OK

json
{
  "result": true,
  "message": "Chat Assigned Successfully",
  "team_id": "",
  "team_name": ""
}

Releasing returns "message": "Chat Released Successfully". Releasing an already-unassigned conversation is a no-op and still returns 200.

Error response — 400 Bad Request

json
{
  "result": false,
  "message": "Error_Message"
}

The message field carries the actual reason — common ones:

  • Agent not found — the email doesn't match any team member.
  • Conversation not found — no open conversation exists for that phone number. The contact may need to message your WABA first.
  • Agent inactive — the team member exists but their access is disabled.

Status codes

Implementation tips

  • Normalize phone numbers at the boundary — strip +, spaces, dashes, parentheses before sending. The validator only accepts pure digits.
  • Check the agent is active in Splashify (Settings → Team) before sending — a deactivated agent won't accept assignment.
  • Idempotent: assigning the same agent and team again changes nothing and fires no webhook.
  • Pair with the inbound webhook (message.received) on your side: when a new conversation opens, look up the customer in your CRM, decide the right agent, then call this endpoint.

List teams

GET

https://api.splashifypro.com/api/v1/public/teams

Answers the account's teams with their people. Empty when the account has no teams.

json
{
  "result": true,
  "teams": [
    {
      "team_id": "1b5c8e00-a6f1-11f1-8000-000000000001",
      "name": "Sales",
      "color": "blue",
      "members": [
        { "member_id": "6a1e0c2e-0f4b-4c4b-9a55-000000000001", "name": "Ravi Kumar", "email": "[email protected]", "is_lead": true }
      ]
    }
  ]
}