Messages
Retrieve all messages for a specific conversation.
This endpoint is protected by the same JWT that the user uses to call other APIs. The response will include data for the specified chatbot, along with other metadata information.
This endpoint points to the (v2) version of the API. The (v2) version of the API is the latest version and is recommended for all new development. Please update your code to use the (v2) version of the API.
This endpoint retrieves all messages for a specific conversation. You can use the conversation_id
parameter to specify the conversation for which you want to retrieve messages, to the conversation_id parameter, use get conversations endpoint to get the conversation_id.
The endpoint is paginated, and you can specify the offset
and limit
parameters to control the amount of data returned.
The response includes the following fields:
action_called
: A boolean value that indicates whether the action was called to handle the message.client_extra_params
: An object that contains additional parameters that the client can send to the bot.from
: A string that indicates the sender of the message. The value can becopilot
oruser
.knowldgebase_called
: A boolean value that indicates whether the knowledge base was called to handle the message.message
: A string that contains the message text.
You can use the offset
and limit
parameters to control the pagination of the response. For example, to retrieve the first 10 messages, you can use the following request:
curl --location 'https://api.opencopilot.so/backend/conversations/:bot_id/messages/:conversation_id?offset=0&limit=10' \
--header 'Authorization: Bearer TOKEN'