Skip to content

chat.assigned

Sent when a chat changes agent or team. Someone assigns it in the app or over the API, the chatbot passes it on, or it comes back to the bot because an agent resumed it or it was closed. Use it to keep your own tools in step with who has the chat.

Called Chat assigned in the app. Part of the plan feature webhooks.chats. To subscribe over the API, the key needs chats:write.

What’s in data. Every event wraps it in the same envelope.

contact_id string · uuid

agent_id string · uuid · nullable

The agent the chat is assigned to now, as chat.assigned_agent_id on the contact shows it. null when nobody is.

team_id string · uuid · nullable

The team the chat is with now. null when no team has it.

by object

Who made the change: a team member, an API key, the chatbot or another actor.

Show 3 child attributesHide child attributes

by.type string

Who or what it was: a team member, an API key, the chatbot, the AI, an automation, a broadcast, the WhatsApp Business app or Soosh itself. More values may be added.

One of user api_key bot ai automation broadcast whatsapp_app system.

by.id string · uuid · nullable

The person, key or broadcast. null for actors without one, such as the chatbot.

by.name string

A change that leaves both the agent and the team as they were sends nothing.

  • Answer with any 2xx within 10 seconds. Do the work after.
  • Check the signature first. Verify webhooks has the code.
  • Subscribe with POST /v1/webhooks, events: ["chat.assigned"].