WhatsApp Provisioning API

The WhatsApp Manager API enables customers to deploy a WhatsApp cluster, perform One Time Password (OTP) verification, and update profile information

Download OpenAPI Specification

Deployment

Create and manage in-progress deployments

Provision WhatsApp deployment

This API request provisions a WhatsApp cluster. Once provisioned, the cluster progresses through the following deployment stages: INITIALIZING, CREATING_CLUSTER and CLUSTER_CREATED. When the CLUSTER_CREATED stage is reached an OTP voice call or SMS is sent to the specified number and the deployment status becomes CODE_SENT. When the OTP is received, call the Verify API to complete the process.

posthttps://api.nexmo.com/v0.1/whatsapp-manager/deployments

Authentication

KeyDescriptionWhereExample
Authorization

Your JSON web token.
Read more about JWTs

Headers

Bearer <JWT>

Request Body
Content Type
application/json

country_code
string
Required
example44

The international dialing code of the number being provisioned

number
string
Required
example8675309

The WhatsApp number being provisioned.

vname_certificate
string
Required
exampleAbCdEFGHiJK123456

The certificate, which you can retrieve from your WhatsApp Business dashboard.

Note this value is refreshed whenever you click the View button.

method
string
Required
examplesms

The method for delivering the OTP

Must be one of:smsvoice
waba_id
string
Required
example123456789123

WABA ID of the WhatsApp Number

pin
string
example123456

Required if you previously set a PIN when creating a WhatsApp number.

Example Request

{
   "country_code": "44",
   "number": "8675309",
   "vname_certificate": "AbCdEFGHiJK123456",
   "method": "sms",
   "waba_id": "123456789123",
   "pin": "123456"
}

Responses
Content Type
application/json

Accepted.

deployment_id
string
exampleaaaaaaaa-bbbb-cccc-dddd-0123456789ab

The Deployment id

waba_id
string

The WhatsApp Business Account (WABA) ID of the WhatsApp number

country_code
string
example44

The international dialing code of the deployment e.g. 44 for the United Kingdom.

number
string
example7700900000

The phone number of the deployment (minus the international dialing code) e.g. 7700900000

api_key
string
exampleabcd1234

The API key associated with the deployment.

current_state
object

The current status of the deployment

title
string
exampleINITIALIZING

The current status of the deployment.

Must be one of:INITIALIZINGCREATING_CLUSTERCLUSTER_CREATEDCODE_SENTWRONG_CODECODE_VERIFIEDFINALIZINGREADYERRORDELETINGDELETED
detail
string
exampleInitializing deployment

Description of the deployment status e.g. Invalid vname certificate

Example Response

{
   "deployment_id": "aaaaaaaa-bbbb-cccc-dddd-0123456789ab",
   "waba_id": "string",
   "country_code": "44",
   "number": "7700900000",
   "api_key": "abcd1234",
   "current_state": {
      "title": "INITIALIZING",
      "detail": "Initializing deployment"
   }
}

Get Deployment Status

Retrieves information about the deployment at the given deployment id.

gethttps://api.nexmo.com/v0.1/whatsapp-manager/deployments/:deployment_id

Authentication

KeyDescriptionWhereExample
Authorization

Your JSON web token.
Read more about JWTs

Headers

Bearer <JWT>

Path Parameters

deployment_id
string
Required

The deployment ID

Responses
Content Type
application/json

The deployment.

deployment_id
string
exampleaaaaaaaa-bbbb-cccc-dddd-0123456789ab

The Deployment id

waba_id
string

The WhatsApp Business Account (WABA) ID of the WhatsApp number

country_code
string
example44

The international dialing code of the deployment e.g. 44 for the United Kingdom.

number
string
example7700900000

The phone number of the deployment (minus the international dialing code) e.g. 7700900000

api_key
string
exampleabcd1234

The API key associated with the deployment.

current_state
object

The current status of the deployment

title
string
exampleINITIALIZING

The current status of the deployment.

Must be one of:INITIALIZINGCREATING_CLUSTERCLUSTER_CREATEDCODE_SENTWRONG_CODECODE_VERIFIEDFINALIZINGREADYERRORDELETINGDELETED
detail
string
exampleInitializing deployment

Description of the deployment status e.g. Invalid vname certificate

Example Response

