SmsFragments

Duplicate an SMS fragment

Creates a copy of an existing SmsFragment with new fields applied from the request body. Useful when seeding similar messaging content (e.g. variants for A/B testing, or per-offering overrides of a shared template).

Requires the SETTINGS_MANAGE permission on the source fragment's site, plus the create permission on SmsFragment. The copy is created at the source's site.

post/shop/sms-fragments/{smsFragmentId}/copy

Request body

namestring

Internal label for the new copy. Conventionally the source's name suffixed with "(Copy)" or a variant tag.

message_type'basket_confirmed' | 'basket_cancelled_with_charge' | 'basket_cancelled_without_charge' | 'basket_reminder' | 'basket_follow_up' | 'pay_by_link_request'

The type of message the SMS Fragment applies to. Defaults to the source's value.

messagestring nullable

Contents of the SMS Fragment.

priorityinteger nullable

Priority of the SMS Fragment. Fragments are concatenated in ascending priority order to build the final message.

Example request

{
  "name": "Order Confirmation (Copy)",
  "message": "Hi! Your order has been confirmed. We look forward to\nseeing you soon.\n",
  "priority": 10,
  "offerings": [
    {
      "offering_name": "Twilight massage",
      "offering_type": "appointment"
    }
  ]
}

Response

The SMS Message Fragment was successfully retrieved

Example response

{
  "data": {
    "name": "Order Confirmation",
    "message": "Hi! Your order has been confirmed. We look forward to seeing you on Saturday 20th January at 12pm.\n",
    "priority": 10,
    "offerings": [
      {
        "offering_name": "Twilight massage",
        "offering_type": "appointment"
      }
    ]
  }
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.