Zaply
HomeWebsite
HomeWebsite
  1. Instance Settings
  • Overview
  • Send Messages
    • Send Message via WhatsApp Instance
      POST
    • Send Media Message via WhatsApp Instance
      POST
    • Send Location Message via WhatsApp Instance
      POST
    • Send Contact Message via WhatsApp Instance
      POST
  • Instance Settings
    • Set Settings
      POST
    • Get Settings
      GET
  • Connection
    • Get QR Code for WhatsApp Connection
      GET
  • Manage Instance
    • Create Instance
      POST
    • Get Instance
      GET
    • Delete Instance
      DELETE
  1. Instance Settings

Set Settings

POST
https://api.zaply.dev/v1/instance/{{INSTANCE_ID}}/setting
This 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. Replace a3ufrlhsqz 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. Use application/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"
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 formatted webhook_url).
401 Unauthorized - Invalid or missing Authorization token.
404 Not Found - Instance ID does not exist.
500 Internal Server Error - Server encountered an unexpected condition.

Request

Header Params
Authorization
string 
required
Example:
Bearer {{ZAPLY_AUTH_TOKEN}}
Body Params application/json
webhook_url
string 
required
extra_params
object 
required
Example
{
    "webhook_url" : "https://hallowed-fish-18.webhook.cool",
    "extra_params": {
        "user_id": "1"
    }
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request POST 'https://api.zaply.dev/v1/instance/{{instance_id}}/setting' \
--header 'Authorization: Bearer {{ZAPLY_AUTH_TOKEN}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "webhook_url" : "https://hallowed-fish-18.webhook.cool",
    "extra_params": {
        "user_id": "1"
    }
}'

Responses

🟢200Success
application/json
Body
object {0}
Example
{}
Modified at 2024-10-15 07:07:11
Previous
Send Contact Message via WhatsApp Instance
Next
Get Settings
Built with