/spotify-ads-api:spotify-ads-api-referencefrom spotify-ads-api
Provides reference and tooling for the Spotify Ads API v3, enabling campaign management, ad creation, reporting, audience targeting, and asset uploads via OAuth 2.0.
Ships in spotify-ads-api. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Before sending any output to a human user, read and follow $PLUGIN_ROOT/skills/api-reference/references/language-standards.md.
The Spotify Ads API v3 enables programmatic management of advertising campaigns on Spotify. It follows a strict resource hierarchy and uses OAuth 2.0 bearer token authentication.
https://api-partner.spotify.com/ads/v3
All requests require a Bearer token and tracking headers:
Authorization: Bearer <access_token>
X-Spotify-Ads-Sdk: <sdk-product>/<version>
X-Spotify-Ads-Skill: <skill-name>
The request wrapper script (scripts/api-request.sh) injects these headers automatically. Skills define a local api() function that delegates to the wrapper:
PLUGIN_ROOT="${CODEX_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-.}}"
api() { "$PLUGIN_ROOT/scripts/api-request.sh" <skill-name> "$@"; }
To set up authentication, run the configure skill (/spotify-ads-api:configure on Claude/Codex, /configure on Antigravity), which supports OAuth 2.0 with automatic token refresh, manual OAuth, or direct token input.
Before answering a schema question or making an Ads API v3 call, read and follow
references/live-openapi.md. Fetch the public OpenAPI document once for the workflow and
use the relevant operation and component definitions as the source of truth for paths,
parameters, request bodies, responses, and enums.
Before building estimate, ad set, report, or draft payloads, also read
references/api-behaviors.md for runtime behaviour the spec does not express.
Critical rules:
targets.placements).placements when creating an ad set and on every audience estimate, using only values the ad product catalog allows for that product's ad sets (and any narrower limit the objective's spec description states). On ad set updates, keep a valid placements in the merged result.draft_hierarchy_version from the draft campaign.Business
└── Ad Account
├── Campaign
│ └── Ad Set
│ └── Ad (references Assets)
├── Draft Campaign (staging — not live until published)
│ └── Draft Ad Set
│ └── Draft Ad
├── Audience
├── Asset
└── Reports
Every CRUD operation on campaigns, ad sets, ads, assets, and audiences is scoped under an ad account ID.
Draft workflow (default for campaign hierarchy writes): Create drafts for new entities or from published entities → edit → validate → publish only after explicit confirmation. Use this flow for campaign, ad set, and ad creation or modification unless the user explicitly requests a direct live write.
For draft VALIDATE and PUBLISH, always fetch the draft campaign immediately before the action and use its current draft_hierarchy_version. PUBLISH creates live entities and always requires explicit user confirmation, even when automatic execution is enabled.
50000000 micro-amount.2025-09-23T04:56:07Z).ce4ff15e-f04d-48b9-9ddf-fb3c85fbd57a).limit (1-50, default 50) and offset (default 0).sort_direction (ASC/DESC) and entity-specific sort fields.status: ARCHIVED instead. Draft entities can be deleted.PAUSED (only campaigns do). Pause or resume an ad set or ad with a live PATCH of {"delivery":"OFF"} or {"delivery":"ON"} (an ad set PATCH carrying delivery must contain only that field), and find paused ad sets from the read-only is_paused response field, never statuses=PAUSED.api GET "ad_accounts/{ad_account_id}/ad_sets?campaign_ids=$CAMPAIGN_ID". There is no nested /campaigns/{id}/ad_sets route.POST /ad_accounts/{id}/campaigns — Create a live campaign (required: name and deprecated objective; prefer drafts with delivery_goal_group)GET /ad_accounts/{id}/campaigns — List campaigns (filterable by status, name, IDs)GET /ad_accounts/{id}/campaigns/{campaign_id} — Get campaign by IDPATCH /ad_accounts/{id}/campaigns/{campaign_id} — Update campaign (name, status)POST /ad_accounts/{id}/ad_sets — Create ad set (required: name, start_time, budget, asset_format, targets, bid_strategy)GET /ad_accounts/{id}/ad_sets/{ad_set_id} — Get ad set by IDPATCH /ad_accounts/{id}/ad_sets/{ad_set_id} — Update ad setPOST /ad_accounts/{id}/ads — Create ad (required: name, assets; also needs tagline, advertiser_name, ad_set_id, call_to_action)GET /ad_accounts/{id}/ads — List ads (filterable by ad_set_ids, asset_ids, statuses; no campaign_ids filter, so list the campaign's ad sets first)GET /ad_accounts/{id}/ads/{ad_id} — Get ad by IDPATCH /ad_accounts/{id}/ads/{ad_id} — Update adPOST /ad_accounts/{id}/assets — Create asset (image, audio, or video)GET /ad_accounts/{id}/assets — List assetsGET /ad_accounts/{id}/assets/{asset_id} — Get asset by IDPATCH /ad_accounts/{id}/assets/{asset_id} — Update assetPOST /ad_accounts/{id}/audiences — Create audience (CUSTOM or LOOKALIKE)GET /ad_accounts/{id}/audiences — List audiencesGET/PATCH /ad_accounts/{id}/audiences/{audience_id} — Get or edit an audienceDELETE /ad_accounts/{id}/audiences/{audience_id} — Delete audiencePOST /ad_accounts/{id}/audiences/upload_url — Get a signed customer-list upload URLPOST /ad_accounts/{id}/audiences/upload_url/{audience_id} — Replace an audience fileGET /ad_accounts/{id}/audiences/datasets — List datasets eligible for custom audiencesGET/POST /businesses/{id}/mobile_apps — List or register mobile appsGET/PATCH /businesses/{id}/mobile_apps/{mobile_app_id} — Get or update a mobile appPOST/DELETE /businesses/{id}/mobile_apps/{mobile_app_id}/ad_accounts/{ad_account_id} — Share or unshare an appPOST /businesses/{id}/pixels — Create a PixelGET /businesses/{id}/pixels/{pixel_id} — Get a PixelPATCH /businesses/{id}/pixels/{pixel_id} — Update a PixelPOST /businesses/{id}/capi — Create a CAPI integrationGET/PATCH /businesses/{id}/capi/{connection_id} — Get or update CAPIPOST/GET/DELETE /businesses/{id}/capi/{connection_id}/tokens[...] — Manage CAPI auth tokensGET/POST /businesses/{id}/datasets — List or create datasetsGET/PATCH /businesses/{id}/datasets/{dataset_id} — Get or update a datasetGET /businesses/{id}/datasets/{dataset_id}/diagnostics — Inspect received eventsPOST/DELETE /businesses/{id}/datasets/{dataset_id}/ad_accounts/{ad_account_id} — Share or unshare a datasetGET/POST /businesses — List or create businessesGET/PATCH /businesses/{id} — Get or update a businessGET /businesses/{id}/members — List members and invited usersGET/PATCH/DELETE /businesses/{id}/members/{member_id} — Inspect, edit, or remove a memberPATCH /businesses/{id}/members/{member_id}/role — Update a business roleGET/POST /businesses/{id}/invitations — List or create invitationsDELETE /businesses/{id}/invitations/{invitation_id} — Cancel an invitationGET/POST /businesses/{id}/ad_accounts — List or create ad accountsGET/PATCH /ad_accounts/{id} — Get or update supported ad-account fieldsGET/POST /ad_accounts/{id}/members — List or add ad-account membersPATCH/DELETE /ad_accounts/{id}/members/{member_id} — Update a role or remove accessGET /ad_accounts/{id}/aggregate_reports — Aggregated metrics by entityGET /ad_accounts/{id}/insight_reports — Audience insight breakdownsPOST /ad_accounts/{id}/async_reports — Create async CSV reportGET /ad_accounts/{id}/async_reports/{report_id} — Check async report statusDraft entities are staging versions that are not live until explicitly published. The full lifecycle: create drafts → edit → validate → publish.
For changes to published campaigns, ad sets, or ads, first check whether a same-ID draft already exists. Reuse and disclose an existing draft rather than recreating or overwriting pending work. If none exists, use the create-from-published endpoint, PATCH the draft endpoint, and validate the parent draft campaign. A denied direct write does not by itself mean the credentials are read-only; draft staging may still be available.
Campaign drafts:
POST /ad_accounts/{id}/drafts/campaigns — Create draft campaignGET /ad_accounts/{id}/drafts/campaigns — List draft campaignsGET /ad_accounts/{id}/drafts/campaigns/{draft_id} — Get draft campaignPATCH /ad_accounts/{id}/drafts/campaigns/{draft_id} — Update draft campaignPOST /ad_accounts/{id}/drafts/campaigns/{draft_id} — Publish or validate (body: {"action": "PUBLISH"|"VALIDATE", "draft_hierarchy_version": N})DELETE /ad_accounts/{id}/drafts/campaigns/{draft_id} — Delete draft campaignAd set drafts:
POST /ad_accounts/{id}/drafts/ad_sets — Create draft ad set (requires campaign_id referencing a draft campaign)GET /ad_accounts/{id}/drafts/ad_sets — List draft ad setsGET /ad_accounts/{id}/drafts/ad_sets/{draft_id} — Get draft ad setPATCH /ad_accounts/{id}/drafts/ad_sets/{draft_id} — Update draft ad setDELETE /ad_accounts/{id}/drafts/ad_sets/{draft_id} — Delete draft ad setAd drafts:
POST /ad_accounts/{id}/drafts/ads — Create draft ad (requires ad_set_id referencing a draft ad set)GET /ad_accounts/{id}/drafts/ads — List draft adsGET /ad_accounts/{id}/drafts/ads/{draft_id} — Get draft adPATCH /ad_accounts/{id}/drafts/ads/{draft_id} — Update draft adDELETE /ad_accounts/{id}/drafts/ads/{draft_id} — Delete draft adCreate draft from published entity:
POST /ad_accounts/{id}/campaigns/{campaign_id}/drafts — Draft from live campaignPOST /ad_accounts/{id}/ad_sets/{ad_set_id}/drafts — Draft from live ad setPOST /ad_accounts/{id}/ads/{ad_id}/drafts — Draft from live adGET/PATCH /ad_accounts/{id} — Get/update ad accountPOST/GET /businesses — Create/list businessesGET /businesses/{id} — Get business by IDGET /targets/artists — Search artist targetsGET /ad_categories — List ad categoriesGET /ad_product_catalog — Get live product-specific validation rules for AUCTION, CONTENT, and FPMNG. Fetch once per create or update workflow and do not retain a timed cross-operation cache. Follow references/ad-product-validation.md before mutating campaigns, ad sets, or ads.POST /estimates/audience — Estimate audience size for targeting parameters (recommended before creating ad sets to validate reach)POST /estimates/bid — Get bid recommendationsPOST /ad_accounts/{id}/reserved_prices — Get pricing for reserved ad products (fCPM)GET /ad_accounts/{id}/experiment_availability — Check which experiment types can be createdAll skills use the request wrapper script (scripts/api-request.sh) which handles settings discovery, authentication, and tracking headers automatically:
PLUGIN_ROOT="${CODEX_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-.}}"
api() { "$PLUGIN_ROOT/scripts/api-request.sh" <skill-name> "$@"; }
# GET
api GET "ad_accounts/{ad_account_id}/campaigns?limit=50"
# Draft-first POST with JSON body
api POST "ad_accounts/{ad_account_id}/drafts/campaigns" '{"name":"...","delivery_goal_group":"AWARENESS"}'
# Retrieve settings values for use outside API calls
eval $(api --env)
The wrapper reads the user's plugin settings from the active platform settings file (with platform-ordered fallback), reads the plugin version from the platform manifest, and injects Authorization, X-Spotify-Ads-Sdk, and X-Spotify-Ads-Skill headers. It appends \nHTTP_STATUS:<code> to every response. Paths use {ad_account_id} as a placeholder (auto-substituted from settings).
If the settings file does not exist, the wrapper exits with an error. Instruct the user to run the configure skill first (/spotify-ads-api:configure on Claude/Codex, /configure on Gemini).
curl -s -w "\nHTTP_STATUS:%{http_code}" -X GET \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "X-Spotify-Ads-Sdk: <sdk-product>/<version>" \
-H "X-Spotify-Ads-Skill: <skill-name>" \
"https://api-partner.spotify.com/ads/v3/ad_accounts/$AD_ACCOUNT_ID/campaigns?limit=50"
For error response format, common HTTP status codes, and retry safety, see references/api-behaviors.md (Errors and Retry Safety section).
For detailed request/response schemas and field definitions, consult:
references/live-openapi.md — Mandatory workflow for fetching and inspecting the current public OpenAPI documentreferences/api-behaviors.md — Runtime behavior the spec cannot express: micro-amounts, Reserved pricing and forecasting, estimates, geo lookup, reporting quirks, draft VALIDATE/PUBLISH semantics, and error handling and retry safetyreferences/create-retry-safety.md — Retry-safety procedure for create requestsreferences/ad-product-validation.md — Mandatory catalog-validation procedure for campaign, ad set, and ad mutationsWorking examples with shared api() helper commands and expected responses:
examples/full-campaign-flow.md — End-to-end: create campaign, ad set, and ad with targetingexamples/aggregate-report.md — Pull aggregate metrics and create async CSV reportsexamples/aggregate-report.md (opens in a new tab)examples/full-campaign-flow.md (opens in a new tab)references/ad-product-validation.md (opens in a new tab)references/api-behaviors.md (opens in a new tab)references/create-retry-safety.md (opens in a new tab)references/language-standards.md (opens in a new tab)references/live-openapi.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
20 skills in this plugin
/account-adminAdminister Spotify Ads API businesses and ad accounts: discover businesses and accounts, inspect or update supported profile and billing fields, create businesses or ad accounts, list members and roles, invite users, assign ad-account access, update roles, cancel invitations, and remove access. Use when a user asks to find an ad account by ID, audit access, onboard an agency or teammate, manage business/ad-account membership, or update supported account identity details./adsList or get Spotify Ads API ad sets and ads, and stage their creation or updates through drafts by default. Use direct live writes only when explicitly requested./assetsUpload, list, and manage Spotify Ads API creative assets — audio, video, and images for ad campaigns./audiencesManage Spotify Ads API audiences: upload or replace customer lists, create custom web-event or ad-engagement audiences, create lookalikes, list/get/edit audiences, inspect eligible datasets, and delete audiences. Use when a user asks to onboard first-party data, retarget people who saw or clicked ads, build an event-based audience, create a lookalike, replace an audience file, check audience status, or remove an audience./build-campaignCreate a full campaign (campaign + ad sets + ads) from a plain-text description. Parses natural language into structured API calls. Prefers the draft workflow for safer creation with batch validation./bulkStage batch changes to Spotify Ads API campaigns, ad sets, and ads through drafts by default — pause, resume, budgets, delivery, archive, creative, and tracking changes. Ad set and ad pause, resume, and delivery toggles are confirmed live writes because drafts cannot carry delivery; other live writes only when explicitly requested.npx claudepluginhub spotify/ads-agentic-tools --plugin spotify-ads-apiOther plugins' skills for the same job