b24_crm_activity_add
Create a CRM activity by specifying owner type, owner ID, type, subject, and communications. Returns the new activity ID.
Instructions
Create a CRM activity (crm.activity.add). Returns the new activity id.
Activities are complex; call b24_call('crm.activity.fields') first to see the required shape (especially COMMUNICATIONS for calls/emails).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fields | Yes | Activity fields. Minimum: OWNER_TYPE_ID, OWNER_ID, TYPE_ID, SUBJECT, COMMUNICATIONS. See crm.activity.fields for the full schema. | |
| webhook_url | No | Override the default incoming webhook for this call (https://<portal>/rest/<user_id>/<token>/). If omitted, uses personal_webhook, then the X-B24-Webhook HTTP header, then the BITRIX_WEBHOOK_URL env default. | |
| personal_webhook | No | Act as a specific user (their personal incoming webhook). Takes precedence over webhook_url. Required to write to the portal under that user's permissions. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |