---
updatedAt: 2026-07-29T06:48:12.000Z
agentTools:
  projectIndex: https://partner-docs.gupshup.io/llms.txt
---

# Revoke Universal Token (by id / name / token)

Revokes one Universal Token.

# Description

1. Supply exactly one of id, name, or token.
2. Name resolves to the caller's own token only (name uniqueness is per admin, not per partner).
3. Revoking one UT by id/name/token does not cascade to UATs minted from it.&#x20;

# Rate limit

30 requests / 60 seconds.

<br />

# API Request

## By id

```curl
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
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
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...'
```

<br />

# 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`.               |

<br />

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Universal Token (UT) APIs",
    "description": "These APIs provide interfaces for partners to create and manage Universal Tokens (UT) that can be used for secure partner authentication and integration.\nA UT is a CAS-signed partner-scoped JWT (tt=UT). It authenticates as the partner across Partner Portal APIs, can live for up to 60 days,\nand is required as the Bearer token when minting Universal App Tokens (UAT).\nPrerequisite: Generate a client secret via POST /partner/auth/clients/generate (shown once). The secret is checked only at UT mint time.\n",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://partner.gupshup.io"
    }
  ],
  "tags": [
    {
      "name": "Universal Token",
      "description": "Mint, list, and revoke Universal Tokens"
    }
  ],
  "paths": {
    "/partner/{partnerId}/auth/revoke": {
      "post": {
        "tags": [
          "Universal Token"
        ],
        "summary": "Revoke Universal Token (by id / name / token)",
        "description": "Revokes one Universal Token.",
        "operationId": "revokeUniversalToken",
        "parameters": [
          {
            "$ref": "#/components/parameters/PartnerIdPath"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/RevokeTokenRequest"
              },
              "examples": {
                "byId": {
                  "summary": "Revoke by row id",
                  "value": {
                    "id": "row-id-789"
                  }
                },
                "byName": {
                  "summary": "Revoke by token label",
                  "value": {
                    "name": "prod-automation"
                  }
                },
                "byToken": {
                  "summary": "Revoke by raw UT JWT",
                  "value": {
                    "token": "eyJhbGciOiJSUzI1NiJ9..."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RevokeSuccessResponse"
                },
                "example": {
                  "status": "success",
                  "scope": "id"
                }
              }
            }
          },
          "400": {
            "description": "Validation or business error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "notExactlyOne": {
                    "summary": "None or more than one of id / token / name supplied",
                    "value": {
                      "status": "error",
                      "message": "supply exactly one of id, token, name"
                    }
                  },
                  "invalidTokenFormat": {
                    "summary": "token could not be parsed",
                    "value": {
                      "status": "error",
                      "message": "invalid token format"
                    }
                  },
                  "missingJti": {
                    "summary": "Parsed JWT has no usable jti",
                    "value": {
                      "status": "error",
                      "message": "token missing jti claim"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized access - missing or invalid authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "status": "error",
                  "message": "Unauthorised access to the resource. Please review request parameters and headers and retry"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden access - path partnerId mismatch or caller is not PARTNER_ADMIN",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "status": "error",
                  "message": "Forbidden Access"
                }
              }
            }
          },
          "404": {
            "description": "No matching token for this partner / caller (also used for cross-partner probes)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "status": "error",
                  "message": "token not found"
                }
              }
            }
          },
          "410": {
            "description": "Token already naturally expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "status": "error",
                  "message": "token has already expired; nothing to revoke"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded - more than 30 requests / 60 seconds",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "status": "error",
                  "message": "Too Many Requests"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "status": "error",
                  "message": "Internal server error. Please try again later and If Issue still persist then contact Gupshup Dev Support"
                }
              }
            }
          }
        },
        "security": [
          {
            "UniversalToken": []
          }
        ]
      }
    }
  },
  "components": {
    "parameters": {
      "PartnerIdPath": {
        "name": "partnerId",
        "in": "path",
        "description": "Partner ID. Must match the partner resolved from email (mint),\nor the authenticated partner context (list and revoke).\n",
        "required": true,
        "schema": {
          "type": "integer",
          "format": "int64",
          "example": 8814
        }
      }
    },
    "schemas": {
      "RevokeTokenRequest": {
        "type": "object",
        "description": "Supply exactly one of id, name, or token.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Token row id from the list API. Scoped to this partner.",
            "example": "row-id-789"
          },
          "name": {
            "type": "string",
            "description": "Token label. Resolves to the caller's own active token only.",
            "example": "prod-automation"
          },
          "token": {
            "type": "string",
            "description": "Raw UT JWT. Its sub claim must equal partnerId.",
            "example": "eyJhbGciOiJSUzI1NiJ9..."
          }
        },
        "oneOf": [
          {
            "required": [
              "id"
            ]
          },
          {
            "required": [
              "name"
            ]
          },
          {
            "required": [
              "token"
            ]
          }
        ]
      },
      "RevokeSuccessResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "example": "success"
          },
          "scope": {
            "type": "string",
            "description": "Which input was used to resolve the token.",
            "enum": [
              "id",
              "name",
              "jti"
            ],
            "example": "id"
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "example": "error"
          },
          "message": {
            "type": "string",
            "description": "Human-readable error detail. Omitted on the 401 returned by the mint API (no email enumeration).",
            "example": "Error description"
          }
        }
      }
    },
    "securitySchemes": {
      "UniversalToken": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header",
        "description": "Caller credential in the form \"Bearer {{UNIVERSAL_TOKEN}}\".\nAccepts a UT Bearer, a Partner UI session, or a Partner token with PARTNER_ADMIN.\n"
      }
    }
  }
}
```