Skip to Content
Public APIAssign Chat to Agent

Chat Assignment

Assign an open conversation to a specific agent by their 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.

Endpoint

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

Headers

HeaderValue
AuthorizationBasic YOUR_API_KEY
Content-Typeapplication/json

Request body

{ "user_phone_number": "919876543210", "agent_email": "test.agent@interakt.ai" }
FieldRequiredNotes
user_phone_numberyesThe customer’s phone in country-code + number format with no + and no special characters. E.g. +91 9876543210919876543210
agent_emailyesEmail of the agent in your Splashify workspace. The agent must already exist as a team member

Example

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

Successful response — 200 OK

{ "result": true, "message": "Chat Assigned Successfully" }

Error response — 400 Bad Request

{ "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

CodeMeaning
200 OKConversation assigned
400 Bad RequestMalformed payload, missing fields, agent not found
401 UnauthorizedAPI key invalid or missing
500 Internal Server ErrorUnexpected error — retry with backoff

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 — re-assigning to the same agent is a no-op.
  • 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.