[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-entities\u002Fquotes\u002Fcreate":3,"docs-tabs-entities\u002Fquotes\u002Fcreate":6},{"content":4,"lastmod":5},"\n## Create a quote\n\n`POST \u002Fv1\u002Fquotes`\n\nCreates a new quote in CRM.\n\n## Request fields (body)\n\n| Parameter | Type | Required | Description |\n|----------|-----|:-----:|---------|\n| `title` | string | no | Quote name. If omitted, Bitrix24 assigns a name containing the quote number |\n| `opportunity` | number | no | Amount. To prevent the amount from being recalculated from line items, pass it together with `isManualOpportunity: true`. The camelCase name `amount` is also accepted |\n| `isManualOpportunity` | boolean | no | `true` — manual amount mode (required if you set `opportunity`\u002F`amount` directly). Accepts a boolean or the string `\"Y\"` |\n| `currencyId` | string | no | Currency. List: `GET \u002Fv1\u002Fcurrencies` |\n| `stageId` | string | no | Status: `DRAFT`, `SENT`, `APPROVED`. List: `GET \u002Fv1\u002Fstatuses?filter[entityId]=QUOTE_STATUS` |\n| `dealId` | number | no | Deal ID. Lookup: `GET \u002Fv1\u002Fdeals` |\n| `contactId` | number | no | Contact ID. Lookup: `GET \u002Fv1\u002Fcontacts` |\n| `companyId` | number | no | Company ID. Lookup: `GET \u002Fv1\u002Fcompanies` |\n| `assignedById` | number | no | Assignee ID. Employee list: `GET \u002Fv1\u002Fusers` |\n| `comments` | string | no | Comment |\n| `begindate` | datetime | no | Start date |\n| `closedate` | datetime | no | Close date |\n\nNo field is required, but the body must contain at least one field.\n\n> **Field names.** In responses, fields are returned in camelCase: `amount`, `currency`, `beginDate`, `closeDate`. On write, both forms are accepted: these camelCase names and the Bitrix24-native `opportunity` \u002F `currencyId` \u002F `begindate` \u002F `closedate`. The API layer maps them to the names Bitrix24 expects.\n\nFull list of fields: [GET \u002Fv1\u002Fquotes\u002Ffields](\u002Fdocs\u002Fentities\u002Fquotes\u002Ffields). User fields (`ufCrm_*`) are also accepted.\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X POST https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fquotes \\\n  -H \"X-Api-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"title\": \"Quote for server hardware\",\n    \"opportunity\": 1500,\n    \"isManualOpportunity\": true,\n    \"currencyId\": \"USD\",\n    \"stageId\": \"DRAFT\",\n    \"dealId\": 741,\n    \"assignedById\": 1\n  }'\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X POST https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fquotes \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"title\": \"Quote for server hardware\",\n    \"opportunity\": 1500,\n    \"isManualOpportunity\": true,\n    \"currencyId\": \"USD\",\n    \"stageId\": \"DRAFT\",\n    \"dealId\": 741,\n    \"assignedById\": 1\n  }'\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fquotes', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({\n    title: 'Quote for server hardware',\n    opportunity: 1500,\n    isManualOpportunity: true,\n    currencyId: 'USD',\n    stageId: 'DRAFT',\n    dealId: 741,\n    assignedById: 1,\n  }),\n})\n\nconst { success, data } = await res.json()\nconsole.log('Quote ID:', data.id)\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fquotes', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({\n    title: 'Quote for server hardware',\n    opportunity: 1500,\n    isManualOpportunity: true,\n    currencyId: 'USD',\n    stageId: 'DRAFT',\n    dealId: 741,\n    assignedById: 1,\n  }),\n})\n\nconst { success, data } = await res.json()\n```\n\n## Response fields\n\n| Field | Type | Description |\n|------|-----|---------|\n| `success` | boolean | `true` when the quote is created |\n| `data` | object | The created quote. The main fields are listed in the rows below; all fields — [Quote fields](\u002Fdocs\u002Fentities\u002Fquotes\u002Ffields) |\n| `data.id` | number | ID of the created quote |\n| `data.title` | string | Name |\n| `data.amount` | number | Amount |\n| `data.currency` | string | Currency |\n| `data.stageId` | string | Status |\n| `data.dealId` | number | Deal ID |\n| `data.assignedById` | number | Assignee |\n| `data.createdBy` | number | Creator |\n| `data.createdTime` | datetime | Creation date |\n| `data.updatedTime` | datetime | Modification date |\n\nThe response contains all quote fields, including user fields (`ufCrm_*`). The main ones are shown above.\n\nThe URL of the quote card in Bitrix24 is built from `id`:\n\n```\nhttps:\u002F\u002F\u003Cportal>.bitrix24.com\u002Fcrm\u002Ftype\u002F7\u002Fdetails\u002F\u003Cid>\u002F\n```\n\n`7` — the `entityTypeId` of a quote in Bitrix24. `\u003Cportal>` — the Bitrix24 portal domain. Access is restricted by the employee's permissions in Bitrix24.\n\n## Response example\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"id\": 412,\n    \"title\": \"Quote for server hardware\",\n    \"amount\": 1500,\n    \"isManualOpportunity\": true,\n    \"currency\": \"USD\",\n    \"stageId\": \"DRAFT\",\n    \"dealId\": 741,\n    \"contactId\": 0,\n    \"companyId\": 0,\n    \"assignedById\": 1,\n    \"createdBy\": 1,\n    \"comments\": \"\",\n    \"beginDate\": \"2026-04-15T00:00:00.000Z\",\n    \"closeDate\": \"2026-05-15T00:00:00.000Z\",\n    \"createdTime\": \"2026-04-15T10:30:00.000Z\",\n    \"updatedTime\": \"2026-04-15T10:30:00.000Z\"\n  }\n}\n```\n\n## Error response example\n\n403 — no scope:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"SCOPE_DENIED\",\n    \"message\": \"This endpoint requires 'crm' scope\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|---------|\n| 403 | `SCOPE_DENIED` | The API key lacks the `crm` scope |\n| 401 | `TOKEN_MISSING` | The API key has no configured tokens |\n| 400 | `EMPTY_CREATE_BODY` | The request body is empty — pass at least one field |\n| 400 | `INVALID_REQUEST` | Invalid fields |\n| 400 | `READONLY_FIELD` | The request body contains a read-only field, such as `clientTitle`. Such fields are marked in the RO column of [Quote fields](\u002Fdocs\u002Fentities\u002Fquotes\u002Ffields) |\n\nFull list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## See also\n\n- [Working with files in CRM fields](\u002Fdocs\u002Frecipes\u002Fcrm-files)\n- [List quotes](\u002Fdocs\u002Fentities\u002Fquotes\u002Flist)\n- [Quote fields](\u002Fdocs\u002Fentities\u002Fquotes\u002Ffields)\n- [Entity API](\u002Fdocs\u002Fentity-api)\n- [Filtering syntax](\u002Fdocs\u002Ffiltering)\n- [Batch](\u002Fdocs\u002Fbatch)\n- [Limits and optimization](\u002Fdocs\u002Foptimization)\n","2026-10-16",{},1794739406360]