---
title: "Initiate Contacts/History Synchronization"
method: POST
path: "/app/{appId}/coex/sync"
tags: ["Partner Linked Application"]
---

# Initiate Contacts/History Synchronization

`POST /app/{appId}/coex/sync`

## Request

- Base URL: `https://partner.hupshup.io/partner`
- URL: `https://partner.hupshup.io/partner/app/{appId}/coex/sync`
- Auth: API key in header `Authorization`

Initiates one-time synchronization for the app.

- Use `syncType=smb_app_state_sync` to initiate contacts synchronization. On success, `smb_app_state_sync` webhooks are triggered for current contacts and future contact updates.
- Use `syncType=history` to initiate message history synchronization. If the business has shared history, `history` webhooks are triggered.

Important:
- This step can be performed only once.
- To perform again, customer must offboard and complete Embedded Signup again.

## Path parameters

- `appId` string, required

## Request body `application/x-www-form-urlencoded`

- object
  - `syncType` 'smb_app_state_sync' | 'history', required: Synchronization mode

## Response `200`

Sync request accepted successfully

- object
  - `data` object, required
    - `messaging_product` string, required
    - `request_id` string, required: Identifier for the sync request
  - `status` string, required

## Other responses

- `400`: Bad request (invalid/missing syncType, invalid app)
- `401`: Unauthorized (missing/invalid Authorization header)
- `403`: Forbidden (no permission for app)
- `500`: Internal server error

---

[API](https://skmtc.dev/gupshup/apis/partner-coex-sync-api.md) - [All operations](https://skmtc.dev/gupshup/apis/partner-coex-sync-api/llms.txt) - [OpenAPI document](https://skmtc.dev/gupshup/apis/partner-coex-sync-api/revisions/bcd5b0a9bbc1?raw)
