# 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.

```bash
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](./crm-get.md) reads the new document. [PDF](./pdf.md) may return `409 DOCUMENT_NOT_READY` until generation finishes. An unsupported CRM type produces the native Bitrix24 refusal as `422 BITRIX_ERROR`.
