---
title: "Revoke OAuth 2.0 token and its associated grant"
method: POST
path: "/oauth/revoke"
tags: ["oauth"]
---

# Revoke OAuth 2.0 token and its associated grant

`POST /oauth/revoke`

## Request

- Base URL: `https://docs-api.formify.eu/v1`
- URL: `https://docs-api.formify.eu/v1/oauth/revoke`
- Auth: one of:
  - HTTP basic
  - none

This endpoint is used to revoke an OAuth 2.0 token, which invalidates its associated grant. 

### Notes:
- You can revoke either using an `access_token` or a `refresh_token`.
- **Public clients** (URL-based `client_id`) must include their `client_id` in the request body and can only revoke using `token_type_hint=refresh_token`.

### Example Usage:
#### Request Body:
```json
{
  "token": "your_refresh_token_here",
  "token_type_hint": "refresh_token"
}
```

#### Response:
If the token is successfully revoked:
- HTTP Status: `200 OK` (no body content required).

If the token is invalid or has already been revoked:
- HTTP Status: `400 Bad Request`.

## Response `200`

Token successfully revoked.

## Other responses

- `400`: Invalid or already revoked token.
- `401`: Unauthorized - Invalid client credentials.
- `500`: Internal server error.

---

[API](https://skmtc.dev/formify/apis/formify-api.md) · [All operations](https://skmtc.dev/formify/apis/formify-api/llms.txt) · [OpenAPI document](https://skmtc.dev/formify/apis/formify-api/revisions/571c4c0d4f4f?raw)
