WhatsApp Provisioning API

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

OpenAPI-Spezifikation herunterladen

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

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr JSON-Web-Token.
Lesen Sie mehr über JWTs

Headers

Bearer <JWT>

Anfrage Körper
Inhalt Typ
application/json

country_code
string
Erforderlich
Beispiel44

The international dialing code of the number being provisioned

number
string
Erforderlich
Beispiel8675309

The WhatsApp number being provisioned.

vname_certificate
string
Erforderlich
BeispielAbCdEFGHiJK123456

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

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

method
string
Erforderlich
Beispielsms

The method for delivering the OTP

Muss eines der folgenden sein:smsvoice
waba_id
string
Erforderlich
Beispiel123456789123

WABA ID of the WhatsApp Number

pin
string
Beispiel123456

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

Beispiel Anfrage

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

Antworten
Inhalt Typ
application/json

Accepted.

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

The Deployment id

waba_id
string

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

country_code
string
Beispiel44

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

number
string
Beispiel7700900000

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

api_key
string
Beispielabcd1234

The API key associated with the deployment.

current_state
object

The current status of the deployment

title
string
BeispielINITIALIZING

The current status of the deployment.

Muss eines der folgenden sein:INITIALIZINGCREATING_CLUSTERCLUSTER_CREATEDCODE_SENTWRONG_CODECODE_VERIFIEDFINALIZINGREADYERRORDELETINGDELETED
detail
string
BeispielInitializing deployment

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

Beispiel Antwort

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

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr JSON-Web-Token.
Lesen Sie mehr über JWTs

Headers

Bearer <JWT>

Pfad Parameter

deployment_id
string
Erforderlich

The deployment ID

Antworten
Inhalt Typ
application/json

The deployment.

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

The Deployment id

waba_id
string

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

country_code
string
Beispiel44

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

number
string
Beispiel7700900000

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

api_key
string
Beispielabcd1234

The API key associated with the deployment.

current_state
object

The current status of the deployment

title
string
BeispielINITIALIZING

The current status of the deployment.

Muss eines der folgenden sein:INITIALIZINGCREATING_CLUSTERCLUSTER_CREATEDCODE_SENTWRONG_CODECODE_VERIFIEDFINALIZINGREADYERRORDELETINGDELETED
detail
string
BeispielInitializing deployment

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

Beispiel Antwort

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

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr JSON-Web-Token.
Lesen Sie mehr über JWTs

Headers

Bearer <JWT>

Pfad Parameter

deployment_id
string
Erforderlich

The deployment ID

Antworten

No Content

OTP

Verify or resend a One Time Password (OTP)

Verfügbare Operationen

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

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr JSON-Web-Token.
Lesen Sie mehr über JWTs

Headers

Bearer <JWT>

Pfad Parameter

deployment_id
string
Erforderlich

The deployment ID

Anfrage Körper
Inhalt Typ
application/json

method
string
Beispielsms
Muss eines der folgenden sein:smsvoice

Beispiel Anfrage

{
   "method": "sms"
}

Antworten
Inhalt Typ
application/json

Code sent.

message
string
BeispielCode sent
vname
string
Beispielyour vname
method
string
Beispielsms

The method the OTP resend will use.

Beispiel Antwort

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

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr JSON-Web-Token.
Lesen Sie mehr über JWTs

Headers

Bearer <JWT>

Pfad Parameter

deployment_id
string
Erforderlich

The deployment ID

Anfrage Körper
Inhalt Typ
application/json

code
string
Beispiel674639

OTP being submitted for verification

Beispiel Anfrage

{
   "code": "674639"
}

Antworten
Inhalt Typ
application/json

OK

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

the id of your deployment

status
string
BeispielDeployment was Created

Beispiel Antwort

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

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr JSON-Web-Token.
Lesen Sie mehr über JWTs

Headers

Bearer <JWT>

Pfad Parameter

deployment_id
string
Erforderlich

The deployment ID

Antworten
Inhalt Typ
application/json

OK

about
string
Min1
Max139
Beispielabout your business

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

address
string
Min1
Max256
Beispiel123 main street

Your business address - max 256 characters.

description
string
Min1
Max256
Beispielyour business description

a description of your business - max 256 characters

email
string
Min1
Max128
Beispielyou@example.com

Your business' email - max 128 characters

vertical
string
BeispielFood and Grocery

Your business' industry - must be recognized by WhatsApp.

Muss eines der folgenden sein: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

Beispiel Antwort

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

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr JSON-Web-Token.
Lesen Sie mehr über JWTs

Headers

Bearer <JWT>

Pfad Parameter

deployment_id
string
Erforderlich

The deployment ID

Anfrage Körper
Inhalt Typ
application/json

about
string
Min1
Max139
Beispielabout your business

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

address
string
Min1
Max256
Beispiel123 main street

Your business address - max 256 characters.

description
string
Min1
Max256
Beispielyour business description

a description of your business - max 256 characters

email
string
Min1
Max128
Beispielyou@example.com

Your business' email - max 128 characters

vertical
string
BeispielFood and Grocery

Your business' industry - must be recognized by WhatsApp.

Muss eines der folgenden sein: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

Beispiel Anfrage

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

Antworten
Inhalt Typ
application/json

OK

about
string
Min1
Max139
Beispielabout your business

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

address
string
Min1
Max256
Beispiel123 main street

Your business address - max 256 characters.

description
string
Min1
Max256
Beispielyour business description

a description of your business - max 256 characters

email
string
Min1
Max128
Beispielyou@example.com

