System Specs & Limits
Product: OIA Shield24 | Bitrix24 Marketplace App: infinitybht_llc.oia_shield24
1. Technical Limits Matrix
Hard limits that apply to every tenant. Per-plan allowances (endpoints, requests per minute, monthly volume, payload size per endpoint, log retention) are in section 4.
| Parameter | Specification | Enforcement Engine |
|---|---|---|
| Max Payload Size | 50 MB platform ceiling; the cap on each endpoint depends on the plan (256 KB, 2 MB, up to the ceiling), see section 4 | ValidationPlugin (Zod WAF) |
| Max Queue Depth | 40 Requests per Endpoint | EndpointQueueDO |
| Queue Pacing | One Bitrix24 call at a time per endpoint, at least 500 ms between calls (about 2 per second) | EndpointQueueDO |
| Upstream Timeout | 30 s for the call to your Bitrix24 portal (504 on timeout) | EndpointQueueDO |
| Batch Size | Up to 50 commands, no nesting; every command is checked individually | ValidationPlugin |
| Token Hashing | SHA-256 | AuthPlugin (Web Crypto) |
| OAuth Encryption | AES-GCM (256-bit) | AuthPlugin (Web Crypto) |
| Gateway Log Retention | 7 days (Free), 30 days (Developer), 90 days (Enterprise), then automatic expiry | Analytics Engine TTL |
| Download Link Lifetime | 24 hours, signed and bound to one endpoint | fileProxy |
2. Queue Pacing & Zombie Request Pruning
To protect your Bitrix24 portal from rate limit bans, OIA Shield24 utilizes single-threaded Durable Object queues. Each endpoint queue enforces a max queue depth of 40 requests and continuously monitors client connections. If a vendor client disconnects, Zombie Request Pruning (request.signal.aborted) flushes the pending job instantly.
- Queue full: request number 41 is refused at once with
OIA_ERROR_PROXY_QUEUE_FULL(HTTP 503). Back off and retry; do not open more parallel connections. - Per-endpoint RPM: over the endpoint's requests-per-minute allowance the gateway answers
OIA_ERROR_RATE_LIMIT_EXCEEDED(HTTP 429) with aRetry-Afterheader. Honour it. - Pacing, not rejection: a request inside the allowance is never failed for being fast. It waits in the queue and is released at the paced rate. Your client sees a slower response, with the wait reported in the
X-OIA-Queue-Timeresponse header. - Aborted clients: a request abandoned before it reaches the front of the queue is dropped without touching Bitrix24 (logged as HTTP 499,
OIA_ERROR_CLIENT_CLOSED_REQUEST).
3. WAF & Payload Rules
Incoming payloads are evaluated against Zod schemas. Precision Payload Forcing executes deep JSON object merges (forced_payload) before dispatching to Bitrix24, overriding any unauthorized field modifications attempted by vendor callers.
- Shape of writes:
*.addand*.updatecalls must send{ "fields": { ... } }(optionallyidandparams). A few methods that take flat parameters, such asuser.add, are exempt. Anything else must be a JSON object. Failures returnOIA_ERROR_VALIDATION_FAILEDorOIA_ERROR_INVALID_JSON(HTTP 400). - Payload size: bodies over the endpoint's cap return
OIA_ERROR_PAYLOAD_TOO_LARGE(HTTP 413). Nothing above 50 MB is accepted on any plan. - HTTP verbs: each endpoint allows an admin-chosen set of verbs (default GET and POST). With "force POST for mutations" switched on,
.add,.update,.delete,.setandbatchover GET return HTTP 405. - Network rules: optional IP allow and block lists (
OIA_ERROR_FORBIDDEN_IP, HTTP 403) and an allowed-origins list for browser callers. - Method names: must be lowercase, dot-separated Bitrix24 names. Encoded slashes, spaces or path tricks return
OIA_ERROR_INVALID_METHODbefore any rule is evaluated.
4. Subscription Plan Comparison
| Feature | Free ($0) | Developer ($20/mo) | Enterprise ($69/mo) |
|---|---|---|---|
| Endpoints | 2 | 10 | Unlimited |
| RPM Throttle | 30 RPM | 120 RPM | 120 RPM |
| Monthly Requests | 10,000 | 100,000 | 1,000,000 |
| Payload Cap per Endpoint | 256 KB | 2 MB | Up to the 50 MB ceiling |
| Gateway Log Retention | 7 days | 30 days | 90 days |
| IP Allow and Block Lists | No | Yes | Yes |
| Custom Hostnames | No | Yes | Yes |
| Multi-Region Location Hints | No | Basic | Full (weur, enam, apac) |
Over the monthly volume the gateway answers HTTP 429 (quota_exceeded). An unpaid or cancelled subscription answers HTTP 402 (OIA_ERROR_SUBSCRIPTION_INACTIVE).
5. Connecting to the Gateway
The gateway is a drop-in for the Bitrix24 REST URL. A developer, a script or an AI agent keeps the Bitrix24 method names, parameters and response shapes, and only swaps the base URL and the credential. Each endpoint is created by the portal administrator in the OIA Shield24 admin UI and runs in one of two modes.
| Mode | URL | Credential |
|---|---|---|
| API key | https://oia-shield24.infinitybht.app/rest/<method> | Authorization: Bearer oia24_sk_... |
| Webhook | https://oia-shield24.infinitybht.app/rest/<alias_id>/<webhook_key>/<method> | The key is part of the URL, exactly like a native Bitrix24 inbound webhook |
| Custom hostname (Developer and up) | https://<your-host>/rest/<webhook_key>/<method> | Same two modes, without the alias segment |
An endpoint accepts only its own mode: sending a Bearer header to a webhook endpoint (or the reverse) returns OIA_ERROR_INVALID_CLIENT (HTTP 401). Keys can expire, be revoked, and be restricted to IPs; the gateway stores only a SHA-256 hash of the key.
Example calls
# API key mode
curl -X POST "https://oia-shield24.infinitybht.app/rest/crm.deal.list" \
-H "Authorization: Bearer $OIA_KEY" \
-H "Content-Type: application/json" \
-d '{"filter":{"STAGE_ID":"NEW"},"select":["ID","TITLE"]}'
# Webhook mode (the key is in the path)
curl "https://oia-shield24.infinitybht.app/rest/$ALIAS/$KEY/crm.deal.get?id=42"
# Write: fields must be wrapped
curl -X POST "https://oia-shield24.infinitybht.app/rest/crm.lead.add" \
-H "Authorization: Bearer $OIA_KEY" -H "Content-Type: application/json" \
-d '{"fields":{"TITLE":"Website lead"}}'
What the gateway does for you
- Credentials stay behind the gateway. The vendor never receives a Bitrix24 access or refresh token. The gateway injects and refreshes tokens itself, and the call runs as the endpoint's assigned portal user ("Run As User"). If that user has not authorized the app, calls fail closed (
OIA_ERROR_ACCESS_USER_UNVERIFIEDorOIA_ERROR_INVALID_GRANT) and never fall back to another user. - Request formats: JSON bodies, form-encoded bodies and query strings, including Bitrix24's bracketed keys (
filter[STAGE_ID]=NEW). - REST 2 and REST 3.0:
/rest/<method>reaches the classic API./rest/api/<method>reaches REST 3.0 (for examplenote.*,main.eventlog.*and a fewtasks.task.*methods) with the same policy and scope checks. REST 3.0 calls are sent to Bitrix24 as JSON POST. - Batch (REST 2):
POST /rest/batchwithcmdworks, up to 50 commands. Each command is run through the same method ledger, scopes, include and exclude lists and parameter guard as a direct call. One refused command refuses the whole batch withOIA_ERROR_BATCH_COMMAND_REFUSED(HTTP 403). The event methods cannot be called inside a batch. - File downloads: Bitrix24 download links embed an access token, so the gateway rewrites them to
/rest/.../oia.file.download?ref=.... The link is signed, valid for 24 hours, tied to the endpoint that received it, and still needs that endpoint's credential (GET only). - Browser callers: CORS is answered per the endpoint's allowed-origins list.
- Response headers worth reading:
X-OIA-Error-Code(the machine-readable code on a refusal),X-OIA-Queue-Time(milliseconds spent waiting),Retry-After.
6. Method Access Model
A call has to clear four independent layers. Failing any one of them stops the request before Bitrix24 sees it.
- The Bitrix24 app scopes. OIA Shield24 can only call what the portal administrator granted to the app when installing it. Bitrix24 itself enforces this limit.
- The OIA Shield24 methods ledger (mode: allowlist). A fixed, reviewed list of which methods can ever pass through the gateway, enforced for every tenant and every endpoint. A method the ledger blocks is refused even if the endpoint's scope is granted or the method is explicitly included. A method the ledger does not cover yet is refused too, until it has been reviewed and added.
- The endpoint's scopes. The administrator grants each endpoint only the scope families it needs (for example
crmanduser_brief), derived from the first segment of the method, with exceptions such asvoximplant.*mapping totelephony. Missing scope returnsOIA_ERROR_INSUFFICIENT_SCOPE(HTTP 403). - The endpoint's method lists. Optional included-methods and excluded-methods lists narrow a scope further, for example read-only access to
crm.*.listandcrm.*.get.
Design principle: the gateway blocks only what would expose OIA Shield24 or its tokens. Everything else on the portal (CRM, tasks, deletes, custom fields, chats, telephony) is the portal administrator's decision. Concerns about risky-but-legitimate methods are shown to the administrator as advisories when they build the endpoint, not silently enforced.
7. Supported Methods
These scope families can be granted to an endpoint today. Within each family, individual methods can still be listed in the ledger as blocked (section 8).
| Area | Scope families | Notes |
|---|---|---|
| CRM | crm, catalog, documentgenerator, sale, salescenter | Leads, deals, contacts, companies, SPAs, products, orders, payment and cash register records. Fields, stages and deletes are available, with advisories. |
| Tasks and projects | task, tasks, tasks_extended, sonet_group, socialnetwork, log | Task CRUD, checklists, comments, workgroups, activity stream. |
| People and org | user, user_basic, user_brief, user.userfield, department, humanresources, timeman | User and department data, work time. Per-user custom fields. |
| Files and content | disk, lists, iblock, landing, note, forum, vote, rating, like, smile | Disk files and folders (downloads are proxied), lists, sites, notes. |
| Communication | im, imbot, imopenlines, mail, mailservice, messageservice, call, telephony, calendar | Messages, notifications, open lines, calls and calendar. Telephony and chat access carry advisories. |
| Automation and platform | bizproc, rpa, booking, sign, userfieldconfig, mobile, intranet, biconnector, main, ai, userconsent, basic | Starting and reading business processes, smart process automation, custom field configuration, server time, profile. |
| Events | event (Event Gateway) | Only event.bind, event.unbind, event.get, event.test and events, answered by OIA Shield24 itself (section 8). Each event also needs its own scope. Online events only. |
| Batch | batch (REST 2) | Allowed when every inner command would be allowed on its own. |
The exact list, with the verification date and the reasoning for every decision, is the methods ledger shipped with the product. The admin UI lists the same data when you build an endpoint.
8. Methods That Are Never Supported
These calls are refused with OIA_ERROR_METHOD_BLOCKED (HTTP 403), whatever the endpoint is configured to allow. They are blocked for one of five reasons, each rooted in what the call would expose or break for every other tenant that shares the app.
| Reason | Why it is blocked | Examples |
|---|---|---|
| token-exposure | The response would carry a Bitrix24 credential or the keys to the app's real-time channels. | pull.config.get, pull.application.config.get, pull.channel.public.* |
| callback-registration | The method registers a URL that Bitrix24 will later call with the app's tokens attached (auth, AUTH_ID, REFRESH_ID). A vendor URL there would receive credentials. | placement.bind, imbot.register, imbot.command.register, imconnector.register, bizproc.robot.add, bizproc.activity.add, userfieldtype.add, messageservice.sender.add, sale.paysystem.handler.add, sale.delivery.handler.add, sale.cashbox.handler.add, landing.repo.bind, biconnector.connector.*, ai.engine.* |
| app-identity | The method reads or changes OIA Shield24's own record, settings or registrations. Every vendor shares the one app, so these describe or damage the shared app. | app.info, app.option.*, user.option.*, scope, methods, method.get, feature.get, placement.get, placement.list, bizproc.robot.list, imbot.unregister |
| own-surface | A surface OIA Shield24 operates itself or shares between tenants: event delivery, the app's storage, queues, real-time channels. | event.offline.*, every other event.* method, entity.*, disk.storage.getforapp, im.v2.event.*, imbot.v2.event.get, pull.application.event.add, sale.paysystem.handler.list |
| uninspectable | The gateway cannot yet verify what the call does, so it fails closed. Includes every method the ledger has not yet reviewed. | sign.b2e.provider.*, REST 3.0 batch, any brand-new Bitrix24 method not yet in the ledger |
Events: served by the gateway, not forwarded
event.bind, event.unbind, event.get, event.test and events would expose tokens if they were forwarded to Bitrix24, so the gateway never forwards them. With the event scope granted to the endpoint, OIA Shield24 answers them itself in the Bitrix24 response shapes. It binds its own webhook URL with Bitrix24 and relays each event to the vendor's handler, so the vendor never receives a Bitrix24 token.
- Approval first: by default a new subscription is accepted but delivers nothing until a portal administrator approves it in Outbound Events. The administrator can switch that off per endpoint.
- Handler rules: a public HTTPS URL of at most 2048 characters, not pointing at OIA Shield24 or at your Bitrix24 portal (
OIA_ERROR_INVALID_HANDLER). At most 50 subscriptions per endpoint, each counted against the plan's outbound webhook limit. - What arrives: Bitrix24's event body with every credential removed.
auth[application_token]is the endpoint's own token, and the headersX-OIA-Event-Id,X-OIA-Timestamp,X-OIA-Signature(HMAC-SHA256,v1=prefix) andX-OIA-Signature-V2(v2=, which also signs the event ID) let the vendor verify and de-duplicate. Delivery uses the retry queue and delivery log. - Testing:
event.testsends anONAPPTESTevent, signed like any other, to the calling endpoint's ownONAPPTESTsubscriptions only. It is tried once and never retried, as in Bitrix24. - Not available: offline events (
event_type=offlinereturnsACCESS_DENIED) andevent.offline.*. Subscriptions are checked against the endpoint's scopes before every delivery.
The full vendor guide is "Event Subscriptions for Vendors" in the in-app documentation.
Parameters that are refused on every method
Even on an allowed method, a request that contains any of these keys, at any depth in a JSON body, form or query string (case-insensitive), is refused with OIA_ERROR_FORBIDDEN_PARAMETER (HTTP 400). They stop a vendor from supplying its own Bitrix24 credentials or sneaking in a callback URL through a method the ledger has not classified.
auth, auth_id, refresh_id, access_token, refresh_token, application_token, client_secret, handler, callback, callback_url, placement_handler, event_handler, event_message_add, event_message_update, event_message_delete, event_welcome_message, event_bot_delete, event_command_add, webhookurl, iframe, action_uri, calculate_url, create_delivery_request_url, cancel_delivery_request_url, print_url, check_url
Ordinary custom fields such as UF_CRM_LEAD_HANDLER are not affected: the match is on the exact key.
Values that are removed from every response
Before a response or a relayed event reaches the vendor, the gateway strips auth_id, refresh_id, access_token, refresh_token, application_token and client_secret, and redacts any occurrence of the live access token in the body (for example inside a download URL). In event payloads, the auth block keeps domain, member_id, user_id, client_endpoint and scope, because handlers need them to tell portals and users apart. Neither grants access.
What this means in practice: an integration that must register placements, robots, bots, chat commands, payment or delivery handlers, or custom field types with Bitrix24 cannot do that through OIA Shield24 today. Install those pieces in the vendor's own Bitrix24 application, and use the gateway for the data calls. Event subscriptions are the exception (above).
9. Planned Support
These are gaps we know about and intend to close. They are direction, not dated commitments: until a capability is released, treat it as unsupported and do not build on it.
| Capability | Today | Plan |
|---|---|---|
| REST 3.0 batch | Refused (OIA_ERROR_BATCH_COMMAND_REFUSED). Send REST 3.0 calls one at a time, or use the REST 2 batch at /rest/batch. | Inspect every inner call with the same ledger, scope and guard checks as the REST 2 batch, then allow it. |
| Callback sandbox for placements and handlers | All callback-registering methods are blocked (section 8). | OIA Shield24 registers its own callback with Bitrix24 and sandboxes the vendor behind it, so a vendor never receives tokens or touches the Bitrix24 iframe directly. Includes an admin editor. |
| Per-user gateway credentials | Bitrix24 credentials are stripped from responses. | Replace stripped credentials with gateway-issued, per-user credentials, so features that depend on them can work. |
| Offline events | Refused. Only online events can be subscribed to through event.bind. | Under consideration: per-endpoint emulation of event.offline.get, clear and error, so a vendor can fetch missed events without sharing the app's real queue. |
| Telephony registration | Telephony data methods work; provider registration is blocked. | An admin-managed registration module. |
| New Bitrix24 methods | Refused until reviewed (allowlist). | Every new method in the official Bitrix24 documentation is reviewed against the ledger and allowed or blocked on its merits, so the allowed set grows with Bitrix24. |
10. Error Reference
Every refusal is JSON of the form { "error": "OIA_ERROR_...", "error_description": "..." } and carries the same code in the X-OIA-Error-Code header. Errors that Bitrix24 itself returns (for example QUERY_LIMIT_EXCEEDED) pass through unchanged.
| HTTP | Code | Meaning and what to do |
|---|---|---|
| 400 | OIA_ERROR_INVALID_REQUEST | URL is missing the key or the method name. Check the format in section 5. |
| 400 | OIA_ERROR_MISSING_METHOD / OIA_ERROR_INVALID_METHOD | No method, or not a valid lowercase dotted Bitrix24 method name. |
| 400 | OIA_ERROR_INVALID_JSON / OIA_ERROR_VALIDATION_FAILED | Body is malformed, not an object, or a write is missing its fields wrapper. |
| 400 | OIA_ERROR_INVALID_HANDLER, ERROR_EVENT_NOT_FOUND | Event subscription: the handler URL is missing or not allowed, or the event name is unknown. |
| 400 | OIA_ERROR_FORBIDDEN_PARAMETER | The request contains a guarded key (section 8). Remove it. |
| 415 | OIA_ERROR_UNSUPPORTED_CONTENT_TYPE | Send the body as application/json or application/x-www-form-urlencoded. |
| 401 | OIA_ERROR_INVALID_CLIENT | Key missing, wrong, revoked or expired; wrong mode, alias or hostname. |
| 401 / 403 / 503 | OIA_ERROR_INVALID_GRANT, OIA_ERROR_ACCESS_USER_UNVERIFIED | The endpoint's portal user must re-authorize or open the app again. Tell the administrator. |
| 402 | OIA_ERROR_SUBSCRIPTION_INACTIVE | The portal's subscription is not active. |
| 403 | OIA_ERROR_METHOD_BLOCKED | Never available through the gateway, or not yet in the ledger (sections 8 and 9). Do not retry. |
| 403 | OIA_ERROR_INSUFFICIENT_SCOPE | The endpoint's scopes or method lists do not include this method. Ask the administrator to grant it. |
| 403 | OIA_ERROR_BATCH_COMMAND_REFUSED | One command in a batch was refused, the batch was nested, or it was a REST 3.0 batch. |
| 403 | OIA_ERROR_FORBIDDEN_IP | The caller's IP is not allowed or is blocked on this endpoint. |
| 403 | OIA_ERROR_PLAN_FEATURE_RESTRICTED | The plan does not include this feature. |
| 403 | OIA_ERROR_QUOTA_EXCEEDED, ACCESS_DENIED | Event subscription: the endpoint holds 50 subscriptions or the plan's outbound limit is reached, or an offline event or administrator-only option was requested. |
| 405 | OIA_ERROR_METHOD_NOT_ALLOWED | HTTP verb not allowed on this endpoint, or a mutation sent over GET. |
| 413 | OIA_ERROR_PAYLOAD_TOO_LARGE | Body over the endpoint's cap. |
| 429 | OIA_ERROR_RATE_LIMIT_EXCEEDED, quota_exceeded | Per-minute allowance or monthly volume reached. Wait for Retry-After, or upgrade the plan. |
| 499 | OIA_ERROR_CLIENT_CLOSED_REQUEST | The caller disconnected before the request completed. |
| 502 / 504 | OIA_ERROR_NETWORK_FAILURE | The portal could not be reached, or did not answer within 30 s. |
| 503 | OIA_ERROR_PROXY_QUEUE_FULL | 40 requests are already waiting for this endpoint. Slow down and retry. |
11. Notes for AI Agents and Automation
- Treat the endpoint credential as the whole identity. It cannot be widened by the client. Never ask a user for a Bitrix24 admin webhook or OAuth token; if the endpoint lacks a scope, report
OIA_ERROR_INSUFFICIENT_SCOPEand ask the administrator. - Read the code, not the prose. Branch on
X-OIA-Error-Code. Retry only 429, 502, 503 and 504, with backoff (andRetry-Afterwhen present).OIA_ERROR_METHOD_BLOCKED,OIA_ERROR_INSUFFICIENT_SCOPEandOIA_ERROR_FORBIDDEN_PARAMETERnever succeed on retry. - Keep concurrency low. The queue serves one call at a time per endpoint at about 2 per second. Parallel calls only fill the 40-slot queue. Use REST 2
batch(up to 50 commands) for bulk reads and writes. - Prefer least-privilege calls. Use
selectandfilterto keep payloads small; plan caps apply per request body. - Do not register URLs with Bitrix24 yourself. Placements, bots, robots and the other handler registrations are not available (sections 8 and 9). For events, call
event.bindon the gateway as usual, then wait for the administrator to approve the subscription, and verify each delivery with the signature header. - Links in responses. Use the gateway download links exactly as returned; they expire after 24 hours and need the same credential.