Documentation

HTTP API Documentation


https://api.waapi.me

Update instance


This request allows you to create a new WaAPI instance with a unique configuration. Use this method to initialize an instance with specific parameters, such as name, hookUrl, and other setup details.


Request


This section provides an example HTTP request for creating a new instance. Ensure the correct URL and necessary parameters are included in the request body.


POSThttps://api.waapi.me/instance

Headers


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


Authorization: <YOUR_API_KEY>

Body


Here, you’ll find an example JSON request data and a detailed table that describes each field.


Field
Required
Default
Type
Description
namenoWill be generatedstringInstance(bot) name
hookUrlnonullstring|urlWebhook URL
messageHooknofalsebooleanSend outgoing messages to webhook url flag
messageBotHooknofalsebooleanSend incoming messages to webhook url flag
instanceHooknofalsebooleanSend instance(bot) changes to webhook url flag

{
    "name": "My instance",
    "hookUrl": "https://my.site.xyz/waapi",
    "messageHook": true,
    "messageBotHook": true,
    "instanceHook": false
}

Response


Here, you’ll find an example JSON response and a detailed table that describes each field. The JSON response confirms the successful creation of the bot instance and includes key details, like the instance ID and initial configuration settings. Refer to the table to understand each field’s meaning and format.


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
}