Revoke Token
POST
/api/canvas/{deal_id}/token/revoke
const url = 'https://example.com/api/canvas/example/token/revoke';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/canvas/example/token/revoke \ --header 'Authorization: Bearer <token>'Revoke the current access token.
Adds the token’s JTI to the Redis revocation blocklist so it is rejected on subsequent requests even before its natural expiry.
Args: deal_id: Deal ID scope (must match the token’s deal_id).
Returns: {“revoked”: true}
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” deal_id
required
Deal Id
string
Responses
Section titled “ Responses ”Successful Response
Media type application/json
RevokeTokenResponse
Response from POST /canvas/{deal_id}/token/revoke.
object
revoked
required
Revoked
boolean
Example generated
{ "revoked": true}Validation Error
Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}