As rotas de Números. Todo corpo é JSON, e o erro sempre volta como um objeto com código e mensagem.
GET
/v1/numbers
List connected numbers
All WhatsApp numbers connected to the account, oldest first, with the status Meta reports for each one (quality rating, messaging limit, throughput, health). Numbers are connected in the developer console through Meta's Embedded Signup; there is no API to connect one.
Resposta (object[])
- idstringObrigatório
- Zaiped id (whatsappConnections)
- status"active" | "incomplete" | "needs_reauth"Obrigatório
- phoneNumberIdstringObrigatório
- wabaIdstringObrigatório
- displayPhoneNumberstring
- verifiedNamestring
- qualityRatingstring
- messagingLimitstring
- throughputLevelstring
- healthStatusstring
- nameStatusstring
- isOfficialAccountboolean
- isOnBizAppboolean
- lastNoticeobject
- lastSyncedAtnumber
curl -X GET "https://zaiped.com/v1/numbers" \
-H "Authorization: Bearer zp_..."
GET
/v1/numbers/{numberId}
Get a connected number
Parâmetros de caminho
- numberIdstringObrigatório
- The number id, as returned by list_numbers.
Resposta (object)
- idstringObrigatório
- Zaiped id (whatsappConnections)
- status"active" | "incomplete" | "needs_reauth"Obrigatório
- phoneNumberIdstringObrigatório
- wabaIdstringObrigatório
- displayPhoneNumberstring
- verifiedNamestring
- qualityRatingstring
- messagingLimitstring
- throughputLevelstring
- healthStatusstring
- nameStatusstring
- isOfficialAccountboolean
- isOnBizAppboolean
- lastNoticeobject
- lastSyncedAtnumber
curl -X GET "https://zaiped.com/v1/numbers/YOUR_NUMBER_ID" \
-H "Authorization: Bearer zp_..."
GET
/v1/numbers/{numberId}/profile
Get the business profile
The WhatsApp Business profile of the number, read live from Meta.
Parâmetros de caminho
- numberIdstringObrigatório
- The number id, as returned by list_numbers.
Resposta (object)
- aboutstringObrigatório
- addressstringObrigatório
- descriptionstringObrigatório
- emailstringObrigatório
- websitesstring[]Obrigatório
- verticalstringObrigatório
- pictureUrlstring
curl -X GET "https://zaiped.com/v1/numbers/YOUR_NUMBER_ID/profile" \
-H "Authorization: Bearer zp_..."
PUT
/v1/numbers/{numberId}/profile
Update the business profile
Replaces the profile fields. Send every field: an empty string clears it (except `about`, which Meta keeps when empty). The picture is changed in the console.
Parâmetros de caminho
- numberIdstringObrigatório
- The number id, as returned by list_numbers.
Corpo da requisição
- aboutstringObrigatório
- addressstringObrigatório
- descriptionstringObrigatório
- emailstringObrigatório
- websitesstring[]Obrigatório
- verticalstringObrigatório
Resposta (object)
- oktrueObrigatório
curl -X PUT "https://zaiped.com/v1/numbers/YOUR_NUMBER_ID/profile" \
-H "Authorization: Bearer zp_..." \
-H "Content-Type: application/json" \
-d '{
"about": "…",
"address": "…",
"description": "…",
"email": "…",
"websites": [],
"vertical": "…"
}'GET
/v1/numbers/{numberId}/automation
Get conversational components
Welcome message, ice-breaker prompts and slash commands (Meta's conversational automation).
Parâmetros de caminho
- numberIdstringObrigatório
- The number id, as returned by list_numbers.
Resposta (object)
- welcomeEnabledbooleanObrigatório
- promptsstring[]Obrigatório
- commandsobject[]Obrigatório
curl -X GET "https://zaiped.com/v1/numbers/YOUR_NUMBER_ID/automation" \
-H "Authorization: Bearer zp_..."
PUT
/v1/numbers/{numberId}/automation
Update conversational components
Replaces the whole configuration: Meta substitutes, it does not merge.
Parâmetros de caminho
- numberIdstringObrigatório
- The number id, as returned by list_numbers.
Corpo da requisição
- welcomeEnabledbooleanObrigatório
- promptsstring[]Obrigatório
- commandsobject[]Obrigatório
Resposta (object)
- oktrueObrigatório
curl -X PUT "https://zaiped.com/v1/numbers/YOUR_NUMBER_ID/automation" \
-H "Authorization: Bearer zp_..." \
-H "Content-Type: application/json" \
-d '{
"welcomeEnabled": true,
"prompts": [],
"commands": []
}'GET
/v1/numbers/{numberId}/qr-codes
List QR codes
Parâmetros de caminho
- numberIdstringObrigatório
- The number id, as returned by list_numbers.
Resposta (object[])
- codestringObrigatório
- messagestringObrigatório
- deepLinkstringObrigatório
- imageUrlstring
curl -X GET "https://zaiped.com/v1/numbers/YOUR_NUMBER_ID/qr-codes" \
-H "Authorization: Bearer zp_..."
POST
/v1/numbers/{numberId}/qr-codes
Create a QR code with a prefilled message
Parâmetros de caminho
- numberIdstringObrigatório
- The number id, as returned by list_numbers.
Corpo da requisição
- messagestringObrigatório
Resposta (object)
- codestringObrigatório
- messagestringObrigatório
- deepLinkstringObrigatório
- imageUrlstring
curl -X POST "https://zaiped.com/v1/numbers/YOUR_NUMBER_ID/qr-codes" \
-H "Authorization: Bearer zp_..." \
-H "Content-Type: application/json" \
-d '{
"message": "…"
}'DELETE
/v1/numbers/{numberId}/qr-codes/{code}
Delete a QR code
Parâmetros de caminho
- numberIdstringObrigatório
- The number id, as returned by list_numbers.
- codestringObrigatório
- The QR code, as returned by list_qr_codes.
Resposta (object)
- oktrueObrigatório
curl -X DELETE "https://zaiped.com/v1/numbers/YOUR_NUMBER_ID/qr-codes/YOUR_CODE" \
-H "Authorization: Bearer zp_..."
GET
/v1/numbers/{numberId}/calling
Get voice calling settings
Parâmetros de caminho
- numberIdstringObrigatório
- The number id, as returned by list_numbers.
Resposta (object)
- enabledbooleanObrigatório
- iconVisiblebooleanObrigatório
curl -X GET "https://zaiped.com/v1/numbers/YOUR_NUMBER_ID/calling" \
-H "Authorization: Bearer zp_..."
PUT
/v1/numbers/{numberId}/calling
Enable or disable voice calling
Turns the WhatsApp Calling API on or off for the number. Calls themselves are placed from a browser (WebRTC) and have no REST route.
Parâmetros de caminho
- numberIdstringObrigatório
- The number id, as returned by list_numbers.
Corpo da requisição
- enabledbooleanObrigatório
Resposta (object)
- oktrueObrigatório
curl -X PUT "https://zaiped.com/v1/numbers/YOUR_NUMBER_ID/calling" \
-H "Authorization: Bearer zp_..." \
-H "Content-Type: application/json" \
-d '{
"enabled": true
}'