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 even for an inactive template. This is a write action; repeating it can create another deal. Takes no fields. Returns 201 with the new dealId and a relative link to /v1/deals/:dealId.

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

Response fields

Field Type Meaning
success boolean Success flag
data.dealId number New deal ID; get deal
data.links.deal string Relative deal resource link

Example

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)

Errors

HTTP Code Condition
401 MISSING_API_KEY API key missing
403 SCOPE_DENIED crm scope missing
400 INVALID_PARAMS Invalid ID, enum or value shape
403 BITRIX_ACCESS_DENIED Bitrix24 refused access
422 BITRIX_ERROR Original Bitrix24 business refusal or plan limitation
403 WRITE_BLOCKED_READONLY_KEY Write using a read-only key
404 ENTITY_NOT_FOUND Recurring deal is not found.
502 BITRIX_RESPONSE_INVALID Created deal ID missing

System errors. Batch sub-call errors are returned within the batch result.

MCP: generic entity tools with entity: "recurring-deals"; expose uses call_api with POST and this path.

See also