Quickstart
This API surface is for integration partners building on top of the Rokt network. Rokt ecommerce partners integrating placements on their own checkout should use the Rokt Ecommerce developer docs instead.
This walkthrough takes you from zero to a registered merchant with verified controls and an active partnership, using dry_run=true so nothing persists. Drop the dry-run flag when you're ready to go live.
You'll need an API token and a terminal.
Before you startDirect link to Before you start
Gather the following before running the calls below. Each one will be referenced by name in the steps that follow.
- API credentials (
client_id+client_secret): issued once by Rokt during onboarding, then reused every time you exchange them for the short-lived access token used in the calls below. See Authentication if you don't have them yet. - Partner platform's Rokt parent account ID: your platform's top-level account in Rokt's hierarchy. Your Rokt onboarding contact provides this.
vertical_id+sub_vertical_idfor the merchant: either Rokt's own vertical and sub-vertical IDs, which work with no setup, or your own taxonomy's IDs. Your own IDs need a custom mapping that Rokt seeds for your parent account, once per platform: email your complete category list to smb-partnerships@rokt.com, then verify it landed in step 2. See Vertical taxonomy.- Store URL with scheme: e.g.
https://acme.myshopify.com. Bare hosts (acme.myshopify.com) are rejected with 400. - A stable
external_account_id: your platform's own identifier for this merchant. Register is idempotent on this value, so it must be stable across retries. uuidgen(or any UUID generator): for producing freshIdempotency-Keyvalues on writes.
Two contracts every call follows.
- Every response is wrapped in
{ "status", "error", "message", "request_id", "data": { ... } }. Endpoint-specific payloads live insidedata. Examples below show the full envelope. - Every write needs
X-Platform-Parent-Account-Idset to your partner platform's Rokt parent account ID. Missing it returns422on writes. Reads accept it as optional but recommended.
Export both:
# Replace with YOUR partner platform's Rokt parent account ID (obtained from your Rokt onboarding contact).
export PARENT="<your-platform-parent-account-id>"
- Get your API token
Exchange your Rokt-granted API credentials for an access token; see Authentication. For the rest of this guide, export it:
- bash
export TOKEN="eyJhbGc..." - List the vertical pairs you can use
GET /v1/partnership/vertical-mappingsreturns every vertical pair your parent account can use: Rokt's own pairs first, then any custom pairs Rokt has seeded for you. Run it once before your first register call. Registration rejects a pair that isn't in this list with a400.- curl
curl "https://accounts.rokt.com/v1/partnership/vertical-mappings?parent_account_id=$PARENT" \
-H "Authorization: Bearer $TOKEN"Response:
{
"status": 200,
"error": null,
"message": "ok",
"request_id": "0e3a1b9c-...",
"data": {
"vertical_mappings": [
{
"partner_vertical_id": 8,
"partner_vertical_name": "Travel",
"partner_sub_vertical_id": 801,
"partner_sub_vertical_name": "Airlines",
"vertical_name": "Airlines",
"source": "rokt",
"created_at": null
},
{
"partner_vertical_id": 1500,
"partner_vertical_name": "Apparel",
"partner_sub_vertical_id": 1610,
"partner_sub_vertical_name": "Womenswear",
"vertical_name": "Retail",
"source": "custom",
"created_at": "2026-07-01T00:00:00Z"
}
]
}
}The IDs and names above are examples; a real response lists every Rokt pair. The
vertical_idandsub_vertical_idyou send in the next step must appear here as apartner_vertical_id/partner_sub_vertical_idpair.source: "rokt"rows use Rokt's own IDs and need no setup.source: "custom"rows are your own IDs, seeded for you.vertical_nameshows which Rokt category the pair resolves to, useful for spotting a custom mapping that went somewhere unexpected.warningUsing your own taxonomy and no
source: "custom"rows? Your taxonomy isn't seeded yet, and registering with your own IDs returns a400until it is. Email your complete category list to smb-partnerships@rokt.com and wait for confirmation, or send Rokt's IDs instead. See Check what's mapped. - Register a merchant
POST /v1/accounts/register/partnershipcreates (or matches) a Rokt account for a merchant onboarded via your platform. The call is idempotent onexternal_account_id: your stable identifier for the merchant in your own system.store_identifiermust be a valid URL (3–400 chars) including the scheme.https://acme.myshopify.comworks;acme.myshopify.comreturns 400.Capture
data.account_idfrom the response. You'll use it in every subsequent call. If you also passedpages, capture each entry'spage_identifier; you'll pass that string into the Web SDK'sselectPlacementscall to target each surface. See Pages and Layouts.noteregisteris the one write that does not require anIdempotency-Keyheader; it's idempotent onexternal_account_idinstead. All subsequent writes (controls, status, payout-setup, etc.) requireIdempotency-Key.- curl
# pages[].surface: confirmation | tracking | returns
# pages[].layout_type: Overlay | Embedded
# Every integration ships a default; omit `pages` to use it, or pass an array to override. See pages-and-layouts.
curl -X POST https://accounts.rokt.com/v1/accounts/register/partnership \
-H "Authorization: Bearer $TOKEN" \
-H "X-Platform-Parent-Account-Id: $PARENT" \
-H "Content-Type: application/json" \
-d '{
"brand": "Acme Apparel",
"vertical_id": 1500,
"sub_vertical_id": 1610,
"country_code": "US",
"platform_parent_account_id": "<your-platform-parent-account-id>",
"store_identifier": "https://acme-apparel.example.com",
"external_account_id": "partner-merchant-abc123",
"pages": [
{ "surface": "confirmation", "layout_type": "Overlay" },
{ "surface": "tracking", "layout_type": "Embedded" },
{ "surface": "returns", "layout_type": "Embedded" }
]
}'Response:
{
"status": 200,
"error": null,
"message": "ok",
"request_id": "0e3a1b9c-1234-4abc-9def-aaaabbbbcccc",
"data": {
"account_id": "<your-account-id>",
"pages": [
{ "surface": "confirmation", "page_id": "bfb5b9be-...", "layout_id": "9d11d8aa-...", "page_identifier": "confirmation_page" },
{ "surface": "tracking", "page_id": "2b9d8a5e-...", "layout_id": "f8700369-...", "page_identifier": "tracking_page" },
{ "surface": "returns", "page_id": "7a31963a-...", "layout_id": "4865f1ab-...", "page_identifier": "returns_page" }
]
}
}tipExport it:
export ACCOUNT_ID="<your-account-id>".Auth-propagation raceToken authentication for newly-created merchant accounts propagates asynchronously. Immediate calls to controls, status, or payout-setup endpoints on the new
account_idcan return401or403for up to 1–2 minutes. Don't treat the first auth failure on a fresh account as terminal; retry every 15–30 seconds for up to two minutes before investigating. - Read current marketplace controls
GET /v1/partnership/accounts/{account_id}/marketplacecontrolslistsreturns the merchant's current marketplace control configuration. On a fresh account, this reflects the default vertical block list inherited from your partnership preset.- curl
curl https://accounts.rokt.com/v1/partnership/accounts/$ACCOUNT_ID/marketplacecontrolslists \
-H "Authorization: Bearer $TOKEN" \
-H "X-Platform-Parent-Account-Id: $PARENT"Look at
data.translated_verticalsanddata.marketplace_controls_list.content_hash.translated_verticalsshows the effective policy per pair you can use (vertical_idis the partner sub-vertical ID you send on PUT; for a Rokt pair, that is Rokt's sub-vertical ID), useful for round-tripping back to your UI. - Update marketplace controls (dry-run)
Verticals merge: send only what you are changing, and use
policy: "Allow"to unblock.domainsreplaces in full. See Update semantics.X-Platform-Parent-Account-Idis required on all writes; missing it returns 422.Idempotency-Keyis required on all writes. Generate a fresh UUID per logical retry group. The 24-hour dedup window collapses retries with the same key into a single execution.dry_run=trueruns the full validation without persisting state, perfect for validating a payload. The response envelope addsdry_run: truealongsidedata.
- curl
curl -X PUT "https://accounts.rokt.com/v1/partnership/accounts/$ACCOUNT_ID/marketplacecontrolslists?dry_run=true" \
-H "Authorization: Bearer $TOKEN" \
-H "X-Platform-Parent-Account-Id: $PARENT" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"name": "Acme Network Controls",
"blockedVerticals": [
{
"partnerVerticalId": 1500,
"partnerSubVerticalId": 1610,
"policy": "Block",
"position1Policy": "Block"
},
{
"partnerVerticalId": 1500,
"partnerSubVerticalId": 1611,
"policy": "Block",
"position1Policy": "Block"
}
],
"domains": [
{ "domain": "competitor.example.com", "policy": "Block" }
],
"contentHash": null
}'noteWhen updating existing controls, send the
content_hashfrom your GET ascontentHash. The service rejects a supplied stale hash before writing. See Update Semantics for when the check runs and how to coordinate writes.The response payload (inside
data) matchesGET: sametranslated_verticalsandmarketplace_controls_list(withdomainsand a freshcontent_hash). On dry-run, the response describes what would be written. - Activate the partnership (dry-run)
PUT /v1/partnership/accounts/{account_id}/statuscascades active/paused across every non-archived page variant on the account.- curl
curl -X PUT "https://accounts.rokt.com/v1/partnership/accounts/$ACCOUNT_ID/status?dry_run=true" \
-H "Authorization: Bearer $TOKEN" \
-H "X-Platform-Parent-Account-Id: $PARENT" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{ "status": "active" }'Response
data.variants[]lists the per-variant breakdown:{
"status": 200,
"error": null,
"message": "ok",
"request_id": "0e3a1b9c-...",
"data": {
"account_id": "<your-account-id>",
"status": "active",
"variants": [
{ "page_id": "9d11...", "name": "Thanks", "status": "active" }
]
}
} - Verify status
GET /v1/partnership/accounts/{account_id}/statusreturns the aggregate status plus the per-variant detail.- curl
curl https://accounts.rokt.com/v1/partnership/accounts/$ACCOUNT_ID/status \
-H "Authorization: Bearer $TOKEN" \
-H "X-Platform-Parent-Account-Id: $PARENT"In production (drop
dry_run=true),data.statusshould match what you justPUT. If you see"mixed"after aPUT status=active, some variants failed to update; capture therequest_idand file a support ticket.The aggregation rule:
"active": every non-archived variant is enabled."paused": every non-archived variant is disabled (or none exist)."mixed": some enabled, some disabled.
Next stepsDirect link to Next steps
Start here:
Then: