Documentation

HTTP API Documentation


https://api.waapi.me

Create instance


This request allows you to update an existing WaAPI instance with new configuration settings. Use this method to modify parameters such as instance name, hookUrl, or any other settings as needed.


Request


This section provides an example HTTP request for updating an instance. Make sure to specify the correct URL along with the instance ID, and include any fields in the request body that you wish to update.


PATCHhttps://api.waapi.me/instance/:id

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
Type
Description
namenostringInstance(bot) name
hookUrlnostring|urlWebhook URL
messageHooknobooleanSend outgoing messages to webhook url flag
messageBotHooknobooleanSend incoming messages to webhook url flag
instanceHooknobooleanSend 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 confirming the successful update, along with a detailed table describing each field. The response contains information about the updated instance, such as the modified settings or status. Refer to the table for the meaning and format of each field.


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
}