post
https://partner.hupshup.io/partner/app//coex/sync
Initiates one-time synchronization for the app.
- Use
syncType=smb_app_state_syncto initiate contacts synchronization. On success,smb_app_state_syncwebhooks are triggered for current contacts and future contact updates. - Use
syncType=historyto initiate message history synchronization. If the business has shared history,historywebhooks are triggered.
Important:
- This step can be performed only once.
- To perform again, customer must offboard and complete Embedded Signup again.
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
CoEx Event Guide
https://partner-docs.gupshup.io/update/docs/coexistence-events
Description
- Method/path: POST /app/:appId/coex/sync (optional trailing slash supported).
- Full URL segment: BASE_URL/partner/app/:appId/coex/sync (context path /partner, controller prefix /app).
- Auth: Role PARTNER_APP (see Authentication above).
- Content-Type: application/x-www-form-urlencoded.
- Rate limit: 10 requests per 60 seconds
Note:
Both smb_app_state_sync and history synchronization can be triggered only once, and must be initiated within 24 hours of onboarding.
Request example
Contacts sync (smb_app_state_sync):
curl --location --request POST '{{BASE_URL}}/partner/app/{{APP_ID}}/coex/sync' \
--header 'Authorization: Bearer {{PARTNER_APP_TOKEN}}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'syncType=smb_app_state_sync'Message history sync (history):
curl --location --request POST '{{BASE_URL}}/partner/app/{{APP_ID}}/coex/sync' \
--header 'Authorization: Bearer {{PARTNER_APP_TOKEN}}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'syncType=history'Steps to use this API
- Make the API call with the desired syncType
- Then you will receive an event from Meta on the webhook as mentioned in the document here
Purpose of Request ID
The request ID is from meta. If you don't receive the respective event after the API call from meta, then this ID can be used to raise the missing event issue with meta.
Response example
Success
{
"data": {
"messaging_product": "whatsapp",
"request_id": "<REQUEST_ID>"
},
"status": "success"
}Sync modes (syncType):
| Value | Purpose |
|---|---|
| smb_app_state_sync | Initiates contacts synchronization. On success, smb_app_state_sync webhooks describe current WhatsApp Business App contacts; future contact changes trigger further webhooks. |
| history | Initiates message history synchronization. If the business opts to share history, history webhooks describe messages in the agreed time range. |
Request parameters
| Key | Description | Values | Data type | Required / optional | Constraints |
|---|---|---|---|---|---|
| Path | |||||
| appId | WhatsApp / Partner app identifier | UUID or app id string | String | Required | Must be an app linked to the authenticated partner; portal checks access before proxying. |
| Headers | |||||
| Authorization | Partner App token | Bearer {{Partner App JWT}} or allowed alternatives per route (sk_, hardened JWT, etc.) | String | Required | Must satisfy @Authenticated + PARTNER_APP. |
| Content-Type | Media type | application/x-www-form-urlencoded | String | Required | Form body carries syncType. |
| Body (form) | |||||
| syncType | Sync mode | smb_app_state_sync \ history | String | Required | Case-insensitive match; other values → 400 with message syncType must be smb_app_state_sync or history. |
Status codes
| Status code | Meaning | Comments |
|---|---|---|
| 200 | Success | Body and semantics mirror the upstream WASS response when the proxy call succeeds (e.g. shape above). |
| 400 | Bad Request | Missing/invalid syncType; app not linked to partner; missing API key for app; invalid parameter from portal validation. |
| 401 | Unauthorized | Missing or invalid authentication for Partner App route. |
| 403 | Forbidden | Caller lacks PARTNER_APP or relevant permissions. |
| 429 | Too many requests | Rate limit exceeded (10 / 60s for this route). |
| 4xx/5xx | Upstream or client error | When WASS returns a non-success, the portal passes through status and body via the same helper used for other WhatsApp proxies. |
| 500 | Internal server error | Unexpected failure in portal after proxy or unhandled exception. |