Settings
Turn.io only exposes a subset of the WhatsApp Business API. Each section and the functionality exposed is listed below.
Application Settings
Setting the application settings
$ curl -X PATCH https://whatsapp.turn.io/v1/settings/application \
-H 'Authorization: Bearer token' \
-H 'Content-Type: application/json' \
-d '
{
"webhooks": {
"url": "https://example.com"
}
}
'
> {}
Retrieving the application settings
$ curl -X GET https://whatsapp.turn.io/v1/settings/application \
-H 'Authorization: Bearer token'
> {
"settings": {
"application": {
"webhooks": {
"url": "https://example.com"
}
}
}
}
Configure your primary webhook with this endpoint. The primary webhook is given priority when relaying messages to your endpoints. For more information on webhook performance see Webhook Performance and Retries
Reset Primary Webhook Settings
$ curl -X DELETE https://whatsapp.turn.io/v1/settings/application \
-H 'Authorization: Bearer token'
Settings can be reset with an HTTP DELETE call to the endpoint. At this point that only results in clearing of the primary webhook, if one was set.
Setting the Business About Settings
Support for this API was removed with the move to the Cloud API. It will not continue to work for numbers that have migrated to the Cloud API as it was an on-premise only feature.
This information can now be changed in the Settings section of Turn.io.
Setting the business about
$ curl -X PATCH https://whatsapp.turn.io/v1/settings/profile/about \
-H 'Authorization: Bearer token' \
-H 'Content-Type: application/json' \
-d '
{
"text": "your-profile-about-text"
}
'
> {}
Use the /v1/settings/profile/about endpoint to configure your about text:
Parameter
| Name | Type | Description |
|---|---|---|
text | string | Text to display in your profile's About section. The max length for the string is 139 characters. |
A successful request returns the HTTP Status Code 200 OK and either null or .
Viewing the Business About Settings
Retrieving the business about
$ curl -X GET https://whatsapp.turn.io/v1/settings/profile/about \
-H 'Authorization: Bearer token'
> '{
"settings": {
"profile": {
"about": {
"text": "your-profile-about-text"
}
}
}
}'
A successful response contains the profile object with the text parameter containing your profile's About content.
Setting the Business Profile Settings
Setting the business profile
$ curl -X POST https://whatsapp.turn.io/v1/settings/business/profile \
-H 'Authorization: Bearer token' \
-H 'Content-Type: application/json' \
-d '
{
"address": "your-business-address",
"description": "your-business-description",
"email": "your-business-email",
"vertical": "your-business-industry",
"websites": [ "your-website-1", "your-website-2" ]
}
'
> {}
Retrieving a business profile
$ curl -X GET https://whatsapp.turn.io/v1/settings/business/profile \
-H 'Authorization: Bearer token'
> {
"settings": {
"business": {
"profile": {
"address": "business-address",
"description": "business-description",
"email": "business-email",
"vertical": "business-industry",
"websites": [ "website-1", "website-2" ]
}
}
}
Use the /v1/settings/business/profile endpoint to configure your business profile settings such as:
- Business address
- Business description
- Email for business contact
- Business industry
- Business website
Currently, settings can only be configured as a group. Future releases may enable setting individual settings.
Parameter
| Name | Type | Description |
|---|---|---|
address | string | address of the business. Maximum of 256 characters |
description | string | Description of the business. Maximum of 256 characters |
email | string | Email address to contact the business. Maximum of 128 characters |
vertical | string | Industry of the business. Maximum of 128 characters |
websites | array of strings | URLs associated with business (e.g., website, Facebook page, Instagram). Maximum of 2 websites with a maximum of 256 characters each |
A successful request returns the HTTP Status Code 200 OK and either null or .
Setting the Profile Photo
$ curl -X POST https://whatsapp.turn.io/v1/settings/profile/photo \
-H 'Authorization: Bearer token' \
-H 'Content-Type: image/jpeg' \
--data-binary @your-path-to-image
To change your profile photo using the API, send the raw image to the /v1/settings/profile/photo endpoint.
Profile photos can be of any dimension and size. The WhatsApp Business API Client will scale and crop it to be a square with a max edge of 640 and max size of 63KB before uploading to our servers. An image size of 640x640 is recommended.
If you are having trouble uploading your JPEG image it may be because of hidden attributes in your image file. We recommend using imagecompressor.com to clear your image of these attributes and then trying again.
A successful request returns the HTTP Status Code 200 OK and either null or .
Retrieve Profile Photo
Support for this API was removed with the move to the Cloud API. It will not continue to work for numbers that have migrated to the Cloud API as it was an on-premise only feature.
This information can now be changed in the Settings section of Turn.io.
$ curl -X GET https://whatsapp.turn.io/v1/settings/profile/photo \
-H 'Authorization: Bearer token'
Use the WhatsApp Business API's /v1/settings/profile/photo endpoint to retrieve the image that you are using as your profile photo.
Two-Step Verification
These API endpoints have been completely removed. The /v1/settings/account/two-step endpoints (both POST and DELETE) are no longer available.
Two-step verification was an on-premise only feature that is not supported in the Cloud API. All numbers have been migrated to the Cloud API, making these endpoints obsolete.
Two-step verification PIN management is handled internally by the platform and cannot be controlled via the API.