[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-partner-connect\u002Frevoke":3,"docs-tabs-partner-connect\u002Frevoke":6},{"content":4,"lastmod":5},"\n## Revoke a key as the application\n\n`POST \u002Fv1\u002Fconnect\u002Frevoke`\n\nThe endpoint follows RFC 7009 and revokes **one** key — the one you present in the request. Call it when the user disables the integration on your side: otherwise earlier keys keep working and occupy slots in the [key limit](\u002Fdocs\u002Fpartner-connect\u002Fkeys#key-limit).\n\n## Request fields (body)\n\nAccepts `application\u002Fx-www-form-urlencoded` and JSON with the same fields.\n\n| Field | Type | Required | Description |\n|------|-----|:-----:|----------|\n| `client_id` | string | yes | Application identifier |\n| `client_secret` | string | conditional | Application secret. Confidential clients must send it. Public clients (`PUBLIC`) do not send it — they have none |\n| `token` | string | yes | API key to revoke. The key comes in the `api_key` field of the [`POST \u002Fv1\u002Fconnect\u002Ftoken`](\u002Fdocs\u002Fpartner-connect\u002Ftoken) response |\n\n## Examples\n\nThe endpoint authenticates with the application credentials — `client_id` and `client_secret` in the request body. The `X-Api-Key` and `Authorization` headers are not needed.\n\n### curl — OAuth application\n\n```bash\ncurl -X POST https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fconnect\u002Frevoke \\\n  -H \"Content-Type: application\u002Fx-www-form-urlencoded\" \\\n  -d client_id=YOUR_CLIENT_ID \\\n  -d client_secret=YOUR_CLIENT_SECRET \\\n  -d token=API_KEY_TO_REVOKE\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fconnect\u002Frevoke', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application\u002Fjson' },\n  body: JSON.stringify({\n    client_id: 'YOUR_CLIENT_ID',\n    client_secret: 'YOUR_CLIENT_SECRET',\n    token: apiKeyToRevoke,\n  }),\n})\n\nif (res.status === 200) {\n  \u002F\u002F the key is revoked or there was nothing to revoke — retrying is safe\n}\n```\n\n## Response fields\n\nA successful response is HTTP `200` with an empty object `{}`. The same response is returned for an unknown token, for someone else's key and for an already revoked one — so brute force cannot reveal whether other parties' keys are still valid. Hence the call is **idempotent**: it is safe to repeat.\n\n## Response example\n\n```json\n{}\n```\n\n## Error response example\n\n401 — the client is unknown:\n\n```json\n{\n  \"error\": \"invalid_client\",\n  \"error_description\": \"Unknown client\"\n}\n```\n\n## Errors\n\nErrors come in the RFC 7009 form — `{ error, error_description }`, without the `success` wrapper. The exception is a rate limiter rejection; its form is described after the table.\n\n| HTTP | `error` | Condition |\n|------|---------|---------|\n| 400 | `invalid_request` | `client_id` or `token` is missing |\n| 400 | `invalid_client` | A public client sent `client_secret` |\n| 401 | `invalid_client` | The client is unknown or the secret does not match |\n| 409 | `key_manages_foreign_server` | The key manages a live server of another owner, a server without an owner, or a server of the same owner in another Bitrix24 account. The `code` field is `KEY_MANAGES_FOREIGN_SERVER`. Determine the server's owner and Bitrix24 account, rebind it to a key of that owner in the same Bitrix24 account, then retry the revocation |\n| 409 | `key_operation_in_progress` | Another operation is changing the same key right now. The `code` field is `KEY_OPERATION_IN_PROGRESS`. Retry the request after it completes |\n\nThe body of both `409` rejections contains `error`, `error_description` and `code`.\n\n**There are two rate limiters here, and both respond with `429`.** The endpoint's own limiter: 60 requests per minute. The effective value is in the `x-ratelimit-limit` header. It counts **by caller address only** — `client_id` is deliberately not part of the limiter key, so rotating it gives no new budget, and all instances of the integration behind one address share those 60 requests. It sets the `X-RateLimit-*` headers. The platform's entry limiter: 60 requests per **second** per address, and this counter is shared across all of `\u002Fv1\u002F`, not per endpoint. It does not set `X-RateLimit-*` headers, and its `Retry-After` is always 1. In both cases the body comes in the common API envelope — `{ \"success\": false, \"error\": { \"code\": \"RATE_LIMITED\", \"message\": \"...\" } }` — which differs from the RFC 7009 form of this endpoint's other responses, and the limiters cannot be told apart by the body, only by the presence of `X-RateLimit-Limit`. The rejection is **not** terminal: the key is not revoked. Retry after the delay given in `Retry-After`.\n\nFull reference of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## Known specifics\n\n**Revocation stops the key immediately.** If the presented key was issued to your client and was active, requests with it return `401 KEY_INACTIVE` after revocation, and its slot in the limit is freed. The `200 {}` response alone does not prove revocation: an unknown key, a key belonging to another client and an already revoked key give the same response.\n\n**Client deactivation does not block revocation.** You can also revoke a key issued before your client was deactivated: deactivation stops issuing new keys but does not prohibit revoking earlier ones.\n\n**What the endpoint does not do:**\n\n- **it does not remove the webhook in the Bitrix24 account** — the user deletes it on their side; revoking the key does not replace that.\n- **it does not return a lost key** — to revoke a key you must present it; it cannot be recovered.\n- **it does not trigger on its own** — if the user stops using the integration, the key lives on. Calling the endpoint is your responsibility.\n\n## See also\n\n- [Key lifetime, revocation and limit](\u002Fdocs\u002Fpartner-connect\u002Fkeys)\n- [Exchange a code for an API key](\u002Fdocs\u002Fpartner-connect\u002Ftoken)\n- [Partner Connect](\u002Fdocs\u002Fpartner-connect)\n","2026-11-19",{},1795415495055]