WhatsApp Provisioning API

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

Télécharger la spécification OpenAPI

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

Authentification

CléDescriptionExemple
Authorization

Votre jeton web JSON.
En savoir plus sur les JWT

Headers

Bearer <JWT>

Corps de la demande
Type de contenu
application/json

country_code
string
Exigée
exemple44

The international dialing code of the number being provisioned

number
string
Exigée
exemple8675309

The WhatsApp number being provisioned.

vname_certificate
string
Exigée
exempleAbCdEFGHiJK123456

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

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

method
string
Exigée
exemplesms

The method for delivering the OTP

Il doit s'agir de l'un d'entre eux :smsvoice
waba_id
string
Exigée
exemple123456789123

WABA ID of the WhatsApp Number

pin
string
exemple123456

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

Exemple Demande

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

Réponses
Type de contenu
application/json

Accepted.

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

The Deployment id

waba_id
string

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

country_code
string
exemple44

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

number
string
exemple7700900000

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

api_key
string
exempleabcd1234

The API key associated with the deployment.

current_state
object

The current status of the deployment

title
string
exempleINITIALIZING

The current status of the deployment.

Il doit s'agir de l'un d'entre eux :INITIALIZINGCREATING_CLUSTERCLUSTER_CREATEDCODE_SENTWRONG_CODECODE_VERIFIEDFINALIZINGREADYERRORDELETINGDELETED
detail
string
exempleInitializing deployment

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

Exemple Réponse

{
   "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

Authentification

CléDescriptionExemple
Authorization

Votre jeton web JSON.
En savoir plus sur les JWT

Headers

Bearer <JWT>

Trajectoire Paramètres

deployment_id
string
Exigée

The deployment ID

Réponses
Type de contenu
application/json

The deployment.

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

The Deployment id

waba_id
string

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

country_code
string
exemple44

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

number
string
exemple7700900000

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

api_key
string
exempleabcd1234

The API key associated with the deployment.

current_state
object

The current status of the deployment

title
string
exempleINITIALIZING

The current status of the deployment.

Il doit s'agir de l'un d'entre eux :INITIALIZINGCREATING_CLUSTERCLUSTER_CREATEDCODE_SENTWRONG_CODECODE_VERIFIEDFINALIZINGREADYERRORDELETINGDELETED
detail
string
exempleInitializing deployment

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

Exemple Réponse

{
   "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

Authentification

CléDescriptionExemple
Authorization

Votre jeton web JSON.
En savoir plus sur les JWT

Headers

Bearer <JWT>

Trajectoire Paramètres

deployment_id
string
Exigée

The deployment ID

Réponses

No Content

OTP

Verify or resend a One Time Password (OTP)

Opérations disponibles

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

Authentification

CléDescriptionExemple
Authorization

Votre jeton web JSON.
En savoir plus sur les JWT

Headers

Bearer <JWT>

Trajectoire Paramètres

deployment_id
string
Exigée

The deployment ID

Corps de la demande
Type de contenu
application/json

method
string
exemplesms
Il doit s'agir de l'un d'entre eux :smsvoice

Exemple Demande

{
   "method": "sms"
}

Réponses
Type de contenu
application/json

Code sent.

message
string
exempleCode sent
vname
string
exempleyour vname
method
string
exemplesms

The method the OTP resend will use.

Exemple Réponse

{
   "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

Authentification

CléDescriptionExemple
Authorization

Votre jeton web JSON.
En savoir plus sur les JWT

Headers

Bearer <JWT>

Trajectoire Paramètres

deployment_id
string
Exigée

The deployment ID

Corps de la demande
Type de contenu
application/json

code
string
exemple674639

OTP being submitted for verification

Exemple Demande

{
   "code": "674639"
}

Réponses
Type de contenu
application/json

OK

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

the id of your deployment

status
string
exempleDeployment was Created

Exemple Réponse

{
   "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

Authentification

CléDescriptionExemple
Authorization

Votre jeton web JSON.
En savoir plus sur les JWT

Headers

Bearer <JWT>

Trajectoire Paramètres

deployment_id
string
Exigée

The deployment ID

Réponses
Type de contenu
application/json

OK

about
string
Min1
Max139
exempleabout your business

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

address
string
Min1
Max256
exemple123 main street

Your business address - max 256 characters.

description
string
Min1
Max256
exempleyour business description

a description of your business - max 256 characters

email
string
Min1
Max128
exempleyou@example.com

Your business' email - max 128 characters

vertical
string
exempleFood and Grocery

Your business' industry - must be recognized by WhatsApp.

Il doit s'agir de l'un d'entre eux :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

Exemple Réponse

{
   "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

Authentification

CléDescriptionExemple
Authorization

Votre jeton web JSON.
En savoir plus sur les JWT

Headers

Bearer <JWT>

Trajectoire Paramètres

deployment_id
string
Exigée

The deployment ID

Corps de la demande
Type de contenu
application/json

about
string
Min1
Max139
exempleabout your business

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

address
string
Min1
Max256
exemple123 main street

Your business address - max 256 characters.

description
string
Min1
Max256
exempleyour business description

a description of your business - max 256 characters

email
string
Min1
Max128
exempleyou@example.com

Your business' email - max 128 characters

vertical
string
exempleFood and Grocery

Your business' industry - must be recognized by WhatsApp.

Il doit s'agir de l'un d'entre eux :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

Exemple Demande

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

Réponses
Type de contenu
application/json

OK

about
string
Min1
Max139
exempleabout your business

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

address
string
Min1
Max256
exemple123 main street

Your business address - max 256 characters.

description
string
Min1
Max256
exempleyour business description

a description of your business - max 256 characters

email
string
Min1
Max128
exempleyou@example.com

Your business' email - max 128 characters

vertical
string
exempleFood and Grocery

Your business' industry - must be recognized by WhatsApp.

Il doit s'agir de l'un d'entre eux :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

Exemple Réponse

{
   "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

Authentification

CléDescriptionExemple
Authorization

Votre jeton web JSON.
En savoir plus sur les JWT

Headers

Bearer <JWT>

Trajectoire Paramètres

deployment_id
string
Exigée

The deployment ID

Réponses
Type de contenu
application/json

OK.

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

Url where the profile photo was pulled from

Exemple Réponse

{
   "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

Authentification

CléDescriptionExemple
Authorization

Votre jeton web JSON.
En savoir plus sur les JWT

Headers

Bearer <JWT>

Trajectoire Paramètres

deployment_id
string
Exigée

The deployment ID

Corps de la demande
Type de contenu
application/json

image_url
string
Exigée
exemplehttps://www.example.com/img.png

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

Exemple Demande

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

Réponses
Type de contenu
application/json

OK.

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

Url where the profile photo was pulled from

Exemple Réponse

{
   "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

Authentification

CléDescriptionExemple
Authorization

Votre jeton web JSON.
En savoir plus sur les JWT

Headers

Bearer <JWT>

Trajectoire Paramètres

deployment_id
string
Exigée

The deployment ID

Réponses
Type de contenu
application/json

Return list of available stickerpacks

stickerpacks
array
id
string
exemplesticker-pack-id1

Exemple Réponse

{
   "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

Authentification

CléDescriptionExemple
Authorization

Votre jeton web JSON.
En savoir plus sur les JWT

Headers

Bearer <JWT>

Trajectoire Paramètres

deployment_id
string
Exigée

The deployment ID

Corps de la demande
Type de contenu
application/json

publisher
string
Exigée
exempleyour-publisher-name

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

name
string
Exigée
exempleyour-sticker-pack-name

The name of the stickerpack.

ios_app_store_link
string
exemplehttps://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
exemplehttps://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.

Exemple Demande

{
   "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"
}

Réponses
Type de contenu
application/json

A successful response

stickerpacks
array
id
string
exemplesticker-pack-id1

Exemple Réponse

{
   "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

Authentification

CléDescriptionExemple
Authorization

Votre jeton web JSON.
En savoir plus sur les JWT

Headers

Bearer <JWT>

Trajectoire Paramètres

deployment_id
string
Exigée

The deployment ID

Réponses
Type de contenu
application/json

Return list of available stickerpacks

stickerpacks
array
id
string
exemplesticker-pack-id1

Exemple Réponse

{
   "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

Authentification

CléDescriptionExemple
Authorization

Votre jeton web JSON.
En savoir plus sur les JWT

Headers

Bearer <JWT>

Trajectoire Paramètres

deployment_id
string
Exigée

The deployment ID

stickerpack_id
string
Exigée

The stickerpack ID

Réponses
Type de contenu
application/json

Return list of available stickerpacks

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

Exemple Réponse

{
   "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

Authentification

CléDescriptionExemple
Authorization

Votre jeton web JSON.
En savoir plus sur les JWT

Headers

Bearer <JWT>

Trajectoire Paramètres

deployment_id
string
Exigée

The deployment ID

stickerpack_id
string
Exigée

The stickerpack ID

Réponses
Type de contenu
application/json

Return list of available stickers

stickers
array
index
string
exemplesticker-index1

Exemple Réponse

{
   "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

Authentification

CléDescriptionExemple
Authorization

Votre jeton web JSON.
En savoir plus sur les JWT

Headers

Bearer <JWT>

Trajectoire Paramètres

deployment_id
string
Exigée

The deployment ID

stickerpack_id
string
Exigée

The stickerpack ID

Corps de la demande
Type de contenu
application/json

image_data_id
string
Exigée
exempleid

The ID for the sticker media.

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

An array of the emojis included in the stickerpack.

Exemple Demande

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

Réponses
Type de contenu
application/json

Return an index of the sitcker

stickers
array
index
string
exemplesticker-index1

Exemple Réponse

{
   "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

Authentification

CléDescriptionExemple
Authorization

Votre jeton web JSON.
En savoir plus sur les JWT

Headers

Bearer <JWT>

Trajectoire Paramètres

deployment_id
string
Exigée

The deployment ID

stickerpack_id
string
Exigée

The stickerpack ID

sticker_index
string
Exigée

The sticker index

Réponses
Type de contenu
application/json

Returns a sticker

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

Exemple Réponse

{
   "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

Authentification

CléDescriptionExemple
Authorization

Votre jeton web JSON.
En savoir plus sur les JWT

Headers

Bearer <JWT>

Trajectoire Paramètres

deployment_id
string
Exigée

The deployment ID

stickerpack_id
string
Exigée

The stickerpack ID

sticker_index
string
Exigée

The sticker index

Réponses
Type de contenu
application/json

Creates a sticker

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

Exemple Réponse

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

Erreurs

Voici une liste non exhaustive des codes d'erreur susceptibles de se produire lors de l'utilisation de cette API.

Ces codes s'ajoutent à ceux de notre site codes d'erreur génériques.

CodeInformations
number-in-use

Description

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

Résolution

Use the existing deployment.

invalid-json

Description

The request body did not contain valid JSON

Résolution

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

Résolution

Fix the incorrect request parameters and try again

unprocessable-profile-update

Description

Parameters were valid JSON but something was missing or wrongly formatted

Résolution

Fix the incorrect request parameters and try again

throttled

Description

Too many requests have been made on this endpoint

Résolution

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

Résolution

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.

Résolution

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

Résolution

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