Коммуникации · Отправка
communications_send
Попробуйте три запроса
- Вы указываетеКлиент
- ПомощникПодготовка
- Вы получаетеПредпросмотр
Подготовь «Коммуникации / Отправка». Для изменения нужны integrationId, текст. Покажи объект и ожидаемый эффект до выполнения.
- integrationId
- Параметр
- text
- Текст
- customerId
- Клиент
- Вы указываетеСогласованные значения
- ПомощникОдин вызов
- Вы получаетеОтвет операции
На учебной записи подготовь «Коммуникации / Отправка» с параметром customerId = DEMO-101. Покажи остальные обязательные значения и выполни действие, когда согласованы все поля.
- customerId
- DEMO-101
- integrationId
- DEMO-101
- replyToMessageId
- DEMO-101
- Вы указываетеИсходный ответ
- ПомощникСверка результата
- Вы получаетеПодтверждение
Проверь результат «Коммуникации / Отправка» по исходному ответу. Покажи messageId, статус. Объясни, чем подтвердить эффект для выбранного объекта.
- ЗапросСохранить исходный ключ
- ОтветПроверить статус
- ПроверкаСверить эффект операции
Как работает действие
Этот вызов может изменить рабочие данные. Согласуйте точный объект, новые значения и ожидаемый результат. Присвойте операции стабильный requestId. При повторе той же операции используйте прежний ключ и те же значения. Если связь оборвётся, используйте способ восстановления из описания разработчика ниже. Посмотрите в контракте, какие сообщения действительно отправляются и какие остаются подготовленными.
Описание разработчика
Queue one message or a reply through the existing outbound-message action. Select integrationId from integrations_list_status. For SMS, select recipient.channel=sms and an authorized Twilio integration ID. When the user supplies a WhatsApp (including Wazzup)/phone/email/provider address, use recipient {channel,address}; a CRM customer is not required. Otherwise use the exact customerId/contactPointId from customer_contacts. Never switch to the web UI just because a conversation has no customer profile. Optionally select replyToMessageId from message_get or conversation_messages; the parent must be visible and match the same customer or explicit recipient and company integration. For a native Gmail, Mailgun or Outlook integration, optional subject sets the email subject and html=true interprets text as HTML. Omit subject to retain native reply subject handling. Other channels reject email-only fields. Optional attachments accepts native message fingerprints or completed private fileId/mediaId references from files_get/media_get. Private attachments require media.read plus current source entity access, a Gmail/Mailgun/Outlook, WhatsApp Cloud, Instagram Login, Messenger or Channex integration, at most five files and 2500 KiB total. Instagram Login private attachments support JPEG/PNG/WebP images; Channex supports those images and PDF. Private bytes stay backend-side; no public URLs, credentials or base64. Native routing checks and quoted reply handling remain authoritative. The server resolves the exact stored recipient and rejects stale or foreign contact fingerprints. This queues delivery; use message_get for delivery status and provider-window guidance. After a lost response use communications_get_send_result with the original arguments; communications_resume_send retains native idempotency. It does not send bulk campaigns or bypass messaging windows.
Параметры запроса
- customerId
- Идентификатор клиента, выбранного по результату поиска. необязательно · string · до символов 160
- contactPointId
- Exact current customer_contacts fingerprint. Alternative to recipient; never fabricate a customer to send a message. необязательно · string
- recipient
- Explicit user-selected address, including WhatsApp phone number. Use instead of customerId/contactPointId when no CRM customer exists. For a reply copy the exact contact method from an accessible message. необязательно · object
- integrationId
- Canonical company integration ID returned by integrations_list_status; selects the intended channel explicitly. обязательно по схеме · string · до символов 160
- replyToMessageId
- Optional canonical message ID from message_get or conversation_messages. The server verifies this parent belongs to the selected customer, allowed location and company integration. Provider message IDs, conversation IDs and paths are not accepted. Omit to queue a new message. необязательно · string · до символов 160
- text
- Nonempty body for this single recipient, at most 4000 characters; plain text unless html=true for a supported email integration. обязательно по схеме · string · до символов 4000
- subject
- Optional email subject, at most 200 characters and no control characters. Supported only by native Gmail/Mailgun/Outlook integrations. Omit to retain the existing reply subject. необязательно · string · до символов 200
- html
- For a native Gmail/Mailgun/Outlook integration only, true means text contains HTML; false or omitted sends plain text. This never changes the selected recipient or integration. необязательно · boolean
- attachments
- Existing native message references, or completed private fileId/mediaId references. Private references require media.read and entity access; supported by native Gmail/Mailgun/Outlook, WhatsApp Cloud and Messenger, up to five and 2500 KiB total. WhatsApp Cloud and Messenger accept images, MP4, PDF, plain text and Office; other file types and Wazzup transport are rejected. Messenger text is limited to 2000 characters. Select either native image/audio references or private references in one message. No URLs, paths, credentials or base64. Rechecked before send, delivery and recovery. необязательно · array · до элементов 5
- requestId
- Ключ этой операции. Для повтора с теми же аргументами сохраните исходное значение. обязательно по схеме · string · до символов 128
Что вернёт команда
- messageId
- Canonical root message identifier returned by the existing dispatcher. обязательно по схеме · string
- status
- Accepted or queued state; provider delivery is verified later from message status. обязательно по схеме · string
- created
- Whether the existing outbound action created a new message or returned the prior idempotent result. обязательно по схеме · boolean
Поля и технические схемы

