---
schema_version: "1"
id: a853303c58283476d1724ade491fc4da83b24f7dcef0af1c4fc94ff0380a2ec2
title: POST /messaging/v1/sms/messages/{messageKey}
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/guides/mc-apis/sendSMSMessageSingleRecipient.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud/references/mc_rest_transactional_messaging_sms/sendSMSMessageSingleRecipient.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 3b06a158eb97570c3440e6a7761c3757580a93aa28a0c03d21f61312be619058
products:
  - Marketing Cloud Engagement APIs and Programmatic Languages
  - Marketing Cloud
---
# POST /messaging/v1/sms/messages/{messageKey}

Sends a message to a single recipient using a send definition.

## URL Parameters

| Name         | Type   | Description                                                                                                                                                                                                                                                                    |
| ------------ | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `messageKey` | string | A unique identifier that you can use to track the status of the message. The key can contain up to 100 characters. There are no character restrictions. The message key that you provide must be unique among all of the keys used in your business unit over the last 2 days. |

## JSON Parameters

| Name                   | Type   | Description                                                                                                                                                                                                                                                                                                                          |
| ---------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `definitionKey`        | string | Required. The ID of the send definition.                                                                                                                                                                                                                                                                                             |
| `recipient`            | object | Required. An object that contains parameters and metadata for the recipient, such as send tracking and personalization attributes. If this object is present in the request, the `recipients` array (which is used to [send messages to multiple recipients](https://developer.salesforce.com/docs/marketing/marketing-cloud/references/mc_rest_transactional_messaging_sms/sendSMSMessageMultipleRecipients.md)) can’t be included in the request. |
| `recipient.contactKey` | string | Required. A unique identifier for the subscriber. You can create a contact key at send time if the contact isn’t already in Marketing Cloud Engagement.                                                                                                                                                                              |
| `recipient.to`         | string | Required. The phone number of the recipient.                                                                                                                                                                                                                                                                                         |
| `recipient.attributes` | object | Personalization information for the recipient, written as key-value pairs. The attributes must match existing profile attributes or content attributes.                                                                                                                                                                              |
| `content.message`      | string | An override for the message content in the send definition. Use substitution strings to personalize the content.                                                                                                                                                                                                                     |

## Usage

```js
Host: https://YOUR_SUBDOMAIN.rest.marketingcloudapis.com
POST /messaging/v1/sms/messages/MESSAGE_KEY
Content-Type: application/json
Authorization: Bearer YOUR_ACCESS_TOKEN

{
  "definitionKey": "account-reset",
  "recipient": {
    "to": "15555551234",
    "contactKey": "Astro25",
    "attributes": {
      "FirstName": "Astro",
      "password": "1234567890ab"
    }
  },
  "subscriptions": {
    "resubscribe": true
  }
}
```

The response includes a request ID. The `responses` array contains a `messageKey` value for the message. If a message was sent successfully, the array object doesn’t contain any additional information. If a message failed to send, the response includes an `errorcode` that describes the reason that the message failed. For a list of error codes that the API returns, see [Transactional API Subscriber Error Codes](/docs/marketing/marketing-cloud/guide/transactional-send-subscriber.html) and [Transactional API Response Level Error Codes](/docs/marketing/marketing-cloud/guide/transactional-send-response.html).

```js
HTTP/1.1 202 Accepted
{
  "requestId": "239a2bc3-bdcb-4f8a-9e08-28aff9f983b7",
  "errorcode": 0,
  "responses": [
    {
      "messageKey": "f4fe74b7-c3c0-4e5a-9f49-b63a641109a2"
    }
  ]
}
```
