---
title: "POST /send_sms"
method: POST
path: "/send_sms"
tags: ["Notifications"]
---

# POST /send_sms

`POST /send_sms`

## Request

- Base URL: `https://api.paynearme-sandbox.com/json-api`
- URL: `https://api.paynearme-sandbox.com/json-api/send_sms`
- Auth: one of:
  - OAuth 2
    - Client credentials
    - Token URL: `https://login.paynearme.com/oauth/token`
  - API key in query parameter `signature`

Create and send an SMS message to the consumer

## Request body

- SendSms: Creates and sends an SMS message
  - `site_identifier` string, required: Identifies your client site.
  - `timestamp` string, required: The Unix Epoch time of the call
  - `version` string, required: The version of the API. This version must match the version associated with your API key pair.
  - `signature` string: The HMAC signature that is calculated by running your API Secret Key and the alphabetized, concatenated parameters of the request payload through the SHA256 message digest algorithm. **NOTE:** This field is required when authenticating with the HMAC signature method; it is not required when authenticating with OAuth 2.0.
  - `recipients` string, required: The mobile phone number where you are sending the text. Use commas to separate numbers when sending the message to multiple recipients. <b>NOTE:</b> Upon request, PayNearMe can configure the <code>/send_sms</code> endpoint to return an error response for numbers blocked due to <code>STOP</code> opt-outs. Contact your Technical Account Manager for configuration details.
  - `body_text` string, required: The text of the SMS message. This parameter does not support HTML or special characters like emojis.
  - `body_spanish` string: The text of the SMS message in Spanish. This parameter does not support HTML
  - `language` 'en' | 'sp': Indicates which version of the SMS message should be sent to the specified recipient. Options include <ul><li><code>en</code> - English</li><li><code>sp</code>- Spanish</li></ul><br/>If sending the message in Spanish, the <code>body_spanish</code> parameter must be included.

## Response `200`

SMS Sent

- union
  - SendSmsResponse
    - `status` string: Provides the status of the request.
  - ErrorEnvelope: Returned with HTTP 200 for every failure except a rejected OAuth 2.0 access token, which returns HTTP 401 with the same shape. Every response carries a status; on failure it is "error" and the errors array describes what went wrong.
    - `status` 'error', required
    - `errors` ErrorDetail[], required: One entry per failure.
      - `description` string, required: Human-readable description of the failure.
      - `message` string: Parameter-validation detail (APPS-17178).
      - `receipt` string: Receipt text, where the failure relates to a payment.
      - `format` string: Expected format, for parameter-validation failures.
      - `example` string: Example of a well-formed value.
      - `details` object: Processor response details (APPS-18223).

## Other responses

- `401`: OAuth 2.0 requests only. The `Authorization` header has no Bearer token, the access token is invalid, expired, or issued for a different site, or the `site_identifier` does not match any site. The response does not say which. If the request is rejected before it reaches PayNearMe, the body may not be JSON, so detect this error by the HTTP status. HMAC-signed requests never receive this status.

## Changes

- **2026-11-03** `907541f733a3`: 1 breaking, 5 info
  - removed the success response with the status `201`
  - api operation id `send_sms` was added
  - the request property `signature` became optional
  - added the non-success response with the status `401`
  - …2 more

[Operation history](https://skmtc.dev/paynearme/apis/paynearme-api-v3-0/changes/send_sms/post.md)

---

[API](https://skmtc.dev/paynearme/apis/paynearme-api-v3-0.md) - [All operations](https://skmtc.dev/paynearme/apis/paynearme-api-v3-0/llms.txt) - [OpenAPI document](https://skmtc.dev/paynearme/apis/paynearme-api-v3-0/revisions/907541f733a3?raw)
