What's new, 30 November 2026: Platform API: know when a colleague is handling a conversation. A state endpoint, four conversation events, a gate for automated agents, and a way to mark a conversation handled.
WASync · Developers

Conversations: hand-off between your agent and a person

Know when a colleague is handling a WhatsApp conversation: the state endpoint, four webhook events, a gate that stops your agent from answering over a person, and how to mark a conversation handled.

When your team and your agent share one WhatsApp number, the agent needs to know when a colleague has taken a conversation, and stay out of it. This guide covers the state you can read, the events you receive, the gate that refuses an agent's send, and how to mark a conversation handled.

Who this is for

Anyone who runs an automated agent (your own backend, an n8n workflow, an MCP client) on a number that people also answer from WASync Chat, the CRM widget or the Open Channel. Nothing changes for integrations that never turn the gate on.

The conversation state

GET /v1/conversations/state?connectionId=…&phone=… (scope whatsapp.read) answers one object for one 1:1 conversation. An unknown number is a valid answer (everything is null), so your agent can ask before it writes to a number for the first time.

GET /conversations/state
curl "https://developers.wasync.app/api/v1/conversations/state?connectionId=conn_8f3a21&phone=40700000000" \
  -H "Authorization: Bearer $WASYNC_API_KEY"
200 response
{
  "connection_id": "conn_8f3a21",
  "phone": "40700000000",
  "hold": {
    "by": { "name": "Ana Pop", "bitrix_user_id": "17" },
    "surface": "wasync_chat",
    "since": "2026-11-30T09:12:00.000Z",
    "expires_at": "2026-11-30T21:12:00.000Z",
    "version": 3
  },
  "resolved": null,
  "last_inbound_at": "2026-11-30T09:11:20.000Z",
  "last_outbound_at": "2026-11-30T09:12:41.000Z"
}
  • hold: null, or a person is handling the conversation. by is their name and Bitrix24 user id, surface is where they did it (widget, wasync_chat, open_channel or takeover_button), since and expires_at (when it ends by itself; can be null), and version, which grows with every change and orders events.
  • resolved: null, or the team marked the conversation handled: at and by ({ "type": "person" | "api_key", "name" }).
  • last_inbound_at / last_outbound_at: the latest message from the customer and the latest one sent to them.

A connection your credential cannot see (another workspace's, one outside your app's authorization, or one limited to some WhatsApp groups) answers 404 not_found, the same as one that does not exist. A phone that is not a number answers 400 invalid_phone. The MCP server has the same read as get_whatsapp_conversation_state.

When a hold starts and ends

A hold means a person is handling the conversation.

It starts when:

  • a person writes to the customer from WASync Chat, from the CRM widget, or from the Open Channel in Bitrix24;
  • a person presses Take over in WASync Chat (no message needed).

It ends when 12 hours pass after the person's last message. Each new message from the person counts again from that message.

It does not start when the message was sent by something automatic: automations, Chat Flows, robots, scheduled messages and messages sent through the API never create a hold.

The four events

Delivered to your webhook like every other event: signed, retried, one event_id per transition (a retry carries the same id, so drop copies). They report transitions only, never a state that stays the same. Delivery contract: Webhooks.

conversation.handoff: a person took the conversation. reason is human_message or takeover_button.

POST your webhook URL
{
  "event": "conversation.handoff",
  "event_id": "evt_hold_h1_1",
  "connection_id": "conn_8f3a21",
  "conversation": { "phone": "40700000000" },
  "version": 1,
  "by": { "name": "Ana Pop", "bitrix_user_id": "17" },
  "surface": "wasync_chat",
  "since": "2026-11-30T09:12:00.000Z",
  "expires_at": "2026-11-30T21:12:00.000Z",
  "reason": "human_message",
  "timestamp": 1796029920000
}

conversation.released: your agent may answer again. reason is expired (the hold ran out) or returned_by_person.

POST your webhook URL
{
  "event": "conversation.released",
  "event_id": "evt_hold_h1_2",
  "connection_id": "conn_8f3a21",
  "conversation": { "phone": "40700000000" },
  "version": 2,
  "by": { "name": "Ana Pop", "bitrix_user_id": "17" },
  "surface": "wasync_chat",
  "since": "2026-11-30T09:12:00.000Z",
  "expires_at": "2026-11-30T21:12:00.000Z",
  "released_at": "2026-11-30T21:12:00.000Z",
  "reason": "expired",
  "timestamp": 1796073120000
}

conversation.resolved: the conversation was marked handled, by a person in WASync Chat or through POST /v1/conversations/resolve.

POST your webhook URL
{
  "event": "conversation.resolved",
  "event_id": "evt_res_c1_1796031000000",
  "connection_id": "conn_8f3a21",
  "conversation": { "phone": "40700000000" },
  "resolved": {
    "at": "2026-11-30T09:30:00.000Z",
    "by": { "type": "person", "name": "Ana Pop" }
  },
  "timestamp": 1796031000500
}

conversation.reopened: the customer wrote again after it was marked handled. Fires once per resolve. message_id is the customer's message, the same id as message.id in the matching message.received.

