Send a test text to yourself

Overview

Send a campaign's text message to a number you choose.

Use this while setting up a campaign or after editing a template.

You'll need the campaign_id and your phone number.

The test text is sent. It isn't added to the campaign's recipient count, but it does use your plan's SMS allowance (402 when it is used up).

Prerequisites

  • A bearer token. See Authentication.
  • A campaign (campaign_id) in your account whose SMS channel is enabled and has a template.
  • An active plan on the campaign's location.

Base URL

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

Endpoint

POST /api/v1/campaign/test-sms-review-request

Authentication

Account token

  • The campaign must belong to your own account; otherwise 403 (You are not authorized to test this campaign).
  • The campaign's location must have an active plan; otherwise 400.

Rate limit

60 requests per minute, counted per user (the token’s user). See Rate limits.

Request parameters

None.

Request body

FieldTypeRequiredDescription
campaign_idintegerYesThe campaign to test. Must exist (otherwise 422) and belong to your own account (otherwise 403).
customer_namestringYesThe name to use in the text, up to 255 characters.
phonestringYesWhere to send the test, 7–20 characters. Include the country code.
is_testbooleanNotrue marks the send as a test in reporting. Default false.
keywordsobjectNoValues for your template's placeholders, as key/value pairs, e.g. {"paragraph_1": "Thanks for visiting!"}. Each key up to 100 characters; values are strings. Empty values are skipped.

The campaign's SMS channel needs a template first; otherwise 400. A campaign built with Create or edit a campaign has none: attach one with POST /api/v1/campaign/template/sms/update (channel_id from data.data.channels[].id in the step 2 or 3 response, sms_template_id, content).

Request payload

{
  "campaign_id": 4666,
  "customer_name": "Jane Smith",
  "phone": "+15555550100",
  "is_test": true,
  "keywords": {
    "paragraph_1": "Thanks for visiting our store today!"
  }
}

Response body

The payload is inside data.

FieldTypeDescription
statusstringsuccess.
messagestringSMS review request sent successfully.

Response payload

{
  "data": {
    "status": "success",
    "message": "SMS review request sent successfully"
  }
}

Examples

Success payload

See Response payload.

Error payload

400 No SMS channel

{
  "message": "Bad Request",
  "status": "error",
  "errors": "Campaign does not have an active SMS channel"
}

400 No SMS template

{
  "message": "Bad Request",
  "status": "error",
  "errors": "SMS channel does not have a valid template. Please add a template to the SMS channel."
}

400 No active plan

{
  "message": "Bad Request",
  "status": "error",
  "errors": "Store does not have an active plan"
}

402 Plan allowance used up

{
  "status": "error",
  "message": "Limit reached for 'SMS Solicitations': 500 of 500 units consumed this period.",
  "feature": "review_solicitation_sms",
  "remaining": 0,
  "hard_stop": true
}

403 Campaign outside your account

{
  "message": "Forbidden",
  "status": "error",
  "errors": "You are not authorized to test this campaign"
}

422 Fields missing

{
  "message": "The customer name field is required. (and 1 more error)",
  "errors": {
    "customer_name": [
      "The customer name field is required."
    ],
    "phone": [
      "The phone field is required."
    ]
  }
}

429 Too many requests

{
  "message": "Too Many Attempts."
}
StatusMeaning
200The test text is queued.
400The campaign has no enabled SMS channel or no template, or the location has no active plan.
401The token is missing, expired or invalid.
402The plan's SMS allowance for the period is used up, or the feature isn't on the plan.
403The campaign belongs to another account.
422A field is missing or invalid, or campaign_id doesn't exist.
429More than 60 requests in a minute from this user.
500Unexpected server error.

Example request

curl --request POST \
  --url "https://production-api.shoutaboutus.com/api/v1/campaign/test-sms-review-request" \
  --header 'Authorization: Bearer <bearer-token>' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"campaign_id": 4666, "customer_name": "Jane Smith", "phone": "+15555550100", "is_test": true, "keywords": {"paragraph_1": "Thanks for visiting our store today!"}}'

Did this page help you?