Skip to content
OpenTrain AIOpenTrain AIOpenTrain AIDocs

Ask OpenTrain

Answers from the documentation, with sources.

What would you like to do with OpenTrain?

AI answers can be mistaken. Check the linked sources. Don’t include private account information.

Open app

DEVELOPER DOCUMENTATION

Revoke Token

Revoke a personal API token (RFC 7009).

POST/api/agent/oauth/revoke

Revokes a personal API token, following RFC 7009: the call always returns 200, even for unknown or already-revoked tokens, so revocation can never leak whether a token existed.

The body is form-encoded (application/x-www-form-urlencoded). Use this when decommissioning an integration or responding to a suspected leak. For routine rotation, prefer the token management API, which can also revoke other tokens on the account by ID.

Requirements: none beyond possessing the token value to revoke.

tokenstringbodyrequired

The ot_pat_... token to revoke.

200 with an empty JSON body. The token stops authenticating immediately.

StatuserrorMeaning
400invalid_requestThe token field is missing
500server_errorUnexpected failure