Skip to content
Rigel docs
Open Rigel

Revoke a personal API token

tokens.delete

DELETE/api/v1/tokens/{token_id}

  • Route

Deletes one of your tokens. It stops working at once. Needs a session.

Parameters#

Revoke a personal API token: parameters
FieldDescription
token_idpathstringrequired

The token's ID, tok_….

Response#

204 Revoked. No body.

Errors#

Every error has the same envelope: error.code, error.message, error.details, error.recovery and error.request_id.

Revoke a personal API token: errors
StatusCodeWhen
401unauthenticatedThe request has no valid session.
403Read error.codeDescribed above.
404not_foundThe household doesn't exist, or you aren't a member of it.

Examples#

No call has been recorded for this operation yet, so this example is built from its schema. The values are placeholders.

Built from the schema

Not recorded from a real call: the fields are filled in from the schema, so the values are placeholders.

Request, curl
curl -X DELETE 'https://rigel.house/api/v1/tokens/tok_01K9BKNGK0ENW3AHRZ6DMV29GQ' \
  -H "Cookie: rigel_session=$RIGEL_SESSION"
Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/tokens/tok_01K9BKNGK0ENW3AHRZ6DMV29GQ", {
  method: "DELETE",
  headers: {
    Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
  },
});
const data = await response.json();
Request, HTTP
DELETE /api/v1/tokens/tok_01K9BKNGK0ENW3AHRZ6DMV29GQ HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Response, 204
HTTP/1.1 204 No Content
X-Request-Id: req_01K9BKNGK0ENW3AHRZ6DMV29GQ

Rigel is in early access, and sign-up is by invitation. Open Rigel