Set Settings
POST
/v1/instance/{{INSTANCE_ID}}/settingThis API endpoint allows you to configure a webhook and extra params for a specified WhatsApp instance. By setting a webhook, you can receive real-time updates and notifications from WhatsApp along with custom params that are configured for instance.
Request Parameters
Path Parameters
instance_id
(string) - The unique identifier of the WhatsApp instance. Replacea3ufrlhsqz
with your actual instance ID.
Headers
Authorization
(string, required) - Bearer token for authentication. Replace{{ZAPLY_AUTH_TOKEN}}
with your API token.Content-Type
(string, required) - Specifies that the request body is in JSON format. Useapplication/json
.
Request Body
The body should be in JSON format and include the following parameter:
webhook_url
(string, required) - The URL where incoming webhook notifications will be sent.- Example:
"https://hallowed-fish-18.webhook.cool"
- Example:
custom_params
(json, optional) - The JSON of custom params receive along with incoming webhook notifications.
Error Codes
400 Bad Request
- Invalid input parameters (e.g., missing or incorrectly formattedwebhook_url
).401 Unauthorized
- Invalid or missingAuthorization
token.404 Not Found
- Instance ID does not exist.500 Internal Server Error
- Server encountered an unexpected condition.
Request
{
"webhook_url": "https://hallowed-fish-18.webhook.cool",
"extra_params": {
"user_id": "1"
}
}
Request samples
Responses
{}