Message AI Agent

Send a Message to AI Agent

You can interact with this API by sending a POST request. This allows you to send messages, receive replies, and more.


API Endpoint

The following endpoint/URL should be used in order to access this API:

https://admin.gpt4business.ai/en/chatbot/api/v1/message/

Request Headers

The API must have the following request headers:

Content-Type: application/json
Authorization: Token <Your-API-Token>

Request Body

The API requires the following parameters in the request body:

  • chatbot_uuid (Type: UUID, Required)

    Unique identifier (UUID) of the chatbot. You can find this UUID on the chatbot's detail page.

  • query (Type: String, Required)

    Message or query the user intends to send to the chatbot. Must be under 5000 characters.

  • user_key (Type: String, Required)

    A unique identifier/string, used to distinguish users interacting with the chatbot.


Request Example

Here's an example of the request:

PythonJavaScriptCurl/Shell


Response Example

Here's an example of the response:

JSON


Error Handling

It's essential to handle any non-200 status codes (e.g., 400, 404, 500) returned by the API. In the event of an error, the API will provide a structured response as shown below:

JSON

JSON

Last updated

Was this helpful?