# Send message

> Send an outbound message to a contact or a phone number, on any channel.

Source: https://docs.mycrmsim.com/docs/messages/send-message

```http
POST https://backend.mysmsgateway.app/api/v1/ext/messages
```

- Category: myCRMSIM Messages / Messages
- Auth: Bearer access token
- Scope: `messages.write`
- Limits: 30 messages / 15 min per workspace  ·  1 attachment per message, 5 MB max
- Guide: [Status and inbound message callbacks — get this message's sent / delivered / failed status pushed to your app](https://docs.mycrmsim.com/guides/app-callbacks)

**Before you can send:** on app.mycrmsim.com → Devices, add a device (Android/SMS, WhatsApp, iMessage, or RCS) and assign it to the workspace. A workspace with no assigned device for an eligible channel records the message but does not deliver it.

Supply `contact_id` or `phone` (with country code, e.g. `+61` / `+1` — a contact is auto-created if none matches), plus `message` and/or `attachments` — a single media URL (attachment-only sends are valid).

**iMessage to an email address:** iMessage also reaches an Apple ID email. Send it as `email`, or put the email in `phone`. An email is **iMessage only** — leave `channel` out or send `imessage` (it is sent over iMessage either way); `whatsapp` or `rcs` with an email is a 400. If no contact has that email, an email-only contact is auto-created, the same as for a new phone number. A contact that has a phone number is always messaged at the phone; an email-only contact (by `contact_id` too) is messaged at its email over iMessage.

Omit `channel` (or send `default`) to use the workspace Message Routing (Primary → Fallback; same-row channels in parallel), or force one with `channel` = `whatsapp` | `imessage` | `rcs`. SMS has no direct channel value — to send over SMS, enable it in the workspace Message Routing (app.mycrmsim.com → Subaccount SIM → Message Routing) and send with channel `default`. The send is recorded in the conversation / Message Logs.

**Send from a specific device:** pass `send_from` — a `value` from [List Send From devices](/docs/messages/list-send-from-options) — and the message goes out from that device (a SIM, iMessage Mac, WhatsApp number or RCS device of the workspace), on that device's channel. Leave `channel` out (or `default`); a `channel` that is not the device's is a 400. Leave `send_from` out (or empty) and the contact's own **Send From** is used — the device set on the contact in app.mycrmsim.com → Conversations, the same as a send from the dashboard — unless you name a `channel` that device does not send on. With none set, the workspace routing decides.

**Status and replies, pushed to you.** Set a Callback URL on your app and myCRMSIM POSTs this message's `sent` / `delivered` / `failed` status there (`message.status`), and the contact's SMS, WhatsApp, iMessage and RCS replies (`message.inbound`) — no polling needed. See [Status and inbound message callbacks](/guides/app-callbacks) for the payloads and how to verify the signature.

**Voice notes.** A voice note is an audio file sent as the `attachments` URL, on any channel except SMS: on **WhatsApp** it is delivered as an audio message, playable inline; on **iMessage** a Mac in **Advanced Mode** sends it as a real iMessage audio message (the play bubble), a Mac without it as a file the contact taps to play; on **RCS** as an audio attachment. SMS carries no audio, so name the channel (`whatsapp`, `imessage` or `rcs`) rather than `default`, which may route to SMS. `mp3`, `m4a`/`aac`, `ogg`/`opus` and `wav` work (`mp3` is the safe choice), one file up to 5 MB at a public `https://` URL that answers a HEAD request with `Content-Length` and an `audio/*` content type. `message` is optional and becomes the caption or an accompanying text. Delivery is asynchronous as for any send; replies and reactions come back as ordinary inbound messages.

**Send effects (iMessage):** add `effect` to send the message with an iMessage effect — a full-screen one (`confetti`, `fireworks`, `balloons`, `hearts`, `lasers`, `shooting_star`, `sparkles`, `echo`, `spotlight`) or a bubble one (`slam`, `loud`, `gentle`, `invisible_ink`). An effect sends over iMessage (leave `channel` out or send `imessage`; another channel is a 400), needs `message` text, and needs a Mac with **Advanced Mode** on in the workspace — the same rule as the effect button on the dashboard; without one the request is a 400 `NO_ADVANCED_MODE_MAC`. In message reads the effect is the `effect` field (also on messages a contact sends with an effect). The stored text keeps the effect as its first line, `✦ Effect: confetti`, as the dashboard writes it; the recipient sees only the body.

**Threaded replies (iMessage):** add `reply_to` with a message id to answer that message the way the reply button on the app.mycrmsim.com does. The message is sent with a leading line, `↩︎ Replying to “<the first 60 characters of that message>”` (`“an attachment”` for a photo or file), which a Mac in **Advanced Mode** turns into a real threaded reply; the contact sees only your text. Leave the recipient out and the reply goes to that message's contact. Replies are iMessage only, need `message` text, can't answer a group message or a reaction, and need a Mac with Advanced Mode on (else 400 `NO_ADVANCED_MODE_MAC`). With `effect` too, the effect line comes first. The Mac finds the target by its quoted text, so if two messages in the thread start the same way, the reply attaches to the one Messages picks.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `workspace_id` | body | number | yes | The workspace to send from. Must belong to the installer. Its Message Routing decides the channel(s) + device when `channel` is omitted. Example: `7` |
| `contact_id` | body | number | no | The contact to send to (must exist in the workspace). Provide this, `phone` or `email` — at least one is required. Example: `1234` |
| `phone` | body | string | no | Recipient phone with country code (e.g. +61…, +1…). Provide this, `contact_id` or `email`. If no contact with this number exists in the workspace, one is auto-created and the message is sent to it. **iMessage only:** an Apple ID email is accepted here too, and is treated as `email`. Example: `+61412345678` |
| `email` | body | string | no | **iMessage only.** An Apple ID email to message over iMessage, when there is no `contact_id` or `phone`. Another channel is a 400. If no contact has this email, an email-only contact is auto-created. Example: `john@icloud.com` |
| `channel` | body | enum | no | One of "default" \| "whatsapp" \| "imessage" \| "rcs". "default" (or omitting it) uses the workspace Message Routing; the others force that channel. (`type` is accepted as an alias.) Example: `default` |
| `message` | body | string (text) | no | The message body. Required unless `attachments` is provided. `text` is accepted as a legacy alias. Example: `Thanks for your enquiry — we open at 09:00.` |
| `attachments` | body | string (URL) | no | Optional media as a single URL string — 1 attachment per message, file size up to 5 MB. Send with or instead of `message`; an attachment-only send is valid. An audio file (mp3, m4a, ogg, wav) is sent as a **voice note** on WhatsApp, iMessage and RCS — not SMS. Sending an array with more than one URL is rejected with a 400. (`media` is accepted as a legacy alias for this field.) Example: `https://cdn.example.com/photo.jpg` |
| `send_from` | body | string | no | Send from one device of the workspace: a `value` from [List Send From devices](/docs/messages/list-send-from-options). The device decides the channel (SMS, WhatsApp, iMessage or RCS). Omit or "" to use the contact's own Send From, or the workspace routing when it has none. Not a device of this workspace → 400 `invalid_send_from`; a `channel` other than the device's → 400 `send_from_channel_mismatch`. Example: `WhatsApp · WhatsApp 179160 · 923001234567 #wa12` |
| `effect` | body | enum | no | An iMessage send effect. Screen effects: `confetti`, `fireworks`, `balloons`, `hearts`, `lasers`, `shooting_star`, `sparkles`, `echo`, `spotlight`. Bubble effects: `slam`, `loud`, `gentle`, `invisible_ink`. iMessage only, needs `message` text and a Mac in Advanced Mode on the workspace — see the description. One of: `confetti`, `fireworks`, `balloons`, `hearts`, `lasers`, `shooting_star`, `sparkles`, `echo`, `spotlight`, `slam`, `loud`, `gentle`, `invisible_ink`. Example: `confetti` |
| `reply_to` | body | number | no | Send the message as an iMessage **threaded reply** to this message id (a List messages / conversation message `id`, or a Send message `message_id`). iMessage only, needs `message` text and a Mac in Advanced Mode on the workspace. With no recipient, the reply goes to that message's contact; a different recipient is a 400. Example: `84214` |

## Request body

```json
{
  "workspace_id": 7,
  "phone": "+61412345678",
  "channel": "default",
  "message": "Thanks for your enquiry — we open at 09:00.",
  "attachments": "",
  "send_from": "WhatsApp · WhatsApp 179160 · 923001234567 #wa12"
}
```

## Response fields (send_result)

| Field | Type | Description |
| --- | --- | --- |
| `id` | number | The id of the queued message — use it to correlate delivery-status callbacks. |
| `status` | string | Delivery status immediately after the send is accepted — typically "webhook_sent", or "failed". |
| `message_id` | string | String form of the message id — use it to correlate delivery-status callbacks / webhook events. |
| `conversation_id` | number, nullable | The conversation this message belongs to, when known. |
| `channel` | string, nullable | The forced channel, or null when the workspace routing decided it. |
| `queued_at` | string (ISO 8601) | When the message row was created / queued. |
| `reply_to` | string | Only on a threaded reply: the id of the message replied to. |

## Response 200

OK — queued for delivery

```json
{
  "success": true,
  "message": "Message queued for delivery.",
  "data": {
    "id": 84213,
    "status": "webhook_sent",
    "message_id": "84213",
    "conversation_id": 512,
    "channel": "whatsapp",
    "queued_at": "2026-07-20T10:22:07.000Z"
  }
}
```

## Response 400

Validation — no recipient (need contact_id, phone or email)

```json
{
  "success": false,
  "message": "Provide contact_id, phone or email."
}
```

## Response 400

An email recipient with a channel other than iMessage

```json
{
  "success": false,
  "message": "Email addresses can only be messaged over iMessage."
}
```

## Response 400

Validation — malformed email

```json
{
  "success": false,
  "message": "email must be a valid email address."
}
```

## Response 400

Validation — neither message nor attachments supplied

```json
{
  "success": false,
  "message": "message or attachments is required."
}
```

## Response 400

Validation — more than one attachment supplied

```json
{
  "success": false,
  "message": "Only one attachment is allowed per message (max 5 MB)."
}
```

## Response 400

Validation — unknown channel

```json
{
  "success": false,
  "message": "channel must be one of: default, whatsapp, imessage, rcs"
}
```

## Response 400

send_from is not a device of this workspace

```json
{
  "success": false,
  "code": "invalid_send_from",
  "message": "send_from is not a device of this workspace. Use a value from GET /send-from-options, or leave it empty for automatic."
}
```

## Response 400

send_from with a channel that is not the device's

```json
{
  "success": false,
  "code": "send_from_channel_mismatch",
  "message": "send_from is a whatsapp device, so it can't send with channel \"imessage\". Leave channel out or set it to \"default\"."
}
```

## Response 400

Effect — not iMessage

```json
{
  "success": false,
  "message": "Effects are iMessage only: send channel imessage (or leave channel out)."
}
```

## Response 400

Effect — no Mac with Advanced Mode on the workspace

```json
{
  "success": false,
  "code": "NO_ADVANCED_MODE_MAC",
  "message": "No Mac with Advanced Mode is connected to this workspace. Send effects need a Mac with Advanced Mode on."
}
```

## Response 400

Effect — unknown name, or no message text

```json
{
  "success": false,
  "message": "effect must be one of: confetti, fireworks, balloons, hearts, lasers, shooting_star, sparkles, echo, spotlight, slam, loud, gentle, invisible_ink"
}
```

## Response 400

Reply — not iMessage, a group message, a reaction, or nothing to reply to

```json
{
  "success": false,
  "message": "Replies are iMessage only: the reply_to message was not sent over iMessage."
}
```

## Response 400

Reply — the recipient is not the reply_to message's contact

```json
{
  "success": false,
  "message": "reply_to is a message in another conversation: a reply goes to the same contact."
}
```

## Response 400

Reply — no Mac with Advanced Mode on the workspace

```json
{
  "success": false,
  "code": "NO_ADVANCED_MODE_MAC",
  "message": "No Mac with Advanced Mode is connected to this workspace. Replies need a Mac with Advanced Mode on."
}
```

## Response 404

Reply — reply_to is not a message in this workspace

```json
{
  "success": false,
  "message": "reply_to message not found"
}
```

## Response 401

Missing or invalid token

```json
{
  "success": false,
  "message": "Invalid or expired access token."
}
```

## Response 403

Missing scope

```json
{
  "success": false,
  "message": "Missing scope(s): messages.write. This integration was granted: …"
}
```

## Response 404

workspace / contact not found or not accessible to this token

```json
{
  "success": false,
  "message": "Contact not found in this workspace"
}
```

## Response 409

Recipient has outbound Do-Not-Disturb active

```json
{
  "success": false,
  "message": "Cannot send message as DND is active"
}
```

## Response 429

Rate limit exceeded — too many queued sends for this workspace (30 messages / 15 min)

```json
{
  "message": "Too many queued messages for this workspace",
  "error": "RateLimitExceeded"
}
```

## Response 502

The message could not be delivered to the messaging provider — retryable

```json
{
  "success": false,
  "message": "Failed to forward message to the gateway."
}
```

## Response 503

Message sending is not available for this account

```json
{
  "success": false,
  "message": "Outbound gateway is not configured."
}
```

## Response 500

Unexpected server error

```json
{
  "success": false,
  "message": "Failed to queue message for delivery."
}
```
