post
https://partner.gupshup.io/partner//auth/revoke
Revokes one Universal Token.
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
Description
- Supply exactly one of id, name, or token.
- Name resolves to the caller's own token only (name uniqueness is per admin, not per partner).
- Revoking one UT by id/name/token does not cascade to UATs minted from it.
Rate limit
30 requests / 60 seconds.
API Request
By id
curl --location --request POST 'https://partner.gupshup.io/partner/{{PARTNER_ID}}/auth/revoke' \
--header 'Authorization: {{UNIVERSAL_TOKEN}}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'id=row-id-789'By name
curl --location --request POST 'https://partner.gupshup.io/partner/{{PARTNER_ID}}/auth/revoke' \
--header 'Authorization: {{UNIVERSAL_TOKEN}}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'name=prod-automation'By token
curl --location --request POST 'https://partner.gupshup.io/partner/{{PARTNER_ID}}/auth/revoke' \
--header 'Authorization: {{UNIVERSAL_TOKEN}}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'token=eyJhbGciOiJSUzI1NiJ9...'Response
| Status Code | Response | Comments |
|---|---|---|
| 200 | { "status": "success", "scope": "id" } | Success. scope is id, name, or jti depending on the input used. |
| 400 | { "status": "error", "message": "supply exactly one of id, token, name" } | None or more than one of id / token / name supplied. |
| 400 | { "status": "error", "message": "invalid token format" } | token could not be parsed. |
| 400 | { "status": "error", "message": "token missing jti claim" } | Parsed JWT has no usable jti. |
| 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": "token not found" } | No matching token for this partner / caller (also used for cross-partner probes). |
| 410 | { "status": "error", "message": "token has already expired; nothing to revoke" } | Token already naturally expired. |
| 429 | { "status": "error", "message": "Too Many Requests" } | More than 30 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. |
Request Parameters
| Key | Description | Values | Data Type | Required / Optional | Constraints |
|---|---|---|---|---|---|
| Authorization | Caller credential | {{UNIVERSAL_TOKEN}} | String | Required | |
| partnerId | Partner ID (path) | e.g. 8814 | Integer | Required | Must match authenticated partner. |
| id | Token row id | from list API | String | Exactly one of id/token/name | Scoped to this partner. |
| name | Token label | prod-automation | String | Exactly one of id/token/name | Resolves to caller's own active token only. |
| token | Raw UT JWT | JWT string | String | Exactly one of id/token/name | sub must equal partnerId. |