Migrate templates from another WABA

  • Copies the approved templates of another WABA (for example, your previous BSP's WABA) onto this app's WABA.
  • The destination is always the app's own WABA; you pass only the source WABA id.
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
📘

Which templates are migrated

Both WABAs must belong to the same Meta business. Only templates with status APPROVED and quality GREEN or UNKNOWN are migrated.

🚧

Rate limit

1 request per 5 minutes per app.

🚧

Long-running call

The call is synchronous and can take up to 180 seconds. Set your client timeout to at least that. It is never retried automatically.

API Request

curl --location --request POST 'https://partner.gupshup.io/partner/app/{{APP_ID}}/template/migrate' \
  --header 'Authorization: {{PARTNER_APP_TOKEN}}' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode 'sourceWabaId={{SOURCE_WABA_ID}}'

Path parameters

ParameterTypeRequiredDescription
appIdStringYesDestination app. Its WABA receives the templates. The app must belong to you and have a WABA.

Request Headers

HeaderRequiredValue
AuthorizationYesPartner App token of the destination app
Content-TypeYesapplication/x-www-form-urlencoded

Request Body

ParameterTypeRequiredDescription
sourceWabaIdStringYesWABA id to migrate the templates from. Must not be blank, must differ from the app's own WABA, and must belong to the same Meta business.

API Response

{
    "migratedCount": 6,
    "failedCount": 1,
    "status": "success"
}

If Meta fails after the first page, the response is still 200 and also carries error:

{
    "migratedCount": 200,
    "failedCount": 0,
    "error": "<Meta error message>",
    "status": "success"
}

Response Headers

HeaderValue
Content-Typeapplication/json

Response Body

ParameterTypeDescription
migratedCountIntegerNumber of templates migrated.
failedCountIntegerNumber of templates Meta could not migrate.
errorStringPresent only when Meta failed after the first page (partial migration).
statusStringAPI request status (success).

Error Responses

StatusWhenResponse body
400sourceWabaId not sent{"status": "error", "message": "Required request parameter 'sourceWabaId' for method parameter type String is not present"}
400sourceWabaId blank or whitespace only{"status": "error", "message": "sourceWabaId is required"}
400The app has no WABA{"status": "error", "message": "WABA not found for the app"}
400sourceWabaId is the app's own WABA{"status": "error", "message": "Source and destination WABA can not be same"}
400Source WABA unknown, or not in the same Meta business{"status": "error", "message": "Caller is not authorized to access the source WABA."}
401Missing or invalid token, or not this app's Partner App token (doesn't count against the rate limit){"status": "error", "message": "Unauthorised access to the resource. Please review request parameters and headers and retry"}
405Wrong HTTP method (e.g. GET, PUT){"status": "error", "message": "Request method 'GET' is not supported"}
415Body sent as JSON{"status": "error", "message": "Content-Type 'application/json' is not supported"}
415No Content-Type header{"status": "error", "message": "Content-Type 'application/octet-stream' is not supported"}
429More than 1 authenticated request in 5 minutes for this app{"status": "error", "message": "Too Many Requests"}
Path Params
string
required

Destination app. Its WABA receives the templates. The app must belong to you and have a WABA.

Form Data
string
required

WABA id to migrate the templates from. Must not be blank, must differ from the app's own WABA, and must belong to the same Meta business.

Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json