Get campaign by id

Overview

Get one campaign, including its channels, follow-up template, email and SMS requests, and file-header mapping. It returns all of this in a single response, so you do not need follow-up calls to assemble the full picture.

Despite the path name, this endpoint takes the campaign's numeric id, not a code. A separate public endpoint accepts the alphanumeric campaign code.

Prerequisites

  • A bearer token in the Authorization header.
  • The campaignId of the record you are targeting.

Base URL

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

Endpoint

GET /api/v1/campaign/by-unique-code/{campaignId}

Authentication

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

  • The campaign must belong to a location inside your own account. If it does not, the call returns 400 rather than revealing anything about the campaign.

Rate limit

  • No rate limit on this bearer-token route (the separate public alphanumeric-code route is throttled at 30/min).

Path parameters

ParameterTypeRequiredDescription
campaignIdintegerRequiredThe campaign's numeric id. Digits only — a non-numeric value does not match this route.

How it works

  • 200 returns the campaign under data, with channels, email_requests, sms_requests and file_header included. Each channel carries the id of the campaign it belongs to.
  • 400 when the campaign belongs to a location outside your account.
  • 404 when no campaign exists with that id.
  • If the campaign resolves but has since disappeared, data comes back as an empty array rather than an error.

Response

200 OK · 200

{
  "data": {
    "status": "success",
    "data": {
      "id": 1,
      "name": "Summer Review Campaign",
      "description": "Collect summer reviews",
      "status": "draft",
      "current_step": 3,
      "store_id": 123,
      "scheduled_at": null,
      "started_at": null,
      "completed_at": null,
      "total_audience": 0,
      "request_per_day": 50,
      "request_frequency": 1,
      "request_delay": 0,
      "request_after_time": "14:00:00",
      "next_execution_time": null,
      "request_file_status": "completed",
      "request_file_name": "audience.xlsx",
      "send_immediately": false,
      "request_file_path": "campaigns/123/audience.xlsx",
      "type": "bulk_upload",
      "channels": [
        {
          "id": 1,
          "rs_campaign_id": 1,
          "channel_type": "email",
          "is_enabled": true,
          "template_id": 5,
          "follow_up_template_id": null,
          "follow_up_interval": 0,
          "follow_up_interval_count": 0
        }
      ],
      "email_requests": [],
      "sms_requests": [],
      "file_header": null
    }
  }
}

Errors

StatusMeaning
400The request was rejected — the response explains why
401The bearer token is missing, expired or invalid
404Returned when no campaign exists with that id
500Unexpected server error

Example request

curl --request GET \
  --url "https://production-api.shoutaboutus.com/api/v1/campaign/by-unique-code/123" \
  --header 'Authorization: Bearer <bearer-token>' \
  --header 'Accept: application/json'

Did this page help you?