An internal REST API on top of boxed Bitrix24 with a token service
The CRM was connected to a credit system, a contact center, a mobile app, an AI bot and HR services. Handing each of them Bitrix24 inbound webhooks meant granting broad permissions with no record of who calls what, and no unified response contract.
A boxed portal in production with live integrations — existing clients must not break; some endpoints run without the Bitrix core; the rules had to be clear to other teams without calls.
- A token service: Bearer and refresh tokens in a separate DB, team passwords in bcrypt, an admin panel for issuing and revoking tokens
- 25 endpoints by domain: contacts by IIN and phone, deals and the credit system, contact center, mobile chat, micro-business, HR, leads from the AI bot
- A unified format for success and error responses, an endpoint registry marked SAFE/DANGEROUS, versioning rules and a Postman test plan
- An endpoint scanner for administrators and an API call log as part of the audit trail
- July 2026: closed a token bypass on 6 endpoints — anonymous access is now possible only via an explicit flag in the code
External teams got documented endpoints with their own tokens instead of portal webhooks: it is visible who called the API, and it is clear in advance what each call changes.