For AI agents: markdown of this page — /docs-content-en/partner-connect/company-status.md documentation index — /llms.txt
Company connection polling
GET /v1/connect/company/status
Lets the Product server check its own Company connection using an already issued COMPANY secret. The account and Product pair is determined by the secret.
Parameters
The method accepts no query parameters, including identifiers of another pair. Send the connection secret only in the X-Api-Key header. A client secret, cookie or Bearer credential does not work for this method. Keep the connection secret on your server; do not pass it to the browser or write it to logs.
Examples
The method authenticates with the Company connection secret — it is issued by POST /v1/connect/token in the api_key field. A personal key and an OAuth application key do not work here.
curl
curl --max-time 20 "https://vibecode.bitrix24.com/v1/connect/company/status" \
-H "X-Api-Key: YOUR_COMPANY_SECRET"
JavaScript
const response = await fetch('https://vibecode.bitrix24.com/v1/connect/company/status', {
headers: { 'X-Api-Key': 'YOUR_COMPANY_SECRET' },
cache: 'no-store',
signal: AbortSignal.timeout(20000),
})
const result = await response.json()
if (!response.ok) throw new Error(result.error.code)
console.log(result.data.status, result.data.revision, result.data.action)
Response fields
| Field | Type | Value |
|---|---|---|
Fieldsuccess |
Typeboolean | Valuetrue for a successful poll |
Fielddata |
Typeobject | ValueDiagnostics of your own connection |
Fielddata.connection_id |
Typestring | ValueIdentifier of the connection resolved by this method |
Fielddata.connection_mode |
Typestring | ValueAlways COMPANY |
Fielddata.portal |
Typeobject | ValueThe connected Bitrix24: only domain and name |
Fielddata.portal.domain |
Typestring | ValueDomain of the connected Bitrix24 |
Fielddata.portal.name |
Typestring | ValueName of the connected Bitrix24, Unknown if missing |
Fielddata.user |
Typeobject | null | ValueHolder of the current consent: only name and email, or null |
Fielddata.user.name |
Typestring | ValueHolder's name in the platform account |
Fielddata.user.email |
Typestring | ValueHolder's email in the platform account, an empty string if missing |
Fielddata.status |
Typestring | ValueACTIVE, NEEDS_ADMIN, SUSPENDED, DISCONNECTED, DELETION_PENDING |
Fielddata.generation |
Typeinteger | ValueGeneration of the connection consent |
Fielddata.revision |
Typeinteger | ValueRecorded version of the connection state |
Fielddata.credential_version |
Typeinteger | ValueVersion of the current connection secret |
Fielddata.bitrix_ready |
Typeboolean | ValueCurrent availability of Bitrix24 |
Fielddata.reason_code |
Typestring | null | ValueReason why access to Bitrix24 is closed, or null if access is open |
Fielddata.webhook_cleanup |
Typestring | Valuenone — no unfinished attempts, pending — cleanup or creation is not finished, including when there is no way to delete the previous webhook, attention_required — the webhook creation result is unknown and needs investigation on the platform side |
Fielddata.capabilities.bitrix |
Typeboolean | ValueCurrent availability of Bitrix24 |
Fielddata.capabilities.ai |
Typeboolean | ValueAvailability of AI, considering scope, permission and connection state |
Fielddata.capabilities.storage |
Typeboolean | ValueAvailability of storage, considering scope and connection state |
Fielddata.poll_after_seconds |
Typeinteger | ValueRecommended polling interval: 30 seconds |
Fielddata.action |
Typestring | null | Valuenull if access is open. Otherwise WAIT, AUTHORIZE_ADMIN, CONTACT_SUPPORT, RECONNECT, WAIT_FOR_DELETION |
| State or condition | reason_code |
action |
|---|---|---|
State or conditionACTIVE, all connection and consent checks passed |
reason_codenull |
actionnull |
State or conditionACTIVE, the scheduled holder check is stale or has failed |
reason_codeADMIN_CHECK_REQUIRED |
actionWAIT |
State or conditionACTIVE, the consent, the holder's permissions or the connection webhook require new administrator consent |
reason_codeCONNECTION_ADMIN_REQUIRED |
actionAUTHORIZE_ADMIN |
State or conditionACTIVE, the consent has no Bitrix24 permissions |
reason_codeSCOPE_MISSING |
actionWAIT |
State or conditionACTIVE, cleanup of a webhook with an unknown creation result is not finished |
reason_codeCONNECTION_WEBHOOK_CLEANUP_PENDING |
actionWAIT |
State or conditionACTIVE, the working webhook is not ready yet |
reason_codeCONNECT_COMPANY_NOT_READY |
actionWAIT |
State or conditionACTIVE, the connection secret is not valid |
reason_codeINVALID_API_KEY |
actionWAIT |
State or conditionACTIVE, the application or the account is blocked |
reason_codeCLIENT_BLOCKED or PORTAL_BLOCKED |
actionWAIT |
State or conditionNEEDS_ADMIN |
reason_codeCONNECTION_ADMIN_REQUIRED |
actionAUTHORIZE_ADMIN |
State or conditionSUSPENDED |
reason_codeCONNECTION_SUSPENDED |
actionCONTACT_SUPPORT |
State or conditionDISCONNECTED |
reason_codeCONNECTION_DISCONNECTED |
actionRECONNECT |
State or conditionDELETION_PENDING |
reason_codeCONNECTION_DELETION_PENDING |
actionWAIT_FOR_DELETION |
Working calls with ADMIN_CHECK_REQUIRED receive 503 with the Retry-After: 30 header. Retry after 30 seconds.
Response example
The response and errors are returned with Cache-Control: no-store. Example response for a connection awaiting an administrator:
{
"success": true,
"data": {
"connection_id": "connection-id",
"connection_mode": "COMPANY",
"portal": { "domain": "example.bitrix24.com", "name": "Example" },
"user": null,
"status": "NEEDS_ADMIN",
"generation": 0,
"revision": 1,
"credential_version": 1,
"bitrix_ready": false,
"reason_code": "CONNECTION_ADMIN_REQUIRED",
"webhook_cleanup": "none",
"capabilities": { "bitrix": false, "ai": false, "storage": false },
"poll_after_seconds": 30,
"action": "AUTHORIZE_ADMIN"
}
}
Error response example
401 — an unknown, revoked or pre-rotation secret:
{ "success": false, "error": { "code": "INVALID_API_KEY", "message": "Invalid API key" } }
Errors
| HTTP | Code | What to do |
|---|---|---|
| HTTP401 | CodeINVALID_API_KEY |
What to doCheck the current secret. An unknown, revoked or pre-rotation secret and a request for another pair produce the same rejection |
| HTTP403 | CodeCLIENT_BLOCKED |
What to doThe Product is blocked; contact support |
| HTTP403 | CodePORTAL_DELETED |
What to doThe account is deleted; stop polling |
| HTTP403 | CodePORTAL_BLOCKED |
What to doThe account is blocked; contact support |
| HTTP403 | CodePORTAL_SUSPENDED |
What to doThe account is suspended; contact support |
| HTTP429 | CodeRATE_LIMITED |
What to doThe per-IP limit is reached. Wait at least Retry-After seconds |
| HTTP429 | CodeCALLER_RATE_LIMITED |
What to doThe shared connection or account limit is reached. Wait at least Retry-After seconds |
The common codes from the table are also described in the errors reference, and CLIENT_BLOCKED is returned by this method and by Company connection AI calls.
Known specifics
ACTIVE alone does not open access. Polling does not extend the holder check. Use bitrix_ready and the individual capabilities values: holder details do not change the availability of Bitrix24, AI or storage. The response contains only the details described above about the connected Bitrix24 and the consent holder. The status contains no list of people, internal identifiers, secrets or webhook URLs.
Polling frequency. Poll no more often than poll_after_seconds, and increase the pause on 429. The base per-IP limit is 120 requests per minute. The effective threshold is in x-ratelimit-limit. A successful poll also consumes the shared connection and account limit together with other API requests. Secret rotation does not reset this limit.
Secret states. A secret in the STATUS_ONLY state allows reading diagnostics but not calling working methods. A REVOKED secret does not allow even polling. After rotation, use the new secret. Protection already issued and polling work independently of whether new issuance is available. Reconnection is performed by the account administrator through a separate consent.