---
title: "Send message"
method: POST
path: "/messages/actions/send-message"
tags: ["Messages"]
---

# Send message

`POST /messages/actions/send-message`

Send a message to a customer through one of the configured communication channels (email, SMS, or push notification).

⚠️ Action methods are available only in the Enterprise interface.

Before sending, the customer's communication consents for the target channel are checked; if consent is missing, the message is not sent. The message is rendered from its template, with personalisation applied if configured.

**What happens when a message is sent**

- The rendered message is delivered to the customer through the configured channel.
- A message record is persisted on the customer account; the retention period is project-specific.

**Related operations**

- [GET /messages](https://carecloud.readme.io/reference/getmessages) - read the catalogue of messages and their delivery status.
- [GET /communication-channels](https://carecloud.readme.io/reference/getcommunicationchannels) - the catalogue of available channels.

## Headers

- `Accept-Language` string

## Request body

- object
  - `message` Message, required — Message resource.
    - `message_id` string — The unique ID of the message.
    - `status` 0 | 1 | -1 | -2 | 2 | 4 | 5 — The status ID of the message. *Possible values are: 0 - message was not sent / 1 - message was sent successfully / -1 - message was not received (it was returned) / -2 - message was not received (soft bounce) / 2 - an error occurred while sending / 4 - customer has no agreements (GDPR) / 5 - Scheduled for retry (the message was not delivered because of an error and will be sent repeatedly. If not successful, the status will change to error.)*
    - `message_template_id` string, required — The unique ID of the message template. [GET /message-templates](https://carecloud.readme.io/reference/getmessagetemplates)
    - `customer_id` string, required — The unique ID of the customer. [GET /customers](https://carecloud.readme.io/reference/getcustomers)
    - `contact` string — Email address or phone number of customer in case of send message to different contact than customer has in database.
    - `title` string — Subject of the email message/ Title of notification message / Preview of the text message . Mandatory only in case of email template.
    - `send_time` string — Timestamp when the message was sent from the server to the recipient. Format: `YYYY-MM-DD HH:MM:SS`. All times are in the local timezone.
    - `opened_time` string — Timestamp when the message was opened by the recipient. Format: `YYYY-MM-DD HH:MM:SS`. All times are in the local timezone.
    - `mail_client_user_agent` string — User agent of the mail client application where message was opened.
    - `mail_client_language` string — Language of the mail client application where message was opened.
    - `communication_channel_id` 1 | 2 | 4 | 5, required — The unique ID of the communication channel. *Possible values are: 1 - email / 2- SMS / 4 - PUSH notification (Apple or Google)/ 5 - internal system notification* [GET /communication-channels](https://carecloud.readme.io/reference/getcommunicationchannels)
    - `message_data` Parameter[] — Message data could contains array of customized parameters. They may have influence on message display or add values to message.
      - `parameter_name` string, required — Name of the parameter.
      - `value` string, required — Value of the parameter.
    - `attachments` Attachment[] — List of the attachments for the message. A single attachment has a size limit of 1 MB. File type restrictions: .jpg, .jpeg, .png, .gif, and .pdf.
      - `upload_method` 'url' | 'base64', required — Method how to upload attachment file.
      - `file_data` string, required — File data to upload. It could URL address of the file or BASE64 encoded file.
      - `cache_for` integer — CareCloud can cache the attachment for a certain amount of minutes. If the cache parameter is not set, the attachment is not cached, and it's deleted after the message is sent.
    - `last_change` string — Timestamp of the last change. Format: `YYYY-MM-DD HH:MM:SS`. All times are in the local timezone.

## Response `204`

No Content

## Other responses

- `400` — Bad input parameter. The response body's `error.error_data.invalid_params[]` array lists the parameters that caused the failure, each carrying a `reason` code. See the `BadRequestErrorBody` schema for the generic reason taxonomy. Operations with domain-specific business rules document additional reasons at the operation level.
- `401` — The client has invalid credentials or auth token.
- `403` — The client does not exist or the client tried to access an unauthorized property or resource.
- `404` — The resource was not found.
- `405` — The resource does not support the specified HTTP method.
- `429` — Too many requests - more than the resource limit.
- `500` — Server is not working as expected.
- `503` — Temporary state when the service is temporarily unavailable, overloaded or there is a maintenance window.

---

[API](https://skmtc.net/crmcarecloud/apis/rest-api-reference.md) · [All operations](https://skmtc.net/crmcarecloud/apis/rest-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/crmcarecloud/rest-api-reference/revisions/329c06dbf8d9/schema)
