API reference · Bots

Revoke a report token

DELETE/v1/bot-tokens/{token_id}

Revoke a report token; events sent with it are refused from then on.

On this page

Auth. An account token (Authorization: Bearer lb_…) or a signed-in web session. A report-only token (lbr_…) is refused here with 403 scope_denied.

Limits. Counts against your plan's API requests (60, 600 or 3,000 a minute on Free, Builder and Standard).

Parameters

Path parameters

NameTypeRequiredDescription
token_idstringyesThe token id (btk_…), not the secret.

Request

Terminal
curl -X DELETE "https://api.langbot.ai/v1/bot-tokens/btk_01M6G72RG0GPK193NWY0YFFVEZ" \
  -H "Authorization: Bearer $LANGBOT_API_TOKEN"

Response

204 No Content

Errors

StatuscodeWhen
404not_foundNo live report token with that id on your account.
401auth_requiredNo token was sent.
401token_invalidThe token was not recognised (mistyped, revoked or expired).
422validation_errorA parameter failed validation; detail[].loc names it.
429rate_limitedOver your request budget; wait Retry-After seconds.

Every error body is {"detail": …, "code": "…"}; branch on code. All codes: Errors.