MessageCreate
Schema for creating/sending a new message. Supports 3 resolution modes: **Mode 1: conversation_id only** (reply to existing conversation) - Provide just `conversation_id` and `text`. The recipient (`to`) is automatically resolved from the conversation's contact method or last inbound message. - Example: ``{"conversation_id": "...", "text": "Hello!"}`` **Mode 2: contact_method_id** (cleanest, resolves everything) - Provide `contact_method_id` and `text`. The `to`, `channel_id`, and `contact_id` are all resolved from the contact method record. - Example: ``{"contact_method_id": "...", "text": "Hello!"}`` **Mode 3: contact_id + optional to + channel_id** (explicit, auto-creates contact_method) - Provide `contact_id` (and optionally `to` and `channel_id`). The conversation is auto-resolved from the contact. A contact_method is auto-created if one doesn't exist. - Example: ``{"contact_id": "...", "to": "+49...", "text": "Hello!"}`` Fields: - to: Recipient external ID (phone, telegram_id, etc.) - optional when conversation_id or contact_method_id is provided - conversation_id: Optional, conversation to send in (auto-resolved if not provided) - contact_method_id: Optional, cleanest way to send - resolves to, channel_id, and contact_id automatically - contact_id: Optional, used to auto-resolve conversation when conversation_id is omitted - channel_id: Optional, used when creating a new conversation or for ambiguous recipients - message_type: Optional, defaults to "text" - text: Message content - attachments: Optional list of attachment IDs - meta: Optional customer-defined metadata
Properties
| Name | Type | Description |
|---|---|---|
| to | object | Recipient external ID (phone, telegram_id, etc.) - optional when conversation_id or contact_method_id provided |
| channel_id | object | Channel UUID (used when creating new conversation or for ambiguous recipients) |
| conversation_id | object | Conversation UUID (auto-resolved from contact_id if not provided) |
| contact_method_id | object | Contact method UUID - cleanest way to send, resolves to, channel_id, and contact_id automatically |
| contact_id | object | Contact UUID (used to auto-resolve conversation when conversation_id is omitted) |
| message_type | object | Message type |
| reply_to_message_id | object | Optional UUID of a prior message in the SAME conversation to reply to (threaded / quote reply). The target message must already have a platform external_id; the outbound message is sent as a native qu |
| text | object | Message text content |
| subject | object | Email subject line — REQUIRED for email channel sends, ignored for chat-app channels (whatsapp/telegram/sms/etc.). When omitted for an email reply, the conversation's existing subject is used (prefixe |
| attachments | object | Attachment IDs (UUIDs) returned from POST /api/v1/attachments/upload or POST /api/v1/attachments/from-url. Do NOT pass raw URLs here — fetch them via /attachments/from-url first to get an ID. Accepts |
| attachment_filenames | object | Optional per-message display-filename overrides for `attachments`, aligned positionally by index (entry N overrides the filename of `attachments[N]`). Controls the filename shown to the recipient — e. |
| meta | object | Customer metadata |
| is_voice | boolean | Mark this message as a voice message (push-to-talk). Only valid when `message_type` is `audio` AND at least one attachment (the recorded audio) is supplied; the server rejects the send (422 `INVALID_V |
| include_signature | object | Append the sender's email signature to outbound email (EmailSignature for the user, falling back to EmailSignatureTemplate for the tenant). Default `true` for email; ignored for chat-app channels. |
| signature_html | object | Email only: an edited signature for this message, used instead of the saved one when include_signature is true (sanitized, placeholders resolved). |
| signature_mode | object | Email only: mode of `signature_html`. `html` = pasted HTML signature (tables, inline CSS), sanitized with the HTML allowlist and appended as is, never reformatted (max 60,000 chars). Omitted/`rich` = |
| sender_id | object | Optional sender override for email channel sends. The id either of an EmailIntegration (proxy / gmail / smtp-imap / ses-managed) or an EmailProviderConfig (SendGrid / Mailgun / SES). Surface candidate |
| message_traffic_type | object | RCS only. Declares the traffic class of this send to the mobile carrier (`AgentMessage.messageTrafficType`): one of `AUTHENTICATION`, `TRANSACTION`, `PROMOTION`, `SERVICEREQUEST`, `ACKNOWLEDGEMENT`. T |
| channel_options | object | Channel-specific send options. Currently only `tag` for Instagram and Facebook Messenger (`{"tag": "HUMAN_AGENT"}` or `{"tag": "none"}`). HUMAN_AGENT is only for replies genuinely written by a human a |
| content_format | object | How the send pipeline must treat the message body. `plain` (the default when omitted) = human-typed text, passed through to the channel UNTOUCHED. `markdown` = canonical markdown that the channel adap |
| content | object | DEPRECATED: use text and message_type directly |
| metadata | object | DEPRECATED: use meta |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://artifacts.apis.io/sendseven-com/json-schema/sendseven-com-message-create-schema.json",
"title": "MessageCreate",
"description": "Schema for creating/sending a new message.\n\nSupports 3 resolution modes:\n\n**Mode 1: conversation_id only** (reply to existing conversation)\n- Provide just `conversation_id` and `text`. The recipient (`to`) is automatically\n resolved from the conversation's contact method or last inbound message.\n- Example: ``{\"conversation_id\": \"...\", \"text\": \"Hello!\"}``\n\n**Mode 2: contact_method_id** (cleanest, resolves everything)\n- Provide `contact_method_id` and `text`. The `to`, `channel_id`, and `contact_id`\n are all resolved from the contact method record.\n- Example: ``{\"contact_method_id\": \"...\", \"text\": \"Hello!\"}``\n\n**Mode 3: contact_id + optional to + channel_id** (explicit, auto-creates contact_method)\n- Provide `contact_id` (and optionally `to` and `channel_id`). The conversation is\n auto-resolved from the contact. A contact_method is auto-created if one doesn't exist.\n- Example: ``{\"contact_id\": \"...\", \"to\": \"+49...\", \"text\": \"Hello!\"}``\n\nFields:\n- to: Recipient external ID (phone, telegram_id, etc.) - optional when conversation_id\n or contact_method_id is provided\n- conversation_id: Optional, conversation to send in (auto-resolved if not provided)\n- contact_method_id: Optional, cleanest way to send - resolves to, channel_id, and\n contact_id automatically\n- contact_id: Optional, used to auto-resolve conversation when conversation_id is omitted\n- channel_id: Optional, used when creating a new conversation or for ambiguous recipients\n- message_type: Optional, defaults to \"text\"\n- text: Message content\n- attachments: Optional list of attachment IDs\n- meta: Optional customer-defined metadata",
"x-generated": "2026-11-24",
"x-method": "derived",
"x-generator": "derive-json-schema.py",
"x-source": "openapi/sendseven-com-openapi.json#/components/schemas/MessageCreate",
"properties": {
"to": {
"anyOf": [
{},
{
"type": "null"
}
],
"title": "To",
"description": "Recipient external ID (phone, telegram_id, etc.) - optional when conversation_id or contact_method_id provided"
},
"channel_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Channel Id",
"description": "Channel UUID (used when creating new conversation or for ambiguous recipients)"
},
"conversation_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Conversation Id",
"description": "Conversation UUID (auto-resolved from contact_id if not provided)"
},
"contact_method_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Contact Method Id",
"description": "Contact method UUID - cleanest way to send, resolves to, channel_id, and contact_id automatically"
},
"contact_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Contact Id",
"description": "Contact UUID (used to auto-resolve conversation when conversation_id is omitted)"
},
"message_type": {
"$ref": "#/$defs/MessageType",
"description": "Message type",
"default": "text"
},
"reply_to_message_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Reply To Message Id",
"description": "Optional UUID of a prior message in the SAME conversation to reply to (threaded / quote reply). The target message must already have a platform external_id; the outbound message is sent as a native quote-reply on channels that support it (WhatsApp, Telegram, Instagram, Live Chat). Rejected with 4xx if the target is not found in this conversation or has no external_id yet."
},
"text": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Text",
"description": "Message text content"
},
"subject": {
"anyOf": [
{
"type": "string",
"maxLength": 998
},
{
"type": "null"
}
],
"title": "Subject",
"description": "Email subject line — REQUIRED for email channel sends, ignored for chat-app channels (whatsapp/telegram/sms/etc.). When omitted for an email reply, the conversation's existing subject is used (prefixed with 'Re: ' if not already). The API rejects an email send with no resolvable subject (SendGrid 400s on empty subject)."
},
"attachments": {
"anyOf": [
{
"type": "string"
},
{
"items": {
"type": "string"
},
"type": "array"
}
],
"title": "Attachments",
"description": "Attachment IDs (UUIDs) returned from POST /api/v1/attachments/upload or POST /api/v1/attachments/from-url. Do NOT pass raw URLs here — fetch them via /attachments/from-url first to get an ID.\n\nAccepts either an array or a single bare ID string (`\"<uuid>\"` is treated as `[\"<uuid>\"]`). Whitespace is trimmed and empty entries are dropped.\n\nOn channels that can only carry ONE media object per message (WhatsApp, Telegram, Messenger, Instagram, SMS/MMS, browser push, RCS) several attachments are delivered as several messages — one per attachment, with `text` used as the caption of the FIRST one. This response returns the first message; the additional ones are listed in `related_message_ids`. Email (MIME parts) and live chat deliver all attachments inside a single message."
},
"attachment_filenames": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Attachment Filenames",
"description": "Optional per-message display-filename overrides for `attachments`, aligned positionally by index (entry N overrides the filename of `attachments[N]`). Controls the filename shown to the recipient — e.g. Meta's `filename` field on a WhatsApp document, so the user sees `Invoice-2026.pdf` instead of the stored object name. When omitted (or an entry is null/empty), the send path falls back to the original filename stored on the Attachment record (`attachments.filename`). If the list is shorter than `attachments`, only the leading attachments are overridden; extra entries beyond the number of attachments are ignored. Every entry now takes effect: on a channel that delivers one attachment per message, entry N is the filename of the message carrying `attachments[N]`."
},
"meta": {
"additionalProperties": true,
"type": "object",
"title": "Meta",
"description": "Customer metadata"
},
"is_voice": {
"type": "boolean",
"title": "Is Voice",
"description": "Mark this message as a voice message (push-to-talk). Only valid when `message_type` is `audio` AND at least one attachment (the recorded audio) is supplied; the server rejects the send (422 `INVALID_VOICE_MESSAGE`) otherwise. The recorded file is the first entry in `attachments` (a normal Attachment ID); it is converted to the channel's native voice format before delivery. The duration is determined automatically from the recorded attachment and stored on the message as `meta.duration_ms` (alongside `meta.is_voice`; sibling meta keys are preserved). If it cannot be read at send time, `meta.duration_ms` is filled in once the recording has been processed. Voice messages are limited to 5 minutes (300000 ms): a longer recording is rejected with 422 `INVALID_VOICE_MESSAGE`, or, if its length can only be determined during processing, the message fails delivery (status `failed`). Default false: ordinary audio file send (unchanged behavior).",
"default": false
},
"include_signature": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Include Signature",
"description": "Append the sender's email signature to outbound email (EmailSignature for the user, falling back to EmailSignatureTemplate for the tenant). Default `true` for email; ignored for chat-app channels."
},
"signature_html": {
"anyOf": [
{
"type": "string",
"maxLength": 60000
},
{
"type": "null"
}
],
"title": "Signature Html",
"description": "Email only: an edited signature for this message, used instead of the saved one when include_signature is true (sanitized, placeholders resolved)."
},
"signature_mode": {
"anyOf": [
{
"type": "string",
"enum": [
"rich",
"html"
]
},
{
"type": "null"
}
],
"title": "Signature Mode",
"description": "Email only: mode of `signature_html`. `html` = pasted HTML signature (tables, inline CSS), sanitized with the HTML allowlist and appended as is, never reformatted (max 60,000 chars). Omitted/`rich` = visual-editor signature (max 20,000)."
},
"sender_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Sender Id",
"description": "Optional sender override for email channel sends. The id either of an EmailIntegration (proxy / gmail / smtp-imap / ses-managed) or an EmailProviderConfig (SendGrid / Mailgun / SES). Surface candidates via GET /api/v1/conversations/{id}/sender-options. The server validates the choice against the user's EmailMailbox ACL, additionally allowing the conversation's default reply sender (the receiving connection's outbound_provider) even when the user is not on that mailbox's ACL. Ignored for non-email channels."
},
"message_traffic_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Message Traffic Type",
"description": "RCS only. Declares the traffic class of this send to the mobile carrier (`AgentMessage.messageTrafficType`): one of `AUTHENTICATION`, `TRANSACTION`, `PROMOTION`, `SERVICEREQUEST`, `ACKNOWLEDGEMENT`. This is a REGULATORY declaration, not a billing option — if the message is marketing you must declare `PROMOTION`. Omitted (the default) means `SERVICEREQUEST`, which is correct only for replies to a customer's own enquiry. Unrecognised values are ignored (the default applies) rather than failing the send. Ignored by all non-RCS channels."
},
"channel_options": {
"anyOf": [
{
"$ref": "#/$defs/MessageChannelOptions"
},
{
"type": "null"
}
],
"description": "Channel-specific send options. Currently only `tag` for Instagram and Facebook Messenger (`{\"tag\": \"HUMAN_AGENT\"}` or `{\"tag\": \"none\"}`). HUMAN_AGENT is only for replies genuinely written by a human agent, never for automation, bots or AI: Meta may revoke messaging access for misuse. Sends outside Meta's messaging window are not blocked by SendSeven; Meta decides and a rejection arrives as `message.failed`. 422 `channel_option_not_supported` for HUMAN_AGENT on any other channel."
},
"content_format": {
"anyOf": [
{
"type": "string",
"enum": [
"markdown",
"plain"
]
},
{
"type": "null"
}
],
"title": "Content Format",
"description": "How the send pipeline must treat the message body. `plain` (the default when omitted) = human-typed text, passed through to the channel UNTOUCHED. `markdown` = canonical markdown that the channel adapter renders into each channel's own formatting. Omit this for normal human replies — only AI/bot/flow-generated content should opt into `markdown`. Stored on the message as `meta.content_format`; absence is always treated as `plain`."
},
"content": {
"anyOf": [
{
"$ref": "#/$defs/MessageContent"
},
{
"type": "null"
}
],
"description": "DEPRECATED: use text and message_type directly"
},
"metadata": {
"additionalProperties": true,
"type": "object",
"title": "Metadata",
"description": "DEPRECATED: use meta"
}
},
"type": "object",
"$defs": {
"MessageChannelOptions": {
"properties": {
"tag": {
"anyOf": [
{
"type": "string",
"enum": [
"HUMAN_AGENT",
"none"
]
},
{
"type": "null"
}
],
"title": "Tag",
"description": "Meta message tag for Instagram and Facebook Messenger replies. `HUMAN_AGENT` sends a reply 24 hours to 7 days after the customer's last message with Meta's Human Agent tag. Only valid for a reply genuinely written by a human agent, never for automation, bots or AI-generated text: Meta may revoke messaging access for misuse. Within 24 hours, and after 7 days, the message is sent untagged. `none` = never tag. Omitted = requests authenticated with an API key or OAuth token are never tagged; signed-in agents in the SendSeven app are tagged automatically. SendSeven never blocks a send because of the messaging window: Meta decides, and a rejection arrives as status `failed` / the `message.failed` webhook with an explanatory `error_message`. `HUMAN_AGENT` on any other channel is a 422 `channel_option_not_supported`."
}
},
"additionalProperties": false,
"type": "object",
"title": "MessageChannelOptions",
"description": "Per-channel send options on ``POST /api/v1/messages`` (Instagram + Messenger only)."
},
"MessageContent": {
"properties": {
"text": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Text"
},
"type": {
"$ref": "#/$defs/MessageType",
"default": "text"
}
},
"type": "object",
"title": "MessageContent",
"description": "Message content (legacy schema)"
},
"MessageType": {
"type": "string",
"enum": [
"text",
"image",
"video",
"audio",
"document",
"location",
"contact",
"sticker",
"system",
"quick_reply",
"interactive",
"carousel",
"button",
"file",
"reaction",
"referral",
"whatsapp_template",
"kb_response",
"notification",
"call",
"order"
],
"title": "MessageType",
"description": "Message content type (lowercase to match MySQL ENUM values).\n\nMUST stay in lockstep with ``app.models.message.MessageType`` AND the\nMySQL ENUM column ``messages.message_type``. Validation here is what\ngates the API response — any value the DB column accepts MUST be a\nmember of this enum, or ``MessageResponse.model_validate`` raises\n``ValidationError`` and the whole list endpoint 500s. Bug found\n2026-05-30: prod conversations carrying ``button`` rows from a\ntemplate-quick-reply click crashed ``GET /api/v1/messages``.\n\nInteractive message types:\n- quick_reply: Cross-platform quick reply buttons (Messenger, Instagram, Telegram)\n- interactive: WhatsApp interactive messages (buttons/lists)\n- carousel: Multi-card carousel messages\n- button: WhatsApp legacy template-button reply (callback button payload)\n\nAdapter-level types:\n- file: Generic file attachment fallback (Messenger/Instagram unknown content_type)\n- reaction: Emoji reaction (merged into target message metadata)\n- referral: Messenger m.me deep link / ad referral event\n\nWorker-emitted types:\n- whatsapp_template: Campaign-dispatched WhatsApp template message\n- kb_response: Team-chat AI knowledge-base response\n- notification: System notification message"
}
}
}
Work with this as data
Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for schemas
4 MCP tools reach this
find_json_schemasBrowse and filter every JSON Schema in the catalog.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
curl "https://apis.io/api/v1/json-schemas/sendseven-com-message-create"
curl "https://apis.io/api/v1/json-schemas?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.