{
   "deployment_id": "aaaaaaaa-bbbb-cccc-dddd-0123456789ab",
   "waba_id": "string",
   "country_code": "44",
   "number": "7700900000",
   "api_key": "abcd1234",
   "current_state": {
      "title": "INITIALIZING",
      "detail": "Initializing deployment"
   }
}

Delete Deployment

Delete a WhatsApp deployment

deletehttps://api.nexmo.com/v0.1/whatsapp-manager/deployments/:deployment_id

Authentication

KeyDescriptionWhereExample
Authorization

Your JSON web token.
Read more about JWTs

Headers

Bearer <JWT>

Path Parameters

deployment_id
string
Required

The deployment ID

Responses

No Content

OTP

Verify or resend a One Time Password (OTP)

Available Operations

Resend OTP

If you do not receive the code in five minutes then you can request for it to be sent again.

posthttps://api.nexmo.com/v0.1/whatsapp-manager/deployments/:deployment_id/resend-otp

Authentication

KeyDescriptionWhereExample
Authorization

Your JSON web token.
Read more about JWTs

Headers

Bearer <JWT>

Path Parameters

deployment_id
string
Required

The deployment ID

Request Body
Content Type
application/json

method
string
examplesms
Must be one of:smsvoice

Example Request

{
   "method": "sms"
}

Responses
Content Type
application/json

Code sent.

message
string
exampleCode sent
vname
string
exampleyour vname
method
string
examplesms

The method the OTP resend will use.

Example Response

{
   "message": "Code sent",
   "vname": "your vname",
   "method": "sms"
}

Verify OTP

When a code is successfully verified, WhatsApp Manager will move the number from a CODE_VERIFIED state to a FINALIZING state where additional checks are made and it is assigned to your API Key. Once this is complete it will enter a READY state and the number is ready to use.

posthttps://api.nexmo.com/v0.1/whatsapp-manager/deployments/:deployment_id/verify

Authentication

KeyDescriptionWhereExample
Authorization

Your JSON web token.
Read more about JWTs

Headers

Bearer <JWT>

Path Parameters

deployment_id
string
Required

The deployment ID

Request Body
Content Type
application/json

code
string
example674639

OTP being submitted for verification

Example Request

{
   "code": "674639"
}

Responses
Content Type
application/json

OK

deployment_id
string
exampleaaaaaaaa-bbbb-cccc-dddd-0123456789ab

the id of your deployment

status
string
exampleDeployment was Created

Example Response

{
   "deployment_id": "aaaaaaaa-bbbb-cccc-dddd-0123456789ab",
   "status": "Deployment was Created"
}

Profile

Update WhatsApp profile

Get Profile Info

Gets business profile information

gethttps://api.nexmo.com/v0.1/whatsapp-manager/deployments/:deployment_id/profile

Authentication

KeyDescriptionWhereExample
Authorization

Your JSON web token.
Read more about JWTs

Headers

Bearer <JWT>

Path Parameters

deployment_id
string
Required

The deployment ID

Responses
Content Type
application/json

OK

about
string
Min1
Max139
exampleabout your business

Text to display in your profile's About section - max 139 characters.

address
string
Min1
Max256
example123 main street

Your business address - max 256 characters.

description
string
Min1
Max256
exampleyour business description

a description of your business - max 256 characters

email
string
Min1
Max128
exampleyou@example.com

Your business' email - max 128 characters

vertical
string
exampleFood and Grocery

Your business' industry - must be recognized by WhatsApp.

Must be one of:AutomotiveBeauty, Spa and SalonClothing and ApparelEducationEntertainmentEvent Planning and ServiceFinance and BankingFood and GroceryPublic ServiceHotel and LodgingMedical and HealthNon-profitProfessional ServicesShopping and RetailTravel and TransportationRestaurantOther
websites
array

Your business' websites maximum of 2 websites, max website length: 256

Example Response

{
   "about": "about your business",
   "address": "123 main street",
   "description": "your business description",
   "email": "you@example.com",
   "vertical": "Food and Grocery",
   "websites": [
      "https://example.com"
   ]
}

Update WhatsApp Profile

Updates profile information for deployment.

patchhttps://api.nexmo.com/v0.1/whatsapp-manager/deployments/:deployment_id/profile

Authentication

KeyDescriptionWhereExample
Authorization