Your business' email - max 128 characters

vertical
string
BeispielFood and Grocery

Your business' industry - must be recognized by WhatsApp.

Muss eines der folgenden sein: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

Beispiel Antwort

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

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr JSON-Web-Token.
Lesen Sie mehr über JWTs

Headers

Bearer <JWT>

Pfad Parameter

deployment_id
string
Erforderlich

The deployment ID

Antworten
Inhalt Typ
application/json

OK.

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

Url where the profile photo was pulled from

Beispiel Antwort

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

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr JSON-Web-Token.
Lesen Sie mehr über JWTs

Headers

Bearer <JWT>

Pfad Parameter

deployment_id
string
Erforderlich

The deployment ID

Anfrage Körper
Inhalt Typ
application/json

image_url
string
Erforderlich
Beispielhttps://www.example.com/img.png

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

Beispiel Anfrage

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

Antworten
Inhalt Typ
application/json

OK.

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

Url where the profile photo was pulled from

Beispiel Antwort

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

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr JSON-Web-Token.
Lesen Sie mehr über JWTs

Headers

Bearer <JWT>

Pfad Parameter

deployment_id
string
Erforderlich

The deployment ID

Antworten
Inhalt Typ
application/json

Return list of available stickerpacks

stickerpacks
array
id
string
Beispielsticker-pack-id1

Beispiel Antwort

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

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr JSON-Web-Token.
Lesen Sie mehr über JWTs

Headers

Bearer <JWT>

Pfad Parameter

deployment_id
string
Erforderlich

The deployment ID

Anfrage Körper
Inhalt Typ
application/json

publisher
string
Erforderlich
Beispielyour-publisher-name

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

name
string
Erforderlich
Beispielyour-sticker-pack-name

The name of the stickerpack.

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

Beispiel Anfrage

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

Antworten
Inhalt Typ
application/json

A successful response

stickerpacks
array
id
string
Beispielsticker-pack-id1

Beispiel Antwort

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

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr JSON-Web-Token.
Lesen Sie mehr über JWTs

Headers

Bearer <JWT>

Pfad Parameter

deployment_id
string
Erforderlich

The deployment ID

Antworten
Inhalt Typ
application/json

Return list of available stickerpacks

stickerpacks
array
id
string
Beispielsticker-pack-id1

Beispiel Antwort

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

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr JSON-Web-Token.
Lesen Sie mehr über JWTs

Headers

Bearer <JWT>

Pfad Parameter

deployment_id
string
Erforderlich

The deployment ID

stickerpack_id
string
Erforderlich

The stickerpack ID

Antworten
Inhalt Typ
application/json

Return list of available stickerpacks

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

Beispiel Antwort

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

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr JSON-Web-Token.
Lesen Sie mehr über JWTs

Headers

Bearer <JWT>

Pfad Parameter

deployment_id
string
Erforderlich

The deployment ID

stickerpack_id
string
Erforderlich

The stickerpack ID

Antworten
Inhalt Typ
application/json

Return list of available stickers

stickers
array
index
string
Beispielsticker-index1

Beispiel Antwort

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

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr JSON-Web-Token.
Lesen Sie mehr über JWTs

Headers

Bearer <JWT>

Pfad Parameter

deployment_id
string
Erforderlich

The deployment ID

stickerpack_id
string
Erforderlich

The stickerpack ID

Anfrage Körper
Inhalt Typ
application/json

image_data_id
string
Erforderlich
Beispielid

The ID for the sticker media.

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

An array of the emojis included in the stickerpack.

Beispiel Anfrage

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

Antworten
Inhalt Typ
application/json

Return an index of the sitcker

stickers
array
index
string
Beispielsticker-index1

Beispiel Antwort

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

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr JSON-Web-Token.
Lesen Sie mehr über JWTs

Headers

Bearer <JWT>

Pfad Parameter

deployment_id
string
Erforderlich

The deployment ID

stickerpack_id
string
Erforderlich

The stickerpack ID

sticker_index
string
Erforderlich

The sticker index

Antworten
Inhalt Typ
application/json

Returns a sticker

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

Beispiel Antwort

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

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr JSON-Web-Token.
Lesen Sie mehr über JWTs

Headers

Bearer <JWT>

Pfad Parameter

deployment_id
string
Erforderlich

The deployment ID

stickerpack_id
string
Erforderlich

The stickerpack ID

sticker_index
string
Erforderlich

The sticker index

Antworten
Inhalt Typ
application/json

Creates a sticker

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

Beispiel Antwort

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

Fehler

Im Folgenden finden Sie eine nicht erschöpfende Liste von Fehlercodes, die bei der Verwendung dieser API auftreten können.

Diese Codes gelten zusätzlich zu unseren generische Fehlercodes.

CodeInformationen
number-in-use

Beschreibung

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

Auflösung

Use the existing deployment.

invalid-json

Beschreibung

The request body did not contain valid JSON

Auflösung

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

unprocessable

Beschreibung

Parameters were valid JSON but something was missing or wrongly formatted

Auflösung

Fix the incorrect request parameters and try again

unprocessable-profile-update

Beschreibung

Parameters were valid JSON but something was missing or wrongly formatted

Auflösung

Fix the incorrect request parameters and try again

throttled

Beschreibung

Too many requests have been made on this endpoint

Auflösung

Wait a moment and try again

verification-failed

Beschreibung

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

Auflösung

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

conflict-deployment-state

Beschreibung

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

Auflösung

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

Beschreibung

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

Auflösung

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