POST your webhook URL
{
  "event": "conversation.reopened",
  "event_id": "evt_reo_c1_1796031000000",
  "connection_id": "conn_8f3a21",
  "conversation": { "phone": "40700000000" },
  "resolved_at": "2026-11-30T09:30:00.000Z",
  "message_id": "cmqj3k2ab0009xyz",
  "timestamp": 1796034000000
}

Personal data in these events

conversation.handoff and conversation.released include the operator's name and Bitrix24 user id (by), and conversation.resolved includes the name of the person who marked it. The state endpoint carries the same fields. Treat them like any other personal data you receive from WASync: store only what you need, and do not show them to the customer.

Existing webhooks must be saved again

A subscription keeps the list of event types it had when it was last saved, so an endpoint set up before 30 November 2026 does not receive the four conversation events until you refresh it:

  • API key: call PUT /v1/webhook again with the same URL (the secret does not change), or save the URL again on developers.wasync.app/keys.
  • OAuth app: re-authorise the app, so its subscription takes the new list.

The credential needs the whatsapp.events scope. The conversation object on message.received (next section) arrives without any change on your side.

Recognise a new service

Every message.received for a 1:1 chat can carry an additive conversation object. Treat it as optional: it can be absent, and the rest of the payload is unchanged.

message.received (added object)
{
  "event": "message.received",
  "connection_id": "conn_8f3a21",
  "message": { "id": "cmqj3k2ab0009xyz", "from": "40700000000", "text": "Hi again" },
  "conversation": {
    "reopened": true,
    "first_message": false,
    "previous_inbound_at": "2026-11-29T16:02:10.000Z",
    "hold": null
  }
}
  • reopened: this message reopened a conversation that had been marked handled. The conversation.reopened event is sent for it too.
  • first_message: the first message WASync has stored from this customer on this connection.
  • previous_inbound_at: when the customer wrote before this message (null for a first message). A long gap is your cue for a new service.
  • hold: the same object as in the state, or null.

The gate: your agent never answers over a person

Mark the API key your agent uses as an Automated agent: on developers.wasync.app/keys, turn on Automated agent for that key. It is off by default and you can change it at any time.

While a person is handling a conversation, a send from that key (POST /v1/messages, text or media) is refused:

409 on POST /messages
HTTP/1.1 409 Conflict

{
  "error": "conversation_held_by_human",
  "since": "2026-11-30T09:12:00.000Z",
  "expires_at": "2026-11-30T21:12:00.000Z",
  "by": { "name": "Ana Pop", "bitrix_user_id": "17" }
}
  • Nothing is sent and nothing is queued. Decide on your side what to do: wait for conversation.released, or drop the draft.
  • Keys that are not marked, and every OAuth app, are never refused: the gate is opt-in and per key. An automatedAgent field in a request body is ignored; the setting belongs to the key, which you change in the console, not from the API.
  • A send that replays one that already succeeded (same idempotencyKey) still returns its original result.
  • You can run the same check yourself: when hold in the state is not null, do not write.

Mark a conversation handled

POST /v1/conversations/resolve with { "connectionId", "phone", "resolved": true | false } takes the conversation out of the team's Awaiting reply list in WASync Chat, or puts it back with false. Scope: whatsapp.send (there is no separate write scope, so any credential that can already send can resolve). It is idempotent (changed: false when nothing changed) and the state shows who did it: { "type": "api_key", "name": "…" }. The MCP server has it as resolve_whatsapp_conversation.

POST /conversations/resolve
curl -X POST https://developers.wasync.app/api/v1/conversations/resolve \
  -H "Authorization: Bearer $WASYNC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"connectionId":"conn_8f3a21","phone":"40700000000","resolved":true}'
200 response
{
  "changed": true,
  "connection_id": "conn_8f3a21",
  "phone": "40700000000",
  "hold": null,
  "resolved": { "at": "2026-11-30T09:30:00.000Z", "by": { "type": "api_key", "name": "Support agent" } },
  "last_inbound_at": "2026-11-30T09:11:20.000Z",
  "last_outbound_at": "2026-11-30T09:12:41.000Z"
}

What resolve is not:

  • It does not end the Open Channel session in Bitrix24.
  • It does not decide the CRM record: no deal, lead or contact changes.
  • It sends no message, and it neither takes nor releases a conversation: a person's hold is untouched.

The resolved mark belongs to the contact, not to one connection: it applies to that phone number across all the workspace's connections. An unknown conversation answers 404 not_found; this endpoint never creates one.

What this version does not cover

  • WhatsApp groups: only 1:1 conversations have a state, events and a gate.
  • Replies a person types on the phone itself: they do not start a hold.
  • Conversations known only by an internal id, with no phone number.
  • An operator who accepted an Open Channel session but has not written yet: nothing is held until they write or press Take over.
  • Numbers on the official WhatsApp Business API: the message and conversation events are sent for QR-connected numbers only today.
  • OAuth apps: there is no gate for them. They can read the state and receive the events, and decide for themselves.
  • A number limited to some groups (API visibility) has no conversation state or events.
Was this page helpful?

On this page