---
title: "Create a Message"
method: POST
path: "/Accounts/{AccountSid}/Messages"
tags: ["Messages"]
---

# Create a Message

`POST /Accounts/{AccountSid}/Messages`

Create a message.

#### Permissions
The API token must include the following scopes: _Messaging_.

## Path parameters

- `AccountSid` string, uuid, required

## Request body

- CreateMessageRequest — Request body for creating a message.
  - `To` string, required — The phone number in E.164 format that received the message.
  - `From` string, required — The phone number in E.164 format that sent the message.
  - `Body` string, required — The text of the message. Up to 1600 characters long.
  - `MediaUrl` string — URL of media you wish to attach and send with the message.
  - `SendAsMms` boolean — When set to true, forces the message to be sent as an MMS.
  - `ApplicationSid` string, nullable — The SID of a SignalWire cXML bin used to configure the message's `MessageStatusCallback` attribute.
  - `MaxPrice` string — The maximum price in USD acceptable for the message to be sent.
  - `StatusCallback` string — A URL endpoint to receive callbacks each time the status of the message changes.
  - `ValidityPeriod` integer — The number of seconds a message will allow being queued before canceling. Default value is `14400`.
  - `MessagingServiceSid` string, nullable — If a number group was used when sending an outbound message, the number group's ID will be present.

## Response `200`

The request has succeeded.

- MessageResponse — Response containing a single message.
  - `account_sid` string, uuid — The unique identifier of the project that sent or received this message.
  - `api_version` string — The version number of the SignalWire cXML REST API used to handle this message.
  - `body` string — The text of the message. Up to 1600 characters long.
  - `num_segments` integer — The number of segments that make up the entire message.
  - `num_media` string — The number of media files that were included with the message.
  - `date_created` string — The date and time the message was created in RFC 2822 format.
  - `date_sent` string — The date and time the message was sent in RFC 2822 format.
  - `date_updated` string — The date and time the message was last updated in RFC 2822 format.
  - `direction` 'inbound' | 'outbound-api' | 'outbound-call' | 'outbound-reply' — Message direction.
  - `error_code` string, nullable — If an error has occurred on the message, the error code will give you a specific code.
  - `error_message` string, nullable — A human readable description of the error that occurred.
  - `from` string — The phone number in E.164 format that sent the message.
  - `price` number, float — The cost of the individual message billed to your project.
  - `price_unit` string — The currency in which `price` is charged as.
  - `sid` string — A unique ID that identifies this specific message.
  - `status` 'queued' | 'sending' | 'sent' | 'delivered' | 'undelivered' | 'failed' | 'receiving' | 'received' — Message status.
  - `to` string — The phone number in E.164 format that received the message.
  - `messaging_service_sid` string, nullable — If a number group was used when sending an outbound message, the number group's ID will be present.
  - `uri` string — The URI of this particular message.
  - `subresource_uris` MessageSubresourceUris — Message subresource URIs.
    - `media` string — The URI for media.

## Other responses

- `400` — 400 Bad Request response.
- `401` — 401 Unauthorized response.

## Changes

- **2026-01-15** `686ef84c2abc` — 3 breaking, 2 info
  - the response property `error_code` became nullable for the status `200`
  - the response property `error_message` became nullable for the status `200`
  - the response property `messaging_service_sid` became nullable for the status `200`
  - the request property `ApplicationSid` became nullable
  - …1 more
- **2026-01-15** `3c88f14db21e` — 6 breaking, 1 warning, 18 info
  - request body became required
  - removed the media type `application/x-www-form-urlencoded` from the request body
  - the `direction` response's property type changed from `string` to no type for status `200`
  - the `price` response's property type changed from `integer` to `number`, and format from no format to `float` for status `200`
  - …21 more

[Change history](https://skmtc.dev/signalwire/apis/compatibility-api/changes/Accounts/:AccountSid/Messages/post.md)

---

[API](https://skmtc.dev/signalwire/apis/compatibility-api.md) · [All operations](https://skmtc.dev/signalwire/apis/compatibility-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/signalwire/compatibility-api/revisions/686ef84c2abc/schema)
