---
title: "Preview an SMS message for an order"
method: POST
path: "/shop/orders/{orderId}/sms/preview"
tags: ["Orders"]
---

# Preview an SMS message for an order

`POST /shop/orders/{orderId}/sms/preview`

This endpoint previews an SMS message for an order.

## Request body

- object
  - `message_type` 'basket_confirmed' | 'basket_cancelled_with_charge' | 'basket_cancelled_without_charge' | 'basket_reminder' | 'basket_follow_up' | 'pay_by_link_request', required — The type of the SMS message.
  - `params` SmsMessageParams — The parameters to be used in the SMS message.
    - `cancellation_charge` boolean — Whether there is a cancellation charge for the order.

## Response `201`

The preview of the SMS message was successfully retrieved

- object
  - `data` SmsMessagePreview, required
    - `message` string, required — The contents of the SMS message.
    - `site_id` string, uuid, required — The ID of the site the SMS message is associated with.
    - `organisation_id` string, uuid, required — The ID of the organisation the SMS message is associated with.

## Other responses

- `404` — The resource couldn't be found

---

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