Вход · JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"customerId": {
"description": "Existing customer ID, used together with contactPointId. Omit both when using an explicit recipient.",
"type": "string",
"minLength": 1,
"maxLength": 160,
"pattern": "^[A-Za-z0-9_~:@+.-]+$"
},
"contactPointId": {
"description": "Exact current customer_contacts fingerprint. Alternative to recipient; never fabricate a customer to send a message.",
"type": "string",
"pattern": "^cp_[a-f0-9]{64}$"
},
"recipient": {
"description": "Explicit user-selected address, including WhatsApp phone number. Use instead of customerId/contactPointId when no CRM customer exists. For a reply copy the exact contact method from an accessible message.",
"type": "object",
"properties": {
"channel": {
"type": "string",
"enum": [
"whatsapp",
"messenger",
"instagram",
"telegram",
"sms",
"email",
"imessage",
"channex",
"hospitable"
],
"description": "Explicit intended messaging channel. Messenger uses the Facebook messaging integration; an advertising or social publishing integration cannot send a DM."
},
"address": {
"type": "string",
"minLength": 1,
"maxLength": 320,
"description": "Recipient explicitly supplied by the user or read from an accessible conversation. Phone numbers must include + and country code; Messenger/Instagram use scoped numeric recipient IDs, Telegram uses its numeric chat ID. Never invent an ID from a name or handle."
}
},
"required": [
"channel",
"address"
],
"additionalProperties": false
},
"integrationId": {
"type": "string",
"minLength": 1,
"maxLength": 160,
"pattern": "^[A-Za-z0-9_~:@+.-]+$",
"description": "Canonical company integration ID returned by integrations_list_status; selects the intended channel explicitly."
},
"replyToMessageId": {
"description": "Optional canonical message ID from message_get or conversation_messages. The server verifies this parent belongs to the selected customer, allowed location and company integration. Provider message IDs, conversation IDs and paths are not accepted. Omit to queue a new message.",
"type": "string",
"minLength": 1,
"maxLength": 160,
"pattern": "^[A-Za-z0-9_~:@+.-]+$"
},
"text": {
"type": "string",
"minLength": 1,
"maxLength": 4000,
"description": "Nonempty body for this single recipient, at most 4000 characters; plain text unless html=true for a supported email integration."
},
"subject": {
"description": "Optional email subject, at most 200 characters and no control characters. Supported only by native Gmail/Mailgun/Outlook integrations. Omit to retain the existing reply subject.",
"type": "string",
"minLength": 1,
"maxLength": 200
},
"html": {
"description": "For a native Gmail/Mailgun/Outlook integration only, true means text contains HTML; false or omitted sends plain text. This never changes the selected recipient or integration.",
"type": "boolean"
},
"attachments": {
"description": "Existing native message references, or completed private fileId/mediaId references. Private references require media.read and entity access; supported by native Gmail/Mailgun/Outlook, WhatsApp Cloud and Messenger, up to five and 2500 KiB total. WhatsApp Cloud and Messenger accept images, MP4, PDF, plain text and Office; other file types and Wazzup transport are rejected. Messenger text is limited to 2000 characters. Select either native image/audio references or private references in one message. No URLs, paths, credentials or base64. Rechecked before send, delivery and recovery.",
"minItems": 1,
"maxItems": 5,
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"properties": {
"messageId": {
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$",
"description": "Accessible canonical root message ID containing the original stored attachment."
},
"attachmentId": {
"type": "string",
"pattern": "^ma_[a-f0-9]{64}$",
"description": "Exact current attachment fingerprint from communications_list_message_attachments. It binds the company, source message, media kind and stored URI."
}
},
"required": [
"messageId",
"attachmentId"
],
"additionalProperties": false
},
{
"anyOf": [
{
"type": "object",
"properties": {
"fileId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Completed private file UUID from files_get/list. Bytes, URLs and credentials stay backend-side."
}
},
"required": [
"fileId"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"mediaId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Completed managed image UUID from media_get/list. The native transport receives sanitized bytes privately."
}
},
"required": [
"mediaId"
],
"additionalProperties": false
}
]
}
]
}
},
"requestId": {
"type": "string",
"minLength": 8,
"maxLength": 128,
"pattern": "^[A-Za-z0-9_-]+$",
"description": "Stable request ID for this exact outbound message, using letters, digits, underscores or hyphens; reuse unchanged for network retries. Changing the reply target requires a new request ID."
}
},
"required": [
"integrationId",
"text",
"requestId"
],
"additionalProperties": false
}Выход · JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"messageId": {
"type": "string",
"description": "Canonical root message identifier returned by the existing dispatcher."
},
"status": {
"type": "string",
"description": "Accepted or queued state; provider delivery is verified later from message status."
},
"created": {
"type": "boolean",
"description": "Whether the existing outbound action created a new message or returned the prior idempotent result."
}
},
"required": [
"messageId",
"status",
"created"
],
"additionalProperties": false
}