WhatsApp Provisioning API

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

Descargar la especificación 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

Autenticación

ClaveDescripciónDóndeEjemplo
Authorization

Su token web JSON.
Más información sobre los JWT

Headers

Bearer <JWT>

Cuerpo de la solicitud
Tipo de contenido
application/json

country_code
string
Requerido
ejemplo44

The international dialing code of the number being provisioned

number
string
Requerido
ejemplo8675309

The WhatsApp number being provisioned.

vname_certificate
string
Requerido
ejemploAbCdEFGHiJK123456

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

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

method
string
Requerido
ejemplosms

The method for delivering the OTP

Debe ser uno de:smsvoice
waba_id
string
Requerido
ejemplo123456789123

WABA ID of the WhatsApp Number

pin
string
ejemplo123456

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

Ejemplo Solicitar

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

Respuestas
Tipo de contenido
application/json

Accepted.

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

The Deployment id

waba_id
string

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

country_code
string
ejemplo44

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

number
string
ejemplo7700900000

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

api_key
string
ejemploabcd1234

The API key associated with the deployment.

current_state
object

The current status of the deployment

title
string
ejemploINITIALIZING

The current status of the deployment.

Debe ser uno de:INITIALIZINGCREATING_CLUSTERCLUSTER_CREATEDCODE_SENTWRONG_CODECODE_VERIFIEDFINALIZINGREADYERRORDELETINGDELETED
detail
string
ejemploInitializing deployment

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

Ejemplo Respuesta

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

Autenticación

ClaveDescripciónDóndeEjemplo
Authorization

Su token web JSON.
Más información sobre los JWT

Headers

Bearer <JWT>

Ruta Parámetros

deployment_id
string
Requerido

The deployment ID

Respuestas
Tipo de contenido
application/json

The deployment.

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

The Deployment id

waba_id
string

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

country_code
string
ejemplo44

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

number
string
ejemplo7700900000

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

api_key
string
ejemploabcd1234

The API key associated with the deployment.

current_state
object

The current status of the deployment

title
string
ejemploINITIALIZING

The current status of the deployment.

Debe ser uno de:INITIALIZINGCREATING_CLUSTERCLUSTER_CREATEDCODE_SENTWRONG_CODECODE_VERIFIEDFINALIZINGREADYERRORDELETINGDELETED
detail
string
ejemploInitializing deployment

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

Ejemplo Respuesta

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

Autenticación

ClaveDescripciónDóndeEjemplo
Authorization

Su token web JSON.
Más información sobre los JWT

Headers

Bearer <JWT>

Ruta Parámetros

deployment_id
string
Requerido

The deployment ID

Respuestas

No Content

OTP

Verify or resend a One Time Password (OTP)

Operaciones 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

Autenticación

ClaveDescripciónDóndeEjemplo
Authorization

Su token web JSON.
Más información sobre los JWT

Headers

Bearer <JWT>

Ruta Parámetros

deployment_id
string
Requerido

The deployment ID

Cuerpo de la solicitud
Tipo de contenido
application/json

method
string
ejemplosms
Debe ser uno de:smsvoice

Ejemplo Solicitar

{
   "method": "sms"
}

Respuestas
Tipo de contenido
application/json

Code sent.

message
string
ejemploCode sent
vname
string
ejemployour vname
method
string
ejemplosms

The method the OTP resend will use.

Ejemplo Respuesta

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

Autenticación

ClaveDescripciónDóndeEjemplo
Authorization

Su token web JSON.
Más información sobre los JWT

Headers

Bearer <JWT>

Ruta Parámetros

deployment_id
string
Requerido

The deployment ID

Cuerpo de la solicitud
Tipo de contenido
application/json

code
string
ejemplo674639

OTP being submitted for verification

Ejemplo Solicitar

{
   "code": "674639"
}

Respuestas
Tipo de contenido
application/json

OK

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

the id of your deployment

status
string
ejemploDeployment was Created

Ejemplo Respuesta

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

Autenticación

ClaveDescripciónDóndeEjemplo
Authorization

Su token web JSON.
Más información sobre los JWT

Headers

Bearer <JWT>

Ruta Parámetros

deployment_id
string
Requerido

The deployment ID

Respuestas
Tipo de contenido
application/json

OK

about
string
Min1
Max139
ejemploabout your business

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

address
string
Min1
Max256
ejemplo123 main street

Your business address - max 256 characters.

description
string
Min1
Max256
ejemployour business description

a description of your business - max 256 characters

email
string
Min1
Max128
ejemployou@example.com

Your business' email - max 128 characters

vertical
string
ejemploFood and Grocery

Your business' industry - must be recognized by WhatsApp.

Debe ser uno de: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

Ejemplo Respuesta

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

Autenticación

ClaveDescripciónDóndeEjemplo
Authorization

Su token web JSON.
Más información sobre los JWT

Headers

Bearer <JWT>

Ruta Parámetros

deployment_id
string
Requerido

The deployment ID

Cuerpo de la solicitud
Tipo de contenido
application/json

about
string
Min1
Max139
ejemploabout your business

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

address
string
Min1
Max256
ejemplo123 main street

Your business address - max 256 characters.

description
string
Min1
Max256
ejemployour business description

a description of your business - max 256 characters

email
string
Min1
Max128
ejemployou@example.com

Your business' email - max 128 characters

vertical
string
ejemploFood and Grocery

Your business' industry - must be recognized by WhatsApp.

Debe ser uno de: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

Ejemplo Solicitar

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

Respuestas
Tipo de contenido
application/json

OK

about
string
Min1
Max139
ejemploabout your business

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

address
string
Min1
Max256
ejemplo123 main street

Your business address - max 256 characters.

description
string
Min1
Max256
ejemployour business description

a description of your business - max 256 characters

email
string
Min1
Max128
ejemployou@example.com

Your business' email - max 128 characters

vertical
string
ejemploFood and Grocery

Your business' industry - must be recognized by WhatsApp.

Debe ser uno de: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

Ejemplo Respuesta

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

Autenticación

ClaveDescripciónDóndeEjemplo
Authorization

Su token web JSON.
Más información sobre los JWT

Headers

Bearer <JWT>

Ruta Parámetros

deployment_id
string
Requerido

The deployment ID

Respuestas
Tipo de contenido
application/json

OK.

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

Url where the profile photo was pulled from

Ejemplo Respuesta

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

Autenticación

ClaveDescripciónDóndeEjemplo
Authorization

Su token web JSON.
Más información sobre los JWT

Headers

Bearer <JWT>

Ruta Parámetros

deployment_id
string
Requerido

The deployment ID

Cuerpo de la solicitud
Tipo de contenido
application/json

image_url
string
Requerido
ejemplohttps://www.example.com/img.png

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

Ejemplo Solicitar

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

Respuestas
Tipo de contenido
application/json

OK.

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

Url where the profile photo was pulled from

Ejemplo Respuesta

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

Autenticación

ClaveDescripciónDóndeEjemplo
Authorization

Su token web JSON.
Más información sobre los JWT

Headers

Bearer <JWT>

Ruta Parámetros

deployment_id
string
Requerido

The deployment ID

Respuestas
Tipo de contenido
application/json

Return list of available stickerpacks

stickerpacks
array
id
string
ejemplosticker-pack-id1

Ejemplo Respuesta

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

Autenticación

ClaveDescripciónDóndeEjemplo
Authorization

Su token web JSON.
Más información sobre los JWT

Headers

Bearer <JWT>

Ruta Parámetros

deployment_id
string
Requerido

The deployment ID

Cuerpo de la solicitud
Tipo de contenido
application/json

publisher
string
Requerido
ejemployour-publisher-name

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

name
string
Requerido
ejemployour-sticker-pack-name

The name of the stickerpack.

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

Ejemplo Solicitar

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

Respuestas
Tipo de contenido
application/json

A successful response

stickerpacks
array
id
string
ejemplosticker-pack-id1

Ejemplo Respuesta

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

Autenticación

ClaveDescripciónDóndeEjemplo
Authorization

Su token web JSON.
Más información sobre los JWT

Headers

Bearer <JWT>

Ruta Parámetros

deployment_id
string
Requerido

The deployment ID

Respuestas
Tipo de contenido
application/json

Return list of available stickerpacks

stickerpacks
array
id
string
ejemplosticker-pack-id1

Ejemplo Respuesta

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

Autenticación

ClaveDescripciónDóndeEjemplo
Authorization

Su token web JSON.
Más información sobre los JWT

Headers

Bearer <JWT>

Ruta Parámetros

deployment_id
string
Requerido

The deployment ID

stickerpack_id
string
Requerido

The stickerpack ID

Respuestas
Tipo de contenido
application/json

Return list of available stickerpacks

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

Ejemplo Respuesta

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

Autenticación

ClaveDescripciónDóndeEjemplo
Authorization

Su token web JSON.
Más información sobre los JWT

Headers

Bearer <JWT>

Ruta Parámetros

deployment_id
string
Requerido

The deployment ID

stickerpack_id
string
Requerido

The stickerpack ID

Respuestas
Tipo de contenido
application/json

Return list of available stickers

stickers
array
index
string
ejemplosticker-index1

Ejemplo Respuesta

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

Autenticación

ClaveDescripciónDóndeEjemplo
Authorization

Su token web JSON.
Más información sobre los JWT

Headers

Bearer <JWT>

Ruta Parámetros

deployment_id
string
Requerido

The deployment ID

stickerpack_id
string
Requerido

The stickerpack ID

Cuerpo de la solicitud
Tipo de contenido
application/json

image_data_id
string
Requerido
ejemploid

The ID for the sticker media.

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

An array of the emojis included in the stickerpack.

Ejemplo Solicitar

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

Respuestas
Tipo de contenido
application/json

Return an index of the sitcker

stickers
array
index
string
ejemplosticker-index1

Ejemplo Respuesta

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

Autenticación

ClaveDescripciónDóndeEjemplo
Authorization

Su token web JSON.
Más información sobre los JWT

Headers

Bearer <JWT>

Ruta Parámetros

deployment_id
string
Requerido

The deployment ID

stickerpack_id
string
Requerido

The stickerpack ID

sticker_index
string
Requerido

The sticker index

Respuestas
Tipo de contenido
application/json

Returns a sticker

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

Ejemplo Respuesta

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

Autenticación

ClaveDescripciónDóndeEjemplo
Authorization

Su token web JSON.
Más información sobre los JWT

Headers

Bearer <JWT>

Ruta Parámetros

deployment_id
string
Requerido

The deployment ID

stickerpack_id
string
Requerido

The stickerpack ID

sticker_index
string
Requerido

The sticker index

Respuestas
Tipo de contenido
application/json

Creates a sticker

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

Ejemplo Respuesta

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

Errores

La siguiente es una lista no exhaustiva de códigos de error que pueden producirse al utilizar esta API.

Estos códigos se suman a cualquiera de nuestros códigos de error genéricos.

CódigoInformación
number-in-use

Descripción

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

Resolución

Use the existing deployment.

invalid-json

Descripción

The request body did not contain valid JSON

Resolución

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

unprocessable

Descripción

Parameters were valid JSON but something was missing or wrongly formatted

Resolución

Fix the incorrect request parameters and try again

unprocessable-profile-update

Descripción

Parameters were valid JSON but something was missing or wrongly formatted

Resolución

Fix the incorrect request parameters and try again

throttled

Descripción

Too many requests have been made on this endpoint

Resolución

Wait a moment and try again

verification-failed

Descripción

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

Resolución

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

conflict-deployment-state

Descripción

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

Resolución

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

Descripción

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

Resolución

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