Approve or reject app-link request

Approve or reject a pending app-link request. APPROVE performs the app-partner link; REJECT does not.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Approves or rejects a PENDING app-link request for {partnerId}. APPROVE performs the actual app–partner link. Request id and action are both in the JSON body.

API Request--Approve

curl --location --request POST 'https://partner.gupshup.io/partner/{{PARTNER_ID}}/app-link/status' \
--header 'token: {{PARTNER_TOKEN}}' \
--header 'Content-Type: application/json' \
--data '{"id": "b3f1e2a0-6c4d-4e8a-9c1a-2f6d8e0a1b2c", "action": "APPROVE"}'

API Request--Reject


curl --location --request POST 'https://partner.gupshup.io/partner/{{PARTNER_ID}}/app-link/status' \
--header 'token: {{PARTNER_TOKEN}}' \
--header 'Content-Type: application/json' \
--data '{"id": "b3f1e2a0-6c4d-4e8a-9c1a-2f6d8e0a1b2c", "action": "REJECT"}'

Response:


Status CodeResponseComments
200{ "id": "b3f1e2a0-6c4d-4e8a-9c1a-2f6d8e0a1b2c", "appId": "app_xyz123", "appName": "My App", "customerId": "cust_1", "customerIdentifier": "[email protected]", "partnerId": 8814, "status": "APPROVED", "requestedAt": 1783053048000, "expiresAt": 1785645048000, "decidedAt": 1783054000000, "decidedByEmail": "[email protected]" }Success. status is APPROVED or REJECTED.
400{ "status": "error", "message": "action is required" }Request body null or action field null.
400{ "status": "error", "message": "id is required" }id missing or blank.
400{ "status": "error", "message": "Invalid request body." }Malformed JSON body.
400{ "status": "error", "message": "Invalid request body: ..." }JSON parse/deserialization failure (e.g. invalid action enum value).
400{ "status": "error", "message": "App details not found for appId: {appId}" }APPROVE only — SS returned no app details for the request's appId.
400{ "status": "error", "message": "App is already linked to Partner" }APPROVE only — app is in partner_apps under a different partner id than requested (cross-partner guard).
400{ "status": "error", "message": "This app has been previously mapped to a different partner ID, kindly use the correct Partner ID" }APPROVE onlyAPP_LINK event history indicates a different prior partner.
400{ "status": "error", "message": "The partner you are trying to add may not be an approved partner by Gupshup" }APPROVE only — partner legal details missing or not approved.
400{ "status": "error", "message": "Re-linking of application is not allowed. App was created by partner." }APPROVE only — app already linked to another partner and was partner-created.
400{ "status": "error", "message": "Re-linking of application to same partner is not allowed." }APPROVE only — app already linked to this partner.
401{ "status": "error", "message": "Unauthorised access to the resource. Please review request parameters and headers and retry" }Missing/invalid authentication.
403{ "status": "error", "message": "Forbidden Access" }Path partnerId mismatch or not PARTNER_ADMIN.
404{ "status": "error", "message": "No app link request found for id: {id}" }Unknown id or row belongs to another partner.
409{ "status": "error", "message": "Request is not PENDING (status={STATUS})" }Row is not PENDING after lazy expiry (e.g. APPROVED, REJECTED, EXPIRED).
429{ "status": "error", "message": "Too Many Requests" }More than 10 requests / 60 seconds.
500{ "status": "error", "message": "Internal server error. Please try again later and If Issue still persist then contact Gupshup Dev Support" }Unexpected server failure (includes uncaught errors during link side effects)

Request Parameters:


KeyDescriptionValuesData TypeRequired / OptionalConstraints
tokenPartner token credential{{PARTNER_TOKEN}}StringRequiredSee §1.
partnerIdPartner ID (path)e.g. 8814IntegerRequiredMust match authenticated partner context.
idApp-link request row idUUID stringStringRequiredpartner_app_link_request.idnot the appId.
actionDecisionAPPROVE, REJECTString (enum)RequiredCase-sensitive enum name in JSON.
Path Params
int32
required
Body Params

Request to approve or reject an app linking request

string
required

The app-link request id (not the appId)

string
enum
required

The decision action (APPROVE or REJECT)

Allowed:
Responses

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