Documentation

HTTP API Documentation


https://api.waapi.me

Instance connect


This request initiates a 3-minute session for a WaAPI instance, during which QR codes can be generated for the bot`s connection. Use this method to start the connection process and retrieve QR codes as needed.


Request


This section provides an example HTTP request to start a 3-minute session for the specified bot instance. Ensure that the request includes the correct URL and instance ID so that the session begins for the intended instance.


POSThttps://api.waapi.me/instance/:id/connect

Headers


When making this request, it`s important to include Authorization HTTP header


Authorization: <YOUR_API_KEY>

Response


The response contains a JSON example confirming the session start, along with the instance ID. During this 3-minute period, QR codes can be generated for the bot`s connection setup. Refer to the table for a detailed description of each field in the response.


Field
Type
Description
idstring|uuidInstance(bot) id
namestringInstance(bot) name
phonestringConnected phone number
platformstring|enumConnected phone platform
statusstring|enumInstance(bot) status
hookUrlstring|url|nullWebhook URL
messageHookbooleanSend outgoing messages to webhook url flag
messageBotHookbooleanSend incoming messages to webhook url flag
instanceHookbooleanSend instance(bot) changes to webhook url flag

{
    "id": "c3996092-b982-4af7-8cf1-0cfafea5143c",
    "name": "Darth Maul bot",
    "phone": null,
    "platform": "unknown",
    "status": "created",
    "hookUrl": null,
    "messageHook": false,
    "messageBotHook": false,
    "instanceHook": false
}