# Revoke an application's widget tokens issued until now

> Revoke an application's widget tokens issued until now: CustomDomain™ API reference in the applications group. Covers parameters, request body and responses.

Source: https://docs.customdomain.ai/docs/api-reference/applications/revokeWidgetTokens

## `POST https://api.customdomain.ai/v1/applications/{id}/tokens:revoke`

Every widget token of the application issued before the returned time is refused from now on (`401`); tokens minted afterwards work. Use it when a token or the client secret may have leaked. Widgets that hold a revoked token ask your server for a new one. Admin-or-above (keys:manage): a member/viewer API key is rejected with 403.

### Authentication

`apiKey`, `managementKey`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes |  |

### Responses

| Status | Description |
| --- | --- |
| `200` | Revoked |
| `401` | Error envelope: {code, title, details}. |
| `403` | Error envelope: {code, title, details}. |
| `404` | Error envelope: {code, title, details}. |

### `200` response body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `application_id` | string | yes |  |
| `revoked_before` | string | yes | Widget tokens issued before this time are refused. |

The full specification is served at `GET https://api.customdomain.ai/v1/openapi.json`.
