You can use this API to update webhooks and other settings for transactional WhatsApp messages.
Endpoint
POST https://gw.useinsider.com/api/wa/v2/transactional/settings
Visit our Postman collection to test this request.
The system supports two grant types for OAuth2 authentication:
client_credentialsrefresh_token
Client Credentials Request
curl -X POST "https://gw.useinsider.com/api/wa/v2/transactional/settings" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your_access_token" \
-d '{
"webhook_url": "https://partner.example.com/webhooks/transactional",
"from": "+1234567890",
"auth_type": "oauth2",
"oauth2": {
"grant_type": "client_credentials",
"token_url": "https://oauth.partner.com/oauth/token",
"client_id": "your_client_id",
"client_secret": "your_client_secret",
"scopes": [
"webhook.write"
],
"expires_in": 3600
}
}'
Refresh Token Request
curl -X POST "https://gw.useinsider.com/api/wa/v2/transactional/settings" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your_access_token" \
-d '{
"webhook_url": "https://partner.example.com/webhooks/transactional",
"from": "+1234567890",
"auth_type": "oauth2",
"oauth2": {
"grant_type": "refresh_token",
"token_url": "https://oauth.partner.com/oauth/token",
"client_id": "your_client_id",
"client_secret": "your_client_secret",
"refresh_token": "your_refresh_token",
"scopes": [
"webhook.write"
],
"expires_in": 3600
}
}'
Error Codes
Code | HTTP Status | Description |
|---|---|---|
2010 | 400 | The settings request body could not be decoded. |
2011 | 400 | The settings request body failed validation. |
2012 | 400 | An error occurred while saving the settings. |
2020 | 400 | The webhook URL failed validation. |