Skip to content
This API is in draft. Endpoints may change before release.

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.

Terminal window
export API=https://partner-api-sandbox.smartcast.media
Terminal window
curl -u "$CLIENT_ID:$CLIENT_SECRET" \
-d grant_type=client_credentials \
$API/oauth/token

Save access_token. It lasts 30 minutes.

Terminal window
export TOKEN=...
Terminal window
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.

A plan shows the cost and which videos you need. It reserves nothing.

Terminal window
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.

Terminal window
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.

Upload one video for each content requirement, straight into the campaign:

Terminal window
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:

Terminal window
curl -H "Authorization: Bearer $TOKEN" $API/v1/campaigns/cmp_9Fz1/creatives

When complete is true, every requirement has a READY creative.

Terminal window
curl -X POST -H "Authorization: Bearer $TOKEN" $API/v1/campaigns/cmp_9Fz1/submit

The campaign is now IN_REVIEW. See Campaign lifecycle for what happens next.

Once it is running:

Terminal window
curl -H "Authorization: Bearer $TOKEN" $API/v1/campaigns/cmp_9Fz1/stats/delivery

For a breakdown per screen, use /stats/daily, or /stats/hourly for up to 31 days at a time.