[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-entities\u002Fcrm-emails\u002Fsend":3,"docs-tabs-entities\u002Fcrm-emails\u002Fsend":6},{"content":4,"lastmod":5},"## Send a CRM e-mail\n\n`POST \u002Fv1\u002Fdeals\u002F:id\u002Femails`\n\n`POST \u002Fv1\u002Fleads\u002F:id\u002Femails`\n\n`POST \u002Fv1\u002Fcontacts\u002F:id\u002Femails`\n\n`POST \u002Fv1\u002Fcompanies\u002F:id\u002Femails`\n\nSend a real e-mail from CRM using an available sender. The e-mail is linked to the specified CRM record.\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|---|---|---|---|\n| `id` (path) | integer | yes | Record identifier from [deals](\u002Fdocs\u002Fentities\u002Fdeals), [leads](\u002Fdocs\u002Fentities\u002Fleads), [contacts](\u002Fdocs\u002Fentities\u002Fcontacts) or [companies](\u002Fdocs\u002Fentities\u002Fcompanies). |\n\n## Request body\n\n| Field | Type | Required | Description |\n|---|---|---|---|\n| `to` | string[] | yes | Primary recipients. |\n| `subject` | string or null | no | E-mail subject. |\n| `body` | string | yes | E-mail body. |\n| `cc` | string[] or null | no | CC recipients. |\n| `bcc` | string[] or null | no | BCC recipients. |\n| `from` | string or null | no | Available sender address. |\n| `senderId` | integer or null | no | Sender identifier accepted by Bitrix24. |\n| `mailboxId` | integer or null | no | Identifier from [mailboxes](\u002Fdocs\u002Fmail\u002Fmailboxes\u002Flist). |\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X POST \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fdeals\u002F741\u002Femails\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"to\": [\"reader@example.com\"], \"body\": \"Hello\", \"subject\": \"Integration request\"}'\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X POST \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fdeals\u002F741\u002Femails\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"to\": [\"reader@example.com\"], \"body\": \"Hello\", \"subject\": \"Integration request\"}'\n```\n\n### JavaScript — personal key\n\n```javascript\nconst response = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fdeals\u002F741\u002Femails', {\n  method: 'POST',\n  headers: {\"X-Api-Key\": \"YOUR_API_KEY\", \"Content-Type\": \"application\u002Fjson\"},\n  body: JSON.stringify({\"to\": [\"reader@example.com\"], \"body\": \"Hello\", \"subject\": \"Integration request\"}),\n})\nconst result = await response.json()\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst response = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fdeals\u002F741\u002Femails', {\n  method: 'POST',\n  headers: {\"X-Api-Key\": \"YOUR_APP_KEY\", \"Authorization\": \"Bearer USER_SESSION_TOKEN\", \"Content-Type\": \"application\u002Fjson\"},\n  body: JSON.stringify({\"to\": [\"reader@example.com\"], \"body\": \"Hello\", \"subject\": \"Integration request\"}),\n})\nconst result = await response.json()\n```\n\n## Response fields\n\n| Field | Description |\n|---|---|\n| `data.activityId` | Created activity identifier. Read it through [e-mail content](.\u002Fget.md). |\n| `data.parentActivityId` | Original activity identifier, or `null`. |\n| `data.from` | Sender. |\n| `data.to` | Primary recipients. |\n| `data.cc` | CC recipients. |\n| `data.bcc` | BCC recipients. |\n| `data.isSyncedToImap` | Whether a copy was saved in the connected mailbox. |\n| `data.warnings` | Sending and synchronization warnings. |\n\n## Response example\n\nResponse structure with neutral sample data.\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"activityId\": 1204,\n    \"parentActivityId\": null,\n    \"from\": \"sender@example.com\",\n    \"to\": [\n      \"reader@example.com\"\n    ],\n    \"cc\": [],\n    \"bcc\": [],\n    \"isSyncedToImap\": false,\n    \"warnings\": []\n  }\n}\n```\n\n## Error response example\n\n400 — unknown query parameter or a missing required field:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"MISSING_REQUIRED_FIELDS\",\n    \"message\": \"to and body are required\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|---|---|---|\n| 400 | `INVALID_PARAMS` | Invalid type or identifier. |\n| 400 | `UNKNOWN_FILTER_FIELD` | Unknown query parameter. |\n| 400 | `MISSING_REQUIRED_FIELDS` | Missing required body field. |\n| 400 | `UNKNOWN_FIELD` | Unknown body field. |\n| 401 | `TOKEN_MISSING` | The key has no Bitrix24 credentials. |\n| 403 | `SCOPE_DENIED` | The `crm` scope is required. |\n| 403 | `WRITE_BLOCKED_READONLY_KEY` | The key access mode forbids writes. |\n| 404 | `ENTITY_NOT_FOUND` | The record is absent or inaccessible. |\n| 404 | `CRM_EMAIL_ACTIVITY_NOT_FOUND` | The e-mail activity was not found. |\n| 422 | `METHOD_NOT_YET_AVAILABLE` | The method is absent on the account. `error.release` names the required release. |\n| 502 | `BITRIX_UNAVAILABLE` | Bitrix24 is unavailable or returned an invalid response shape. |\n\nOther Bitrix24 refusals retain their original code and message. Common [API errors](\u002Fdocs\u002Ferrors).\n\n## Known behavior\n\nThese are CRM activity e-mails. The [Mail module](\u002Fdocs\u002Fmail) uses different message identifiers.\n\nNever blindly retry after a timeout, interrupted response or 502: the real e-mail may already have been sent. Read the e-mail list first.\n\n## See also\n\n- [CRM settings](\u002Fdocs\u002Fentities\u002Fcrm-settings)\n- [CRM e-mails](\u002Fdocs\u002Fentities\u002Fcrm-emails)\n","2026-11-03",{},1794739351240]