Webhook
To configure the workspace webhook, access: https://studio.posit.us/workspace/configuracoes Every event delivered to your webhook follows the same envelope: anevent field with the event name, a workspace object identifying the source workspace, and an object with the resource related to the event (number, template, etc.). Delivery is done via HTTP POST.
workspace object
| Field | Description |
|---|---|
| id | Workspace identifier (UUID) |
| provider | Workspace provider: { "id", "name" } |
| type_workspace | Workspace type: { "id", "name" } (Receptive / Prospect) |
| name | Workspace name |
| business_id | Business Manager ID on Meta |
| waba_id | WABA ID on Meta |
Phone number quality classification
Receive in your webhook the quality of each WhatsApp number in order to maintain better integration with your CRM, thus improving the management quality of your numbers.- Undefined: not yet classified
- Green: high quality
- Yellow: medium quality
- Red: low quality
Number events
| Event Type | Description |
|---|---|
| phone_number_status_update | Sent in real time whenever the status, quality classification (quality_rating) or messaging limit (messaging_limit) of the number is updated. |
| phone_number_quality_update | Sent during the periodic synchronization of numbers. Uses a flat payload format (see the example below). |
| phone_number_sync | Sent during the periodic synchronization, reflecting the current state of the number. |
Number status
| Number status | Description |
|---|---|
| 1 | Number awaiting approval |
| 2 | Number awaiting server creation |
| 3 | Number awaiting server authentication |
| 4 | Number awaiting server installation |
| 5 | Number awaiting server configuration |
| 6 | Number awaiting activation |
| 7 | Active number |
| 8 | Inactive number |
| 9 | Deleted number |
| 10 | Awaiting migration to Cloud Api |
| 11 | Number awaiting server reboot |
| 12 | Number awaiting activation completion by the user |
| 13 | Banned number |
| 14 | Number awaiting restoration |
| 15 | Transferred number |
Quality status (quality_status)
| ID | Code |
|---|---|
| 0 | UNKNOWN |
| 1 | CONNECTED |
| 2 | FLAGGED |
| 3 | MIGRATED |
Quality classification (quality_rating)
| ID | Quality classification description |
|---|---|
| 0 | UNKNOWN |
| 1 | GREEN |
| 2 | YELLOW |
| 3 | RED |
Messaging limit (messaging_limit)
| ID | amount | formatted_amount |
|---|---|---|
| 0 | UNKNOWN | Unknown |
| 1 | 1000 | 1.000 |
| 2 | 10000 | 10.000 |
| 3 | 100000 | 100.000 |
| 4 | UNLIMITED | Unlimited |
| 5 | 50 | 50 |
| 6 | 250 | 250 |
| 7 | 2000 | 2.000 |
Example payload — phone_number_status_update
Example payload — phone_number_quality_update
The synchronization event uses a flat payload format, with the Business Manager limits at the number level and quality_rating as text.
Template message
Receive template approval notifications through your webhook. Themessage_template_status_update event is sent whenever the approval status of a template is changed.
Template status
| ID | Code (code) | Description |
|---|---|---|
| 0 | UNDEFINED | Undefined |
| 1 | PENDING | Pending |
| 2 | APPROVED | Approved |
| 3 | REJECTED | Rejected |
| 4 | IN_APPEAL | In appeal |
| 5 | PENDING_DELETION | Pending deletion |
| 6 | DELETED | Deleted |
| 7 | DISABLED | Disabled |
| 8 | FLAGGED | Flagged |
| 9 | REINSTATED | Reinstated |
| 10 | PAUSED | Paused |
| 11 | PAUSED | Paused |