For AI agents: markdown of this page — /docs-content-en/entities/recurring-deals/expose.md documentation index — /llms.txt

Create a deal from a template

POST /v1/recurring-deals/:id/expose

Creates a deal immediately from a recurring deal template. Use it for manual creation when you do not need to wait for the next scheduled run.

Parameters

Parameter Type Required Default Description
Parameterid (path) Typenumber Requiredyes Default— DescriptionSetting ID from the recurring deals list. A positive integer within the safe range

Request fields (body)

The request body can be empty or {}. No fields are accepted.

Examples

curl — personal key

Terminal
curl -X POST "https://vibecode.bitrix24.com/v1/recurring-deals/11/expose" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

curl — OAuth application

Terminal
curl -X POST "https://vibecode.bitrix24.com/v1/recurring-deals/11/expose" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

JavaScript — personal key

javascript
const response = await fetch('https://vibecode.bitrix24.com/v1/recurring-deals/11/expose', {
  method: 'POST',
  headers: { 'X-Api-Key': 'YOUR_API_KEY', 'Content-Type': 'application/json' },
  body: JSON.stringify({}),
})
const result = await response.json()
if (!result.success) throw new Error(result.error.message)
console.log(result.data)

JavaScript — OAuth application

javascript
const response = await fetch('https://vibecode.bitrix24.com/v1/recurring-deals/11/expose', {
  method: 'POST',
  headers: { 'X-Api-Key': 'YOUR_APP_KEY', 'Authorization': 'Bearer USER_SESSION_TOKEN', 'Content-Type': 'application/json' },
  body: JSON.stringify({}),
})
const result = await response.json()
if (!result.success) throw new Error(result.error.message)
console.log(result.data)

Response fields

Field Type Required Description
Fieldsuccess Typeboolean Requiredyes Descriptiontrue on successful creation
Fielddata Typeobject Requiredyes DescriptionThe created deal
Fielddata.dealId Typenumber Requiredyes DescriptionID of the new deal. Get the deal: by ID
Fielddata.links Typeobject Requiredyes DescriptionLinks to the created deal
Fielddata.links.deal Typestring Requiredyes DescriptionRelative path to the deal resource: /v1/deals/:dealId

Response example

201 — the deal is created:

JSON
{
  "success": true,
  "data": {
    "dealId": 52,
    "links": {
      "deal": "/v1/deals/52"
    }
  }
}

Error response example

400 — a field is passed in the request body:

JSON
{
  "success": false,
  "error": {
    "code": "INVALID_PARAMS",
    "message": "This action accepts no fields"
  }
}

Errors

HTTP Code Description
HTTP400 CodeINVALID_PARAMS Descriptionid is not a positive integer within the safe range
HTTP400 CodeINVALID_PARAMS DescriptionThe request body contains fields, or is null, an array or a scalar instead of an object. Message: This action accepts no fields
HTTP404 CodeENTITY_NOT_FOUND DescriptionA setting with this ID is not found
HTTP502 CodeBITRIX_RESPONSE_INVALID DescriptionThe Bitrix24 response contains no valid ID of the created deal
HTTP403 CodeMANAGEMENT_KEY_NO_ENTITY_ACCESS DescriptionA management key has no access to entity data
HTTP403 CodeWRITE_BLOCKED_READONLY_KEY DescriptionThe key passed the scope check, but its mode forbids creating a deal
HTTP401 CodeMISSING_API_KEY DescriptionThe X-Api-Key header is not passed
HTTP401 CodeTOKEN_MISSING DescriptionNo Bitrix24 access tokens are configured
HTTP403 CodeSCOPE_DENIED DescriptionThe key lacks the crm scope
HTTP403 CodeBITRIX_ACCESS_DENIED DescriptionBitrix24 denied access
HTTP422 CodeBITRIX_ERROR DescriptionA Bitrix24 business refusal or a plan restriction. The reason is in error.message
HTTP503 CodeBITRIX_TIMEOUT DescriptionBitrix24 did not respond in time
HTTP502 CodeBITRIX_UNAVAILABLE DescriptionA network failure or a Bitrix24 server error with HTTP status 500 and above
HTTP429 CodeRATE_LIMITED DescriptionThe request limit is exceeded. The wait time is in the Retry-After header

Full list of common API errors — Errors.

See also