Create / update campaign (wizard step)

Create or advances 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).

Auth

  • 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.

Body

FieldTypeRequiredNotes
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.
request_frequencyintegerRequired (step 3)one of 0,1,2,3,4.
delay_requestintegerRequired (step 3)0–60 (days).
request_after_time_pststringOptional (step 3)H:i:s; defaults 14:00:00.
send_immediatelybooleanOptional (step 3)nullable. When true, step 4 sets next_execution_time to now.
typestringOptional (step 3)one of bulk_upload, automation, kiosk.

Behaviour

  • 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.
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
integer
integer
string | null
string
Responses

Language
Credentials
Bearer
JWT
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json