Update SMS template

Overview

Update an existing SMS template (content, name, landing-page and review-site links). Copy-on-write for globals: a template with no company_id copies into the caller's account first (a name clash returns 400). When you supply channel_id the template is set as that channel's template_id.

Prerequisites

  • A bearer token in the Authorization header.

Base URL

EnvironmentURL
Productionhttps://production-api.shoutaboutus.com
Developmenthttps://development-api.shoutaboutus.com

Endpoint

POST /api/v1/campaign/template/sms/update

Authentication

  • Requires a bearer token in the Authorization: Bearer <bearer-token> header.

  • bearer token, account role — authentication. sms_template_id must resolve to a template owned by the caller's account (or a global one).

Rate limit

  • No rate limit.

Request body

FieldTypeRequiredDescription
sms_template_idintegerRequiredMust be an existing SMS template inside your own account tree.
contentstringRequiredSMS body with placeholders.
namestringOptionalNew name. Must be unique within the caller's account and against global (shared) templates.
channel_idintegerOptionalMust be an existing campaign channel. Sets the channel's template_id.
landing_page_idintegerOptionalMust be an existing landing-page template.
review_site_idintegerOptionalMust be an existing review site.
{
  "sms_template_id": 1,
  "content": "Hi [customerName], We value your feedback! Share your experience: [landingPageUrl]. Thanks from [locationName]. Stop 2 End.",
  "name": "Welcome SMS Template",
  "channel_id": 5,
  "landing_page_id": 10,
  "review_site_id": 3
}

How it works

  • Synchronous. 200 OK returns data.data = only(id,name,content,landing_page_id,review_site_id,store_id). 400 (envelope) when replicating a global and the name already exists for the company. 422 on validation failure or when the template is not in the caller's account.

Response

200 OK · 200

{
  "data": {
    "status": "success",
    "message": "SMS Template has been updated successfully!",
    "data": {
      "id": 1,
      "name": "Welcome SMS Template",
      "content": "Hi [customerName], We value your feedback! Share your experience: [landingPageUrl]. Thanks from [locationName]. Stop 2 End.",
      "landing_page_id": 10,
      "review_site_id": 3,
      "store_id": 123
    }
  }
}

422 Not your template · 422

{
  "message": "The selected SMS template does not belong to your company.",
  "errors": {
    "sms_template_id": [
      "The selected SMS template does not belong to your company."
    ]
  }
}

Errors

StatusMeaning
400The request was rejected — the response explains why
401The bearer token is missing, expired or invalid
422Not your template
500Unexpected server error

Example request

curl --request POST \
  --url "https://production-api.shoutaboutus.com/api/v1/campaign/template/sms/update" \
  --header 'Authorization: Bearer <bearer-token>' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"sms_template_id": 1, "content": "Hi [customerName], We value your feedback! Share your experience: [landingPageUrl]. Thanks from [locationName]. Stop 2 End.", "name": "Welcome SMS Template", "channel_id": 5, "landing_page_id": 10, "review_site_id": 3}'

Did this page help you?