---
title: "Validate SMS Message"
method: POST
path: "/messages/validate/sms"
tags: ["Messages > sms"]
---

# Validate SMS Message

`POST /messages/validate/sms`

## Request

- Base URL: `https://api.pinnacle.sh`
- URL: `https://api.pinnacle.sh/messages/validate/sms`
- Auth: API key in header `PINNACLE-API-KEY`

Validate SMS message content without sending it.

## Request body

- SMSContent: SMS message containing plain text only.
  - `text` string, required: Message content.

## Response `200`

Returns the validation results.

- SMSValidationResponse
  - `isOverSegmentLimit` boolean: Indicates if the message exceeds the allowed segment limit. <br> For SMS, this is limit is 10.
  - `segments` SmsValidationResponseSegments, required: Details about how the SMS content would be segmented for delivery.
    - `gsm7` SmsValidationResponseSegmentsGsm7, required: Segmentation details when your message is encoded with GSM-7.
      - `totalBytes` integer, required: Total number of bytes used by the GSM-7 segments.
      - `unsupported` string[], required: Characters not supported by GSM-7 encoding.
      - `value` string[], required: Message broken down into segments using GSM-7 encoding.
    - `utf16` SmsValidationResponseSegmentsUtf16, required: Segmentation details when your message is encoded with UTF-16.
      - `totalBytes` integer, required: Total number of bytes used by the UTF-16 segments.
      - `value` string[], required: Message broken down into segments using UTF-16 encoding.
  - `total` SmsValidationResponseTotal, required
    - `gsm7` number, double, required: Total price of this message. Calculated by multiplying the number of GSM-7 segments by the unit cost. <br> You must remove all unsupported UTF-16 characters before this message can be sent as GSM-7.
    - `utf16` number, double, required: Total price of this message. Calculated by multiplying the number of UTF-16 segments by the unit cost.
  - `unit` number, double, required: Cost per message segment.

## Other responses

- `400`: Validation failed. The payload has missing required fields and/or invalid types. <br> See https://zod.dev/error-formatting for more information.
- `401`: The request lacks valid authentication credentials or the provided credentials are invalid. <br> Ensure you're including a valid API key in the request headers and that your account has the necessary permissions to access this endpoint.
- `403`: Your subscription does not include access to this feature. <br> This occurs when attempting to use functionality that requires a higher subscription tier. Please upgrade your subscription to access this feature.
- `500`: An unexpected error occurred on Pinnacle's servers while processing your request. <br> If this error persists, please contact support with the request details.

---

[API](https://skmtc.dev/pinnacle/apis/pinnacle-2.md) - [All operations](https://skmtc.dev/pinnacle/apis/pinnacle-2/llms.txt) - [OpenAPI document](https://skmtc.dev/pinnacle/apis/pinnacle-2/revisions/45416dadab79?raw)
