Your first campaign
This walkthrough creates a campaign and submits it for moderation. You need a client_id and client_secret, which Smartcast Media issues for your application.
Examples use the sandbox, where nothing plays on real screens.
export API=https://partner-api-sandbox.smartcast.media1. Get a token
Section titled “1. Get a token”curl -u "$CLIENT_ID:$CLIENT_SECRET" \ -d grant_type=client_credentials \ $API/oauth/tokenSave access_token. It lasts 30 minutes.
export TOKEN=...2. Find screens
Section titled “2. Find screens”curl -H "Authorization: Bearer $TOKEN" "$API/v1/screens?placing=OUTDOOR&limit=20"Note each screen’s id. A campaign is either indoor or outdoor, so choose screens of one placing; the placing filter does that.
3. Price a plan
Section titled “3. Price a plan”A plan shows the cost and which videos you need. It reserves nothing.
curl -X POST $API/v1/campaign-plans \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "startDate": "2026-12-01", "endDate": "2026-12-14", "screenIds": ["scr_B7"], "durationMs": 15000 }'Each item in contentRequirements is one video to supply. Keep its key.
4. Create the campaign
Section titled “4. Create the campaign”curl -X POST $API/v1/campaigns \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{ "externalRef": "acme-2026-winter-01", "name": "Winter sale", "startDate": "2026-12-01", "endDate": "2026-12-14", "screenIds": ["scr_B7"] }'It starts as a DRAFT.
5. Upload its creatives
Section titled “5. Upload its creatives”Upload one video for each content requirement, straight into the campaign:
curl -X POST $API/v1/campaigns/cmp_9Fz1/creatives \ -H "Authorization: Bearer $TOKEN" \ -H "Idempotency-Key: $(uuidgen)" \ -F "requirementKey=1280x768" \ -F "file=@winter.mp4;type=video/mp4"Each creative starts as PROCESSING. Check what is still missing:
curl -H "Authorization: Bearer $TOKEN" $API/v1/campaigns/cmp_9Fz1/creativesWhen complete is true, every requirement has a READY creative.
6. Submit it
Section titled “6. Submit it”curl -X POST -H "Authorization: Bearer $TOKEN" $API/v1/campaigns/cmp_9Fz1/submitThe campaign is now IN_REVIEW. See Campaign lifecycle for what happens next.
7. Read the results
Section titled “7. Read the results”Once it is running:
curl -H "Authorization: Bearer $TOKEN" $API/v1/campaigns/cmp_9Fz1/stats/deliveryFor a breakdown per screen, use /stats/daily, or /stats/hourly for up to 31 days at a time.
- Upload creatives for every content requirement.
- Handle errors and retries.