Your JSON web token.
Read more about JWTs

Headers

Bearer <JWT>

Path Parameters

deployment_id
string
Required

The deployment ID

Request Body
Content Type
application/json

about
string
Min1
Max139
exampleabout your business

Text to display in your profile's About section - max 139 characters.

address
string
Min1
Max256
example123 main street

Your business address - max 256 characters.

description
string
Min1
Max256
exampleyour business description

a description of your business - max 256 characters

email
string
Min1
Max128
exampleyou@example.com

Your business' email - max 128 characters

vertical
string
exampleFood and Grocery

Your business' industry - must be recognized by WhatsApp.

Must be one of:AutomotiveBeauty, Spa and SalonClothing and ApparelEducationEntertainmentEvent Planning and ServiceFinance and BankingFood and GroceryPublic ServiceHotel and LodgingMedical and HealthNon-profitProfessional ServicesShopping and RetailTravel and TransportationRestaurantOther
websites
array

Your business' websites maximum of 2 websites, max website length: 256

Example Request

{
   "about": "about your business",
   "address": "123 main street",
   "description": "your business description",
   "email": "you@example.com",
   "vertical": "Food and Grocery",
   "websites": [
      "https://example.com"
   ]
}

Responses
Content Type
application/json

OK

about
string
Min1
Max139
exampleabout your business

Text to display in your profile's About section - max 139 characters.

address
string
Min1
Max256
example123 main street

Your business address - max 256 characters.

description
string
Min1
Max256
exampleyour business description

a description of your business - max 256 characters

email
string
Min1
Max128
exampleyou@example.com

Your business' email - max 128 characters

vertical
string
exampleFood and Grocery

Your business' industry - must be recognized by WhatsApp.

Must be one of:AutomotiveBeauty, Spa and SalonClothing and ApparelEducationEntertainmentEvent Planning and ServiceFinance and BankingFood and GroceryPublic ServiceHotel and LodgingMedical and HealthNon-profitProfessional ServicesShopping and RetailTravel and TransportationRestaurantOther
websites
array

Your business' websites maximum of 2 websites, max website length: 256

Example Response

{
   "about": "about your business",
   "address": "123 main street",
   "description": "your business description",
   "email": "you@example.com",
   "vertical": "Food and Grocery",
   "websites": [
      "https://example.com"
   ]
}

Get Profile Photo

Gets business profile photo

gethttps://api.nexmo.com/v0.1/whatsapp-manager/deployments/:deployment_id/profile/photo

Authentication

KeyDescriptionWhereExample
Authorization

Your JSON web token.
Read more about JWTs

Headers

Bearer <JWT>

Path Parameters

deployment_id
string
Required

The deployment ID

Responses
Content Type
application/json

OK.

image_url
string
examplehttps://www.example.com/img.png

Url where the profile photo was pulled from

Example Response

{
   "image_url": "https://www.example.com/img.png"
}

Update Profile Photo

Replaces profile photo with photo at the given URL for the deployment.

posthttps://api.nexmo.com/v0.1/whatsapp-manager/deployments/:deployment_id/profile/photo

Authentication

KeyDescriptionWhereExample
Authorization

Your JSON web token.
Read more about JWTs

Headers

Bearer <JWT>

Path Parameters

deployment_id
string
Required

The deployment ID

Request Body
Content Type
application/json

image_url
string
Required
examplehttps://www.example.com/img.png

URL pointing to a .png or .jpg. Image must be minimum 192px. max 640px x 640px. max 5MB.

Example Request

{
   "image_url": "https://www.example.com/img.png"
}

Responses
Content Type
application/json

OK.

image_url
string
examplehttps://www.example.com/img.png

Url where the profile photo was pulled from

Example Response

{
   "image_url": "https://www.example.com/img.png"
}

Stickerpacks

Stickerpack Management

Gets Third-Party Stickerpacks

Gets Third-Party Stickerpacks

gethttps://api.nexmo.com/v0.1/whatsapp-manager/deployments/:deployment_id/stickerpacks

Authentication

KeyDescriptionWhereExample
Authorization

Your JSON web token.
Read more about JWTs

Headers

Bearer <JWT>

Path Parameters

deployment_id
string
Required

The deployment ID

Responses
Content Type
application/json

Return list of available stickerpacks

