Pour les agents IA : markdown de cette page — /docs-content-en/entities/documents/crm-create.md index de la documentation — /llms.txt

Les articles de documentation sont actuellement disponibles en anglais.

Create a CRM document

POST /v1/crm-documents calls crm.documentgenerator.document.add. Use a writable API key with crm scope. templateId names a CRM template, entityTypeId names the CRM record type (deal: 2), and entityId names the record. values and stampsEnabled are optional; stamps default to disabled.

Terminal
curl -X POST https://vibecode.bitrix24.com/v1/crm-documents -H 'X-Api-Key: YOUR_VIBE_KEY' -H 'Content-Type: application/json' -d '{"templateId":207,"entityTypeId":2,"entityId":45,"stampsEnabled":false}'

A 201 response contains the new document in data. For now, find a CRM template with crm.documentgenerator.template.list; its V1 wrapper is part of a separate MR. GET reads the new document. PDF may return 409 DOCUMENT_NOT_READY until generation finishes. An unsupported CRM type produces the native Bitrix24 refusal as 422 BITRIX_ERROR.