Handing a conversation over to an agent

    3 min read
    ·
    8 views
    ·
    Updated 09/30/2026

    POST /v1/conversations/handoff

    A method for your chatbot. When the bot cannot answer or the customer asks for a real person, the bot hands the conversation over to an agent. In the WazzaBee chat list the conversation gets the «Waiting for a manager» mark with the reason, and the account owner receives a push notification. The mark is cleared automatically when an agent replies to the customer.

    URL

    POST https://api.wazzabee.com/api-gateway/v1/conversations/handoff

    Headers

    Authorization: Bearer YOUR_API_KEY
    Content-Type: application/json

    Request body parameters

    ParameterTypeRequiredDescription
    conversationIdstring (UUID)✅*Conversation ID. It comes in webhooks and in GET /v1/messages
    chatIdstring✅*The customer's phone number or chat_id if conversationId is unknown. The latest conversation with this customer is used
    channelIdstring (UUID)NoThe line, if the customer writes to several lines
    reasonstringNoReason for the handover, up to 300 characters. The agent sees it in the mark tooltip and in the push

    * Set either conversationId or chatId.

    Request example

    curl -X POST "https://api.wazzabee.com/api-gateway/v1/conversations/handoff" \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "chatId": "77071234567",
        "reason": "The customer asks about a refund, a manager is needed"
      }'

    Successful response (200 OK)

    {
      "success": true,
      "conversationId": "uuid",
      "awaitingManager": {
        "since": "2026-09-30T12:00:00.000Z",
        "reason": "The customer asks about a refund, a manager is needed"
      },
      "message": "..."
    }

    When the mark is cleared

    The mark is cleared by the first reply from a person: from the dashboard, from the chat in your CRM or through POST /v1/messages/send without the automated flag. Bot messages sent with "automated": true, auto-replies and broadcasts do not clear it. So the bot can immediately tell the customer «Connecting you to a manager», and the agent will still see the mark.

    ℹ️ How to check whether a conversation is waiting for an agent: the GET /v1/conversations response has the awaitingManager field: null or {"since": "...", "reason": "..."}. While it is set, your bot should not reply in this conversation.

    Possible errors

    CodeErrorReason
    400Set conversationId or chatIdNeither identifier was passed
    403The channel is not linked to this integrationThe line is not among those allowed for this API key
    404Conversation not foundThere is no conversation with this customer yet, or the ID is wrong