---
updatedAt: 2026-09-17T14:41:04.000Z
agentTools:
  projectIndex: https://partner-docs.gupshup.io/llms.txt
---

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

Revokes one UAT for the app. Supply exactly one of id, name, or token (raw JWT value).

# Description

1. Revoking a UAT never affects the UT that minted it.
2. No email is sent on UAT revoke.&#x20;

# Rate limit

10 requests / 60 seconds

<br />

# API Request

## By id

```curl
curl --location --request POST 'https://partner.gupshup.io/partner/app/{{APP_ID}}/token/revoke' \
--header 'Authorization: Bearer {{UNIVERSAL_TOKEN}}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'id=6f2c9e1a-...'
```

## By name

```curl
curl --location --request POST 'https://partner.gupshup.io/partner/app/{{APP_ID}}/token/revoke' \
--header 'Authorization: Bearer {{UNIVERSAL_TOKEN}}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'name=webhook-service'
```

## By token

```curl
curl --location --request POST 'https://partner.gupshup.io/partner/app/{{APP_ID}}/token/revoke' \
--header 'Authorization: Bearer {{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": "Partner is not authorized" }`                                                                                 | App not linked to the authenticated partner.                             |
| 400         | `{ "status": "error", "message": "invalid token format" }`                                                                                      | `token` could not be parsed.                                             |
| 400         | `{ "status": "error", "message": "token is not a valid app token" }`                                                                            | JWT is not an AT (`tt=AT`) or missing `jti`.                             |
| 401         | `{ "status": "error", "message": "Unauthorised access to the resource. Please review request parameters and headers and retry" }`               | Missing/invalid authentication.                                          |
| 404         | `{ "status": "error", "message": "token not found" }`                                                                                           | No matching UAT for this app (also used when raw token `sub` ≠ `appId`). |
| 410         | `{ "status": "error", "message": "token has already expired; nothing to revoke" }`                                                              | Token already naturally 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.                                               |

# Request Parameters

| Key           | Description          | Values                       | Data Type | Required / Optional          | Constraints                             |
| ------------- | -------------------- | ---------------------------- | --------- | ---------------------------- | --------------------------------------- |
| Authorization | Universal Token (UT) | `Bearer {{UNIVERSAL_TOKEN}}` | String    | Required                     | Must be a verified UT Bearer.           |
| appId         | App ID (path)        | UUID                         | String    | Required                     | Must be linked to the caller's partner. |
| id            | Token row id         | from list API                | String    | Exactly one of id/token/name | Must belong to this `appId`.            |
| name          | Token label          | webhook-service              | String    | Exactly one of id/token/name | Must match an active UAT for this app.  |
| token         | Raw UAT JWT          | JWT string                   | String    | Exactly one of id/token/name | Must be `tt=AT` with `sub` = `appId`.   |

<br />

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Universal App Token (UAT) APIs",
    "description": "These APIs provide interfaces for partners to create and manage Universal App Tokens (UAT).\nA UAT can only act on one app, lives 1 to 24 hours (default 24h), and must be minted under an active Universal Token (UT).\nIf a UAT leaks, blast radius is limited to that app and it expires within a day.\nPrerequisite: Mint a UT first (POST /partner/{partnerId}/auth/token), then use that UT as Authorization: Bearer {{UNIVERSAL_TOKEN}} to mint UATs.\n\nComparison - UT vs UAT (quick reference):\nScope: UT covers the whole partner account, UAT covers one app only.\nDefault lifetime: UT 60 days, UAT 24 hours.\nCustom expiry window: UT 60s to 60 days, UAT 1h to 24 hours.\nExpiry parameter: both use expiry (epoch ms).\nMax active: UT 3 per admin user, UAT 3 per app.\nMint auth: UT uses email + clientSecret, UAT requires a Bearer UT.\nEmail on mint: UT yes (best-effort), UAT no.\n",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://partner.gupshup.io"
    }
  ],
  "tags": [
    {
      "name": "Universal App Token",
      "description": "Mint, list, and revoke Universal App Tokens"
    }
  ],
  "paths": {
    "/partner/app/{appId}/token/revoke": {
      "post": {
        "tags": [
          "Universal App Token"
        ],
        "summary": "Revoke Universal App Token (by id / name / token)",
        "description": "Revokes one UAT for the app. Supply exactly one of id, name, or token (raw JWT value).",
        "operationId": "revokeUniversalAppToken",
        "parameters": [
          {
            "$ref": "#/components/parameters/AppIdPath"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/RevokeAppTokenRequest"
              },
              "examples": {
                "byId": {
                  "summary": "Revoke by row id",
                  "value": {
                    "id": "6f2c9e1a-..."
                  }
                },
                "byName": {
                  "summary": "Revoke by token label",
                  "value": {
                    "name": "webhook-service"
                  }
                },
                "byToken": {
                  "summary": "Revoke by raw UAT 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"
                    }
                  },
                  "partnerNotAuthorized": {
                    "summary": "App not linked to the authenticated partner",
                    "value": {
                      "status": "error",
                      "message": "Partner is not authorized"
                    }
                  },
                  "invalidTokenFormat": {
                    "summary": "token could not be parsed",
                    "value": {
                      "status": "error",
                      "message": "invalid token format"
                    }
                  },
                  "notAnAppToken": {
                    "summary": "JWT is not an AT (tt=AT) or is missing jti",
                    "value": {
                      "status": "error",
                      "message": "token is not a valid app token"
                    }
                  }
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "404": {
            "description": "No matching UAT for this app (also used when the raw token sub does not equal appId)",
            "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 10 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": {
      "AppIdPath": {
        "name": "appId",
        "in": "path",
        "description": "App ID. Must be linked to the caller's partner.",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid",
          "example": "6f2c9e1a-1b2c-3d4e-5f60-7a8b9c0d1e2f"
        }
      }
    },
    "schemas": {
      "RevokeAppTokenRequest": {
        "type": "object",
        "description": "Supply exactly one of id, name, or token.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Token row id from the list API. Must belong to this appId.",
            "example": "6f2c9e1a-..."
          },
          "name": {
            "type": "string",
            "description": "Token label. Must match an active UAT for this app.",
            "example": "webhook-service"
          },
          "token": {
            "type": "string",
            "description": "Raw UAT JWT. Must be tt=AT with sub = appId.",
            "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",
            "example": "Error description"
          }
        }
      }
    },
    "securitySchemes": {
      "UniversalToken": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header",
        "description": "Universal Token (UT) in the form \"Bearer {{UNIVERSAL_TOKEN}}\".\nMust be a verified UT Bearer - portal login, legacy partner token, static app token, and external JWT are rejected.\n"
      }
    }
  }
}
```