The Agents API aims to open Aivo’s platform to a community of integrators, facilitating the development of connections between users interacting on our various channels and Agents on any platform. This way, communications between systems are standardized.
To achieve this goal, we propose an event-driven integration flow in which the client (partner) must set up a notification Webhook to receive the different conversational events generated from Aivo (such as transfers, messages, and closures). It will be the client’s responsibility to manage and process these events.
Additionally, Aivo will provide the Agents API, which will allow the client to interact directly with the user through the mentioned events.
▶️ Aivo to Webhook (Event Hook):

The purpose of this Webhook is to send conversational events generated within Aivo. It is based on a REST protocol and will be sent using the POST method in JSON format. The three events that will be handled are as follows:
- Queue Event: triggered when AgentBot initiates a transfer (handoff) to a human agent.
- Message Event: triggered when the user writes a new message in a conversation attended by a human agent.
- Close Event: triggered when the user leaves the channel or when the conversation has been inactive for more than 24 hours.
Access here to consult the Webhook API Reference.
▶️ Requests Webhook to Aivo:

The purpose of this endpoint is to receive new messages intended for the end user.
Gateway: https://agents-api.agentbot.net/{{chanelId}}/{{action}}
This endpoint uses the POST method to receive information, and the payload must be in JSON format. The events that will be handled in the adapter are as follows:
- Attended: notifies the user that their query has been attended to by an Agent.
- Message: sends a message from the Agent to the User.
- endConversation: notifies the User that the conversation has ended and closes it from AgentBot.