stickerpacks
array
id
string
examplesticker-pack-id1

Example Response

{
   "stickerpacks": [
      {
         "id": "sticker-pack-id1"
      }
   ]
}

Creates Third-party Stickerpacks

Creates a Third-Party Sticketpack

posthttps://api.nexmo.com/v0.1/whatsapp-manager/deployments/:deployment_id/stickerpacks

Authentication

KeyDescriptionWhereExample
Authorization

Your JSON web token.
Read more about JWTs

Headers

Bearer <JWT>

Path Parameters

deployment_id
string
Required

The deployment ID

Request Body
Content Type
application/json

publisher
string
Required
exampleyour-publisher-name

The name of the publisher of the third-party stickerpack.

name
string
Required
exampleyour-sticker-pack-name

The name of the stickerpack.

ios_app_store_link
string
examplehttps://itunes.apple.com/app/id3133333

The link to the stickerpack in the Apple iOS App Store. The link follows the format https://itunes.apple.com/app/idXXXXXXXXX. To get your App Store link, refer to the instructions at https://stackoverflow.com/questions/4137426/get-itunes-link-for-app-before-submitting

android_app_store_link
string
examplehttps://play.google.com/store/apps/details?id=com.example

The link to the stickerpack in the Google Play store. The link follows the format https://play.google.com/store/apps/details?id=com.example where com.example is your app's package name.

Example Request

{
   "publisher": "your-publisher-name",
   "name": "your-sticker-pack-name",
   "ios_app_store_link": "https://itunes.apple.com/app/id3133333",
   "android_app_store_link": "https://play.google.com/store/apps/details?id=com.example"
}

Responses
Content Type
application/json

A successful response

stickerpacks
array
id
string
examplesticker-pack-id1

Example Response

{
   "stickerpacks": [
      {
         "id": "sticker-pack-id1"
      }
   ]
}

Gets First-Party Stickerpacks

Gets First-Party (WhatsApp) Stickerpacks

gethttps://api.nexmo.com/v0.1/whatsapp-manager/deployments/:deployment_id/stickerpacks?namespace=whatsapp

Authentication

KeyDescriptionWhereExample
Authorization

Your JSON web token.
Read more about JWTs

Headers

Bearer <JWT>

Path Parameters

deployment_id
string
Required

The deployment ID

Responses
Content Type
application/json

Return list of available stickerpacks

stickerpacks
array
id
string
examplesticker-pack-id1

Example Response

{
   "stickerpacks": [
      {
         "id": "sticker-pack-id1"
      }
   ]
}

Gets a specific stickerpack

Gets a specific stickerpack

gethttps://api.nexmo.com/v0.1/whatsapp-manager/deployments/:deployment_id/stickerpacks/:stickerpack_id

Authentication

KeyDescriptionWhereExample
Authorization

Your JSON web token.
Read more about JWTs

Headers

Bearer <JWT>

Path Parameters

deployment_id
string
Required

The deployment ID

stickerpack_id
string
Required

The stickerpack ID

Responses
Content Type
application/json

Return list of available stickerpacks

stickerpacks
array
name
string
examplesticker-pack-name
publisher
string
examplesticker-pack-publisher
android_app_store_link
string
examplehttps://play.google.com/store/apps/details?id=com.example
ios_app_store_link
string
examplehttps://itunes.apple.com/app/id3133333

Example Response

{
   "stickerpacks": [
      {
         "name": "sticker-pack-name",
         "publisher": "sticker-pack-publisher",
         "android_app_store_link": "https://play.google.com/store/apps/details?id=com.example",
         "ios_app_store_link": "https://itunes.apple.com/app/id3133333"
      }
   ]
}

Stickers

Sticker Management

Gets Third-Party Stickers

Retrieve stickers from a stickerpack

gethttps://api.nexmo.com/v0.1/whatsapp-manager/deployments/:deployment_id/stickerpacks/:stickerpack_id/stickers

Authentication

KeyDescriptionWhereExample
Authorization

Your JSON web token.
Read more about JWTs

Headers

Bearer <JWT>

Path Parameters

deployment_id
string
Required

The deployment ID

stickerpack_id
string
Required

The stickerpack ID

Responses
Content Type
application/json

Return list of available stickers

stickers
array
index
string
examplesticker-index1

Example Response

{
   "stickers": [
      {
         "index": "sticker-index1"
      }
   ]
}

Create Third-Party Stickers

Create Third-Party Stickers

posthttps://api.nexmo.com/v0.1/whatsapp-manager/deployments/:deployment_id/stickerpacks/:stickerpack_id/stickers

Authentication

KeyDescriptionWhereExample
Authorization

Your JSON web token.
Read more about JWTs

Headers

Bearer <JWT>

Path Parameters

deployment_id
string
Required

The deployment ID

stickerpack_id
string
Required

The stickerpack ID

Request Body
Content Type
application/json

image_data_id
string
Required
exampleid

The ID for the sticker media.

emojis
array
example[ "🐥", "😃" ]

An array of the emojis included in the stickerpack.

Example Request

{
   "image_data_id": "id",
   "emojis": [
      "🐥",
      "😃"
   ]
}

Responses
Content Type
application/json

Return an index of the sitcker

stickers
array
index
string
examplesticker-index1

Example Response

{
   "stickers": [
      {
         "index": "sticker-index1"
      }
   ]
}

Gets Third-Party Sticker

Gets Third-Party Sticker

gethttps://api.nexmo.com/v0.1/whatsapp-manager/deployments/:deployment_id/stickerpacks/:stickerpack_id/stickers/:sticker_index

Authentication

KeyDescriptionWhereExample
Authorization

Your JSON web token.
Read more about JWTs

Headers

Bearer <JWT>

Path Parameters

deployment_id
string
Required

The deployment ID

stickerpack_id
string
Required

The stickerpack ID

sticker_index
string
Required

The sticker index

Responses
Content Type
application/json

Returns a sticker

stickers
array
id
string
examplesticker-media-id
image_data_id
string
examplesticker-image-media-id
emojis
array

Example Response

{
   "stickers": [
      {
         "id": "sticker-media-id",
         "image_data_id": "sticker-image-media-id",
         "emojis": [
            [
               "🐥",
               "😃"
            ]
         ]
      }
   ]
}

Delete Third-Party Sticker

Delete Third-Party Sticker

deletehttps://api.nexmo.com/v0.1/whatsapp-manager/deployments/:deployment_id/stickerpacks/:stickerpack_id/stickers/:sticker_index

Authentication

KeyDescriptionWhereExample
Authorization

Your JSON web token.
Read more about JWTs

Headers

Bearer <JWT>

Path Parameters

deployment_id
string
Required

The deployment ID

stickerpack_id
string
Required

The stickerpack ID

sticker_index
string
Required

The sticker index

Responses
Content Type
application/json

Creates a sticker

stickers
array
id
string
examplesticker-media-id
image_data_id
string
examplesticker-image-media-id
emojis
array

Example Response

{
   "stickers": [
      {
         "id": "sticker-media-id",
         "image_data_id": "sticker-image-media-id",
         "emojis": [
            [
               "🐥",
               "😃"
            ]
         ]
      }
   ]
}

Errors

The following is a non-exhaustive list of error codes that may occur while using this API.

These codes are in addition to any of our generic error codes.

CodeInformation
number-in-use

Description

Cannot use number because it's already in use by another deployment.

Resolution

Use the existing deployment.

invalid-json

Description

The request body did not contain valid JSON

Resolution

Send a JSON request body, including a Content-Type header of application/json

unprocessable

Description

Parameters were valid JSON but something was missing or wrongly formatted

Resolution

Fix the incorrect request parameters and try again

unprocessable-profile-update

Description

Parameters were valid JSON but something was missing or wrongly formatted

Resolution

Fix the incorrect request parameters and try again

throttled

Description

Too many requests have been made on this endpoint

Resolution

Wait a moment and try again

verification-failed

Description

Verification step failed. Either because the provided code was incorrect or because too many attempts have been made

Resolution

Try again with the correct OTP, or call resend-otp

conflict-deployment-state

Description

Deployment could not be modified because it is currently in a transitional state.

Resolution

If the deployment is transitioning into the state you want it in no action is required. If the state is DELETING, no action is required as the deployment will be deleted. Otherwise, wait for the transition to complete and try again.

conflict-resend-otp

Description

Could not resend OTP because the current state of the deployment did not allow it

Resolution

The deployment has either already finished, or is in an error state (in which case you should delete it and run it again).