Create / update campaign (wizard step)

Overview

Create or advance a review-solicitation campaign through the 4-step setup wizard, branching on the step field. Step 1 updateOrCreates a draft campaign (owner = authenticated user, company_id = user's company). Step 2 toggles the SMS/Email channels (only when the store's active plan enables the matching solicitation feature). Step 3 stores the scheduling config; step 4 finalizes the campaign to scheduled and computes next_execution_time. Side effects: writes to rs_campaigns and campaign_channels (soft-delete/restore on channel toggles).

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/create

Authentication

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

  • Account — authentication, ACCOUNT-scope group. store_id must sit inside your own account tree (must belong to the caller's company); the campaign records user_id and the caller's person.company_id.

Rate limit

  • No rate limit.

Request body

FieldTypeRequiredDescription
store_idintegerRequiredan ownership check — must belong to the caller's company.
stepintegerRequiredWizard step; one of 1,2,3,4. Controls which other fields are required.
campaign_idintegerConditionalNullable on step 1 (create-new); required on steps 2–4. Must be an existing campaign.
namestringRequired (step 1)max 255.
channel_smsbooleanRequired (step 2)required_without_all:channel_email. Creates/restores or soft-deletes the SMS channel (only applied when the plan enables review_solicitation_sms).
channel_emailbooleanRequired (step 2)required_without_all:channel_sms. Creates/restores or soft-deletes the Email channel (only applied when the plan enables review_solicitation_email).
per_day_requestintegerRequired (step 3)1–50. Returned in the campaign object as request_per_day.
request_frequencyintegerRequired (step 3)one of 0,1,2,3,4. Returned with the same field name.
delay_requestintegerRequired (step 3)0–60 (days). Returned in the campaign object as request_delay.
request_after_time_pststringOptional (step 3)H:i:s; defaults 14:00:00. Returned in the campaign object as request_after_time.
send_immediatelybooleanOptional (step 3)nullable. When true, step 4 sets next_execution_time to now.
typestringOptional (step 3)one of bulk_upload, automation, kiosk.
{
  "store_id": 123,
  "step": 1,
  "campaign_id": null,
  "name": "Summer Review Campaign"
}

How it works

  • 200 on every successful step. The response envelope carries status, message, campaign_id, and the full re-loaded campaign under data.
  • 400 (badRequestResponse) for invalid state transitions: editing a non-draft campaign on step 2. Missing solicitation feature on the plan; audience/automation not set up on steps 3–4; file still processing on step 4.
  • 404 when you supply campaign_id on steps ≥2 but does not resolve.
  • 422 on validation failure.

Response

200 OK · 200

{
  "data": {
    "status": "success",
    "message": "Campaign has been saved successfully",
    "campaign_id": 1,
    "data": {
      "id": 1,
      "name": "Summer Review Campaign",
      "description": null,
      "status": "draft",
      "current_step": 1,
      "store_id": 123,
      "scheduled_at": null,
      "started_at": null,
      "completed_at": null,
      "total_audience": 0,
      "request_per_day": 0,
      "request_frequency": 0,
      "request_delay": 0,
      "request_after_time": "14:00:00",
      "next_execution_time": null,
      "request_file_status": "pending",
      "request_file_name": null,
      "send_immediately": false,
      "request_file_path": null,
      "type": null,
      "channels": [],
      "email_requests": [],
      "sms_requests": [],
      "file_header": null
    }
  }
}

422 Validation · 422

{
  "message": "The name field is required.",
  "errors": {
    "name": [
      "The name field is required."
    ]
  }
}

Errors

StatusMeaning
400The request was rejected — the response explains why
401The bearer token is missing, expired or invalid
404Returned when you supply campaign_id on steps ≥2 but does not resolve
422Validation
500Unexpected server error

Example request

curl --request POST \
  --url "https://production-api.shoutaboutus.com/api/v1/campaign/create" \
  --header 'Authorization: Bearer <bearer-token>' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"store_id": 123, "step": 1, "campaign_id": null, "name": "Summer Review Campaign"}'

Did this page help you?