דלג לתוכן הראשי
POST
/
chats
/
assign
curl --request POST \ --url https://{projectID}.texterchat.com/server/api/v2/chats/assign \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "phone": "0521234567", "agentEmail": "demo@texterchat.com" } '
"OK"

הרשאות

Authorization
string
header
נדרש

API token generated in Texter: gear icon → Developers → API Tokens. When creating a token, assign it the scopes required by the endpoints you plan to call - each endpoint lists its required scopes.

גוף

application/json
phone
string

The contact's phone number (any common format - normalized automatically). Provide either phone or chatId

chatId
string

The unique identifier of the chat to assign. Provide either chatId or phone

agentUid
string

The internal user ID of the agent in Texter. Only one agent identifier can be used

agentEmail
string

The agent's email address in Texter. Only one agent identifier can be used

agentCrmId
string

The agent's CRM identifier in Texter. Only one agent identifier can be used

departmentId
string | null

The department ID to assign the chat to. Can be used alone or together with a single agent identifier

channel
object

Required only when multiple chats exist for the same phone number, to disambiguate

תגובה

Chat assigned. Body is the plain text OK