Tap.co Developer API
Programmatic campaign management for advertisers.
The Tap.co Developer API allows you to discover advertising platforms, create and manage campaigns, upload creative assets, and track performance programmatically.
Authentication
The Tap API uses API keys to authenticate requests. You can view and manage your API keys in your dashboard.
Your API keys carry many privileges, so be sure to keep them secure. Do not share your secret API keys in publicly accessible areas.
Authentication is performed via the Authorization header with a Bearer token.
Base URL
https://sdk.tap.co/v1Errors
Tap uses conventional HTTP response codes to indicate the success or failure of an API request.
2xxSuccess4xxClient errors — the request contains bad syntax or cannot be fulfilled5xxServer errors — the server failed to fulfill a valid requestRate Limiting
The API enforces rate limits to ensure fair usage. If you exceed these limits, the API will return a 429 Too Many Requests response.
If you need to increase your rate limit, please contact us at support@tap.co.
curl https://sdk.tap.co/v1/campaigns \ -H "Authorization: Bearer tap_live_xxx" { "error": { "type": "authentication_error", "code": "invalid_api_key", "message": "Invalid API key provided" }}# Live modetap_live_xxxxxxxxxxxxxxxxxxxxxxxx # Test modetap_test_xxxxxxxxxxxxxxxxxxxxxxxx AI-generate a media plan
Uses AI to generate an optimized media plan based on your campaign goals, budget, and target audience. Returns a recommended mix of platforms with scheduling and budget allocation. The AI considers: - Your total budget and how to allocate it effectively - Target audience demographics and psychographics - Geographic targeting requirements - Campaign objectives (awareness, consideration, conversion) - Optimal media mix across channels - Timing and flight scheduling
Body parameters
budget_centsintegerrequiredTotal campaign budget in cents (minimum $1,000)
currencystringtarget_audienceobjectmarket_areasstring[]requiredGeographic markets to target (cities, regions, or DMAs)
objectivesobjectcampaign_datesobjectrequiredpreferencesobjectbusiness_contextobjectReturns
curl -X POST https://sdk.tap.co/v1/plans/generate \ -H "Authorization: Bearer tap_live_xxx" \ -H "Content-Type: application/json" \ -d '{ "budget_cents": 5000000, "currency": "USD", "target_audience": { "age_range": "25-45", "gender": "all", "interests": [ "technology", "fitness", "travel" ], "income_level": "middle-upper" }, "market_areas": [ "Los Angeles, CA", "San Francisco, CA" ], "objectives": { "primary": "brand_awareness", "secondary": [ "consideration" ] }, "campaign_dates": { "start": "2026-03-01", "end": "2026-03-31" }, "preferences": { "media_types": [ "radio", "streaming", "podcast" ], "exclude_platforms": [] } }' { "id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "status": "generating", "name": "Q1 2026 Brand Awareness - LA & SF Markets", "summary": "string", "platforms": [ { "platform_id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "platform_name": "KQED Radio", "media_type": "radio", "market_area": "San Francisco, CA", "allocated_budget_cents": 750000, "budget_percentage": 15, "dates": [ { "start": "2026-01-15", "end": "2026-01-15" } ], "configuration": {}, "estimated_impressions": 425000, "estimated_reach": 180000, "cpm_cents": 1765, "rationale": "Strong match with target demographic in SF metro area", "audience_match_score": 0.87 } ], "totals": { "budget_cents": 5000000, "estimated_impressions": 3250000, "estimated_reach": 875000, "estimated_frequency": 3.7, "cpm_cents": 1538 }, "media_mix": {}, "schedule": { "start_date": "2026-01-15", "end_date": "2026-01-15", "weeks": 0, "flight_pattern": "continuous" }, "rationale": "string", "alternatives": [ { "type": "string", "description": "string", "impact": "string" } ], "created_at": "2026-01-15T10:30:00Z", "expires_at": "2026-01-15T10:30:00Z"}Get plan generation status
Retrieves the status of an asynchronous plan generation job. Poll this endpoint until `status` is `completed` or `failed`. The `plan` object is included when generation completes successfully.
Parameters
jobIdstringrequiredReturns
curl https://sdk.tap.co/v1/plans/generate/:jobId \ -H "Authorization: Bearer tap_live_xxx" { "job_id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "status": "pending", "progress": 0, "plan": { "id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "status": "generating", "name": "Q1 2026 Brand Awareness - LA & SF Markets", "summary": "string", "platforms": [ { "platform_id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "platform_name": "KQED Radio", "media_type": "radio", "market_area": "San Francisco, CA", "allocated_budget_cents": 750000, "budget_percentage": 15, "dates": [ { "start": "2026-01-15", "end": "2026-01-15" } ], "configuration": {}, "estimated_impressions": 425000, "estimated_reach": 180000, "cpm_cents": 1765, "rationale": "Strong match with target demographic in SF metro area", "audience_match_score": 0.87 } ], "totals": { "budget_cents": 5000000, "estimated_impressions": 3250000, "estimated_reach": 875000, "estimated_frequency": 3.7, "cpm_cents": 1538 }, "media_mix": {}, "schedule": { "start_date": "2026-01-15", "end_date": "2026-01-15", "weeks": 0, "flight_pattern": "continuous" }, "rationale": "string", "alternatives": [ { "type": "string", "description": "string", "impact": "string" } ], "created_at": "2026-01-15T10:30:00Z", "expires_at": "2026-01-15T10:30:00Z" }, "error": "string", "created_at": "2026-01-15T10:30:00Z", "completed_at": "2026-01-15T10:30:00Z"}Refine a generated plan
Refines an existing plan based on natural language feedback or structured adjustments. Returns a new plan version with the requested changes applied. The original plan is preserved.
Body parameters
plan_idstringrequiredID of the plan to refine
feedbackstringNatural language feedback for the AI
adjustmentsobjectReturns
curl -X POST https://sdk.tap.co/v1/plans/generate/refine \ -H "Authorization: Bearer tap_live_xxx" \ -H "Content-Type: application/json" \ -d '{ "plan_id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "feedback": "Increase radio budget and reduce streaming. Focus more on morning drive time.", "adjustments": { "budget_cents": 0, "add_platforms": [ "plan_8f2a9c4b1d3e5f6a7b8c9d0e" ], "remove_platforms": [ "plan_8f2a9c4b1d3e5f6a7b8c9d0e" ], "platform_budgets": {}, "media_type_weights": {}, "extend_dates": { "start": "2026-01-15", "end": "2026-01-15" } } }' { "id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "status": "generating", "name": "Q1 2026 Brand Awareness - LA & SF Markets", "summary": "string", "platforms": [ { "platform_id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "platform_name": "KQED Radio", "media_type": "radio", "market_area": "San Francisco, CA", "allocated_budget_cents": 750000, "budget_percentage": 15, "dates": [ { "start": "2026-01-15", "end": "2026-01-15" } ], "configuration": {}, "estimated_impressions": 425000, "estimated_reach": 180000, "cpm_cents": 1765, "rationale": "Strong match with target demographic in SF metro area", "audience_match_score": 0.87 } ], "totals": { "budget_cents": 5000000, "estimated_impressions": 3250000, "estimated_reach": 875000, "estimated_frequency": 3.7, "cpm_cents": 1538 }, "media_mix": {}, "schedule": { "start_date": "2026-01-15", "end_date": "2026-01-15", "weeks": 0, "flight_pattern": "continuous" }, "rationale": "string", "alternatives": [ { "type": "string", "description": "string", "impact": "string" } ], "created_at": "2026-01-15T10:30:00Z", "expires_at": "2026-01-15T10:30:00Z"}Convert generated plan to campaign
Converts a generated plan into a campaign draft. The new campaign includes all platforms, dates, and configurations from the plan. Plans expire 24 hours after generation.
Body parameters
plan_idstringrequiredID of the generated plan to convert
campaign_namestringOptional name for the campaign (defaults to plan name)
advertiser_namestringAdvertiser/brand name
Returns
curl -X POST https://sdk.tap.co/v1/plans/generate/convert \ -H "Authorization: Bearer tap_live_xxx" \ -H "Content-Type: application/json" \ -d '{ "plan_id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "campaign_name": "string", "advertiser_name": "string" }' { "id": "camp_7d4e8f2a1b3c5d6e9f0a1b2c", "tap_id": "TAP-2026-0042", "status": "active", "name": "Summer Sale 2026", "advertiser_name": "Acme Corp", "platforms": [ { "platform_id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "platform_name": "string", "dates": [ { "start": "2026-01-15", "end": "2026-01-15" } ], "configuration": {}, "estimated_impressions": 0, "estimated_cost": { "subtotal_cents": 4500000, "fees_cents": 500000, "total_cents": 5000000, "currency": "USD" } } ], "estimated_cost": { "subtotal_cents": 4500000, "fees_cents": 500000, "total_cents": 5000000, "currency": "USD" }, "estimated_impressions": 0, "billing_schedule": [ { "id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "amount_cents": 0, "due_date": "2026-01-15", "status": "pending", "paid_at": "2026-01-15T10:30:00Z" } ], "notes": "string", "created_at": "2026-01-15T10:30:00Z", "updated_at": "2026-01-15T10:30:00Z", "activated_at": "2026-01-15T10:30:00Z"}List advertising platforms
Returns a paginated list of advertising platforms. Filter by `media_type`, `market_area`, or budget range. For natural language queries, use `POST /platforms/search` instead.
Parameters
limitintegerMaximum number of items to return
cursorstringCursor for pagination (from previous response)
media_typestringFilter by media type
"radio", "tv", "digital", "ooh", "streaming", "podcast", "print"market_areastringFilter by market area (city, region, or DMA)
budget_minintegerMinimum budget in cents
budget_maxintegerMaximum budget in cents
Returns
curl https://sdk.tap.co/v1/platforms \ -H "Authorization: Bearer tap_live_xxx" { "data": [ { "id": "plat_8f2a9c4b1d3e5f6a7b8c9d0e", "name": "KQED Radio", "description": "Premier public radio station serving the San Francisco Bay Area", "media_type": "radio", "market_areas": [ "San Francisco, CA", "Oakland, CA", "San Jose, CA" ], "audience": { "demographics": { "age_range": "25-54", "gender_split": { "male": 0.48, "female": 0.52 }, "income_level": "middle-upper" }, "reach": 125000, "impressions": 450000 }, "pricing": { "base_rate_cents": 1500, "rate_type": "cpm", "minimum_spend_cents": 250000, "currency": "USD" }, "creative_specs": { "formats": [ { "type": "image", "dimensions": { "width": 0, "height": 0 }, "duration_seconds": 0, "max_file_size_bytes": 0, "accepted_formats": [ "string" ] } ], "guidelines": "string" }, "availability_status": "available", "created_at": "2026-01-15T10:30:00Z" } ], "meta": { "has_more": false, "next_cursor": "string" }}Get platform details
Retrieves a platform's details including audience demographics, pricing, market areas, and creative specifications.
Parameters
platformIdstringrequiredPlatform ID
Returns
curl https://sdk.tap.co/v1/platforms/:platformId \ -H "Authorization: Bearer tap_live_xxx" { "id": "plat_8f2a9c4b1d3e5f6a7b8c9d0e", "name": "KQED Radio", "description": "Premier public radio station serving the San Francisco Bay Area", "media_type": "radio", "market_areas": [ "San Francisco, CA", "Oakland, CA", "San Jose, CA" ], "audience": { "demographics": { "age_range": "25-54", "gender_split": { "male": 0.48, "female": 0.52 }, "income_level": "middle-upper" }, "reach": 125000, "impressions": 450000 }, "pricing": { "base_rate_cents": 1500, "rate_type": "cpm", "minimum_spend_cents": 250000, "currency": "USD" }, "creative_specs": { "formats": [ { "type": "image", "dimensions": { "width": 0, "height": 0 }, "duration_seconds": 0, "max_file_size_bytes": 0, "accepted_formats": [ "string" ] } ], "guidelines": "string" }, "availability_status": "available", "created_at": "2026-01-15T10:30:00Z"}Search platforms with natural language
Searches for platforms using natural language queries. Results include a `relevance_score` (0-1) indicating match quality. Can be combined with structured filters.
Body parameters
querystringrequiredNatural language search query
filtersPlatformFilterslimitintegerReturns
curl -X POST https://sdk.tap.co/v1/platforms/search \ -H "Authorization: Bearer tap_live_xxx" \ -H "Content-Type: application/json" \ -d '{ "query": "Radio stations targeting young professionals in New York", "filters": { "media_types": [ "string" ], "market_areas": [ "string" ], "budget_min": 0, "budget_max": 0, "audience_demographics": {} }, "limit": 20 }' { "data": [ null ], "meta": { "has_more": false, "next_cursor": "string" }}Check platform availability
Checks inventory availability for a platform during specific dates. Returns available and unavailable date ranges with cost estimates. Availability is not guaranteed until campaign activation.
Parameters
platformIdstringrequiredstart_datestringrequiredStart date (YYYY-MM-DD)
end_datestringrequiredEnd date (YYYY-MM-DD)
Returns
curl https://sdk.tap.co/v1/platforms/:platformId/availability \ -H "Authorization: Bearer tap_live_xxx" { "platform_id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "available": false, "available_dates": [ { "start": "2026-01-15", "end": "2026-01-15" } ], "unavailable_dates": [ "2026-01-15" ], "estimated_cost": { "subtotal_cents": 4500000, "fees_cents": 500000, "total_cents": 5000000, "currency": "USD" }}Get creative specifications
Returns the creative specifications for a platform including accepted formats, dimensions, durations, and file size limits.
Parameters
platformIdstringrequiredReturns
curl https://sdk.tap.co/v1/platforms/:platformId/creative-specs \ -H "Authorization: Bearer tap_live_xxx" { "formats": [ { "type": "image", "dimensions": { "width": 0, "height": 0 }, "duration_seconds": 0, "max_file_size_bytes": 0, "accepted_formats": [ "string" ] } ], "guidelines": "string"}List campaigns
Returns a paginated list of campaigns. Filter by `status` to show only campaigns in a specific state.
Parameters
limitintegerMaximum number of items to return
cursorstringCursor for pagination (from previous response)
statusstringFilter by campaign status
"draft", "pending_payment", "active", "paused", "completed", "cancelled"Returns
curl https://sdk.tap.co/v1/campaigns \ -H "Authorization: Bearer tap_live_xxx" { "data": [ { "id": "camp_7d4e8f2a1b3c5d6e9f0a1b2c", "tap_id": "TAP-2026-0042", "status": "active", "name": "Summer Sale 2026", "advertiser_name": "Acme Corp", "platforms": [ { "platform_id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "platform_name": "string", "dates": [ { "start": "2026-01-15", "end": "2026-01-15" } ], "configuration": {}, "estimated_impressions": 0, "estimated_cost": { "subtotal_cents": 4500000, "fees_cents": 500000, "total_cents": 5000000, "currency": "USD" } } ], "estimated_cost": { "subtotal_cents": 4500000, "fees_cents": 500000, "total_cents": 5000000, "currency": "USD" }, "estimated_impressions": 0, "billing_schedule": [ { "id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "amount_cents": 0, "due_date": "2026-01-15", "status": "pending", "paid_at": "2026-01-15T10:30:00Z" } ], "notes": "string", "created_at": "2026-01-15T10:30:00Z", "updated_at": "2026-01-15T10:30:00Z", "activated_at": "2026-01-15T10:30:00Z" } ], "meta": { "has_more": false, "next_cursor": "string" }}Create a campaign
Creates a new campaign in `draft` status. Draft campaigns can be modified until activated. The response includes `estimated_cost` for the configured platforms.
Body parameters
namestringrequiredadvertiser_namestringrequiredplatformsCampaignPlatformInput[]requirednotesstringReturns
curl -X POST https://sdk.tap.co/v1/campaigns \ -H "Authorization: Bearer tap_live_xxx" \ -H "Content-Type: application/json" \ -d '{ "name": "Summer Sale 2026", "advertiser_name": "Acme Corp", "platforms": [ { "platform_id": "plat_abc123", "dates": [ { "start": "2026-02-01", "end": "2026-02-14" } ], "configuration": { "spots_per_day": 4, "dayparts": [ "morning", "afternoon" ] } } ], "notes": "Target audience: 25-45 professionals" }' { "id": "camp_7d4e8f2a1b3c5d6e9f0a1b2c", "tap_id": "TAP-2026-0042", "status": "active", "name": "Summer Sale 2026", "advertiser_name": "Acme Corp", "platforms": [ { "platform_id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "platform_name": "string", "dates": [ { "start": "2026-01-15", "end": "2026-01-15" } ], "configuration": {}, "estimated_impressions": 0, "estimated_cost": { "subtotal_cents": 4500000, "fees_cents": 500000, "total_cents": 5000000, "currency": "USD" } } ], "estimated_cost": { "subtotal_cents": 4500000, "fees_cents": 500000, "total_cents": 5000000, "currency": "USD" }, "estimated_impressions": 0, "billing_schedule": [ { "id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "amount_cents": 0, "due_date": "2026-01-15", "status": "pending", "paid_at": "2026-01-15T10:30:00Z" } ], "notes": "string", "created_at": "2026-01-15T10:30:00Z", "updated_at": "2026-01-15T10:30:00Z", "activated_at": "2026-01-15T10:30:00Z"}Get campaign details
Retrieves a campaign including its platforms, cost estimates, billing schedule, and current status.
Parameters
campaignIdstringrequiredReturns
curl https://sdk.tap.co/v1/campaigns/:campaignId \ -H "Authorization: Bearer tap_live_xxx" { "id": "camp_7d4e8f2a1b3c5d6e9f0a1b2c", "tap_id": "TAP-2026-0042", "status": "active", "name": "Summer Sale 2026", "advertiser_name": "Acme Corp", "platforms": [ { "platform_id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "platform_name": "string", "dates": [ { "start": "2026-01-15", "end": "2026-01-15" } ], "configuration": {}, "estimated_impressions": 0, "estimated_cost": { "subtotal_cents": 4500000, "fees_cents": 500000, "total_cents": 5000000, "currency": "USD" } } ], "estimated_cost": { "subtotal_cents": 4500000, "fees_cents": 500000, "total_cents": 5000000, "currency": "USD" }, "estimated_impressions": 0, "billing_schedule": [ { "id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "amount_cents": 0, "due_date": "2026-01-15", "status": "pending", "paid_at": "2026-01-15T10:30:00Z" } ], "notes": "string", "created_at": "2026-01-15T10:30:00Z", "updated_at": "2026-01-15T10:30:00Z", "activated_at": "2026-01-15T10:30:00Z"}Update campaign
Updates a campaign. Only `draft` campaigns can be modified. When updating `platforms`, provide the complete configuration as it fully replaces the existing platforms.
Parameters
campaignIdstringrequiredBody parameters
namestringadvertiser_namestringplatformsCampaignPlatformInput[]notesstringReturns
curl -X PATCH https://sdk.tap.co/v1/campaigns/:campaignId \ -H "Authorization: Bearer tap_live_xxx" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "advertiser_name": "string", "platforms": [ { "platform_id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "dates": [ { "start": "2026-01-15", "end": "2026-01-15" } ], "configuration": {} } ], "notes": "string" }' { "id": "camp_7d4e8f2a1b3c5d6e9f0a1b2c", "tap_id": "TAP-2026-0042", "status": "active", "name": "Summer Sale 2026", "advertiser_name": "Acme Corp", "platforms": [ { "platform_id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "platform_name": "string", "dates": [ { "start": "2026-01-15", "end": "2026-01-15" } ], "configuration": {}, "estimated_impressions": 0, "estimated_cost": { "subtotal_cents": 4500000, "fees_cents": 500000, "total_cents": 5000000, "currency": "USD" } } ], "estimated_cost": { "subtotal_cents": 4500000, "fees_cents": 500000, "total_cents": 5000000, "currency": "USD" }, "estimated_impressions": 0, "billing_schedule": [ { "id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "amount_cents": 0, "due_date": "2026-01-15", "status": "pending", "paid_at": "2026-01-15T10:30:00Z" } ], "notes": "string", "created_at": "2026-01-15T10:30:00Z", "updated_at": "2026-01-15T10:30:00Z", "activated_at": "2026-01-15T10:30:00Z"}Delete campaign
Permanently deletes a draft campaign. Only `draft` and `pending_payment` campaigns can be deleted. Active or completed campaigns must be cancelled instead.
Parameters
campaignIdstringrequiredReturns
curl -X DELETE https://sdk.tap.co/v1/campaigns/:campaignId \ -H "Authorization: Bearer tap_live_xxx" Activate campaign
Activates a draft campaign, processing payment and scheduling ad delivery. Returns `402` if payment fails. Once activated, the campaign cannot be modified.
Parameters
campaignIdstringrequiredBody parameters
payment_method_idstringrequiredID of the payment method to use
Returns
curl -X POST https://sdk.tap.co/v1/campaigns/:campaignId/activate \ -H "Authorization: Bearer tap_live_xxx" \ -H "Content-Type: application/json" \ -d '{ "payment_method_id": "string" }' { "id": "camp_7d4e8f2a1b3c5d6e9f0a1b2c", "tap_id": "TAP-2026-0042", "status": "active", "name": "Summer Sale 2026", "advertiser_name": "Acme Corp", "platforms": [ { "platform_id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "platform_name": "string", "dates": [ { "start": "2026-01-15", "end": "2026-01-15" } ], "configuration": {}, "estimated_impressions": 0, "estimated_cost": { "subtotal_cents": 4500000, "fees_cents": 500000, "total_cents": 5000000, "currency": "USD" } } ], "estimated_cost": { "subtotal_cents": 4500000, "fees_cents": 500000, "total_cents": 5000000, "currency": "USD" }, "estimated_impressions": 0, "billing_schedule": [ { "id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "amount_cents": 0, "due_date": "2026-01-15", "status": "pending", "paid_at": "2026-01-15T10:30:00Z" } ], "notes": "string", "created_at": "2026-01-15T10:30:00Z", "updated_at": "2026-01-15T10:30:00Z", "activated_at": "2026-01-15T10:30:00Z"}Cancel campaign
Cancels an active or pending campaign. Stops future ad delivery and processes a prorated refund. Cancellation fees may apply depending on timing.
Parameters
campaignIdstringrequiredReturns
curl -X POST https://sdk.tap.co/v1/campaigns/:campaignId/cancel \ -H "Authorization: Bearer tap_live_xxx" { "id": "camp_7d4e8f2a1b3c5d6e9f0a1b2c", "tap_id": "TAP-2026-0042", "status": "active", "name": "Summer Sale 2026", "advertiser_name": "Acme Corp", "platforms": [ { "platform_id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "platform_name": "string", "dates": [ { "start": "2026-01-15", "end": "2026-01-15" } ], "configuration": {}, "estimated_impressions": 0, "estimated_cost": { "subtotal_cents": 4500000, "fees_cents": 500000, "total_cents": 5000000, "currency": "USD" } } ], "estimated_cost": { "subtotal_cents": 4500000, "fees_cents": 500000, "total_cents": 5000000, "currency": "USD" }, "estimated_impressions": 0, "billing_schedule": [ { "id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "amount_cents": 0, "due_date": "2026-01-15", "status": "pending", "paid_at": "2026-01-15T10:30:00Z" } ], "notes": "string", "created_at": "2026-01-15T10:30:00Z", "updated_at": "2026-01-15T10:30:00Z", "activated_at": "2026-01-15T10:30:00Z"}Get campaign metrics
Returns performance metrics for a campaign including impressions, reach, frequency, and spend. Includes a `by_platform` breakdown.
Parameters
campaignIdstringrequiredReturns
curl https://sdk.tap.co/v1/campaigns/:campaignId/metrics \ -H "Authorization: Bearer tap_live_xxx" { "campaign_id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "impressions": 875000, "reach": 312000, "frequency": 2.8, "spend_cents": 1250000, "cpm_cents": 1428, "period": { "start": "2026-01-15", "end": "2026-01-15" }, "by_platform": [ { "platform_id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "platform_name": "KQED Radio", "impressions": 350000, "spend_cents": 500000 } ]}List campaign creatives
Returns all creatives attached to a campaign. Each creative includes its brief, assets, and approval `status`.
Parameters
campaignIdstringrequiredReturns
curl https://sdk.tap.co/v1/campaigns/:campaignId/creatives \ -H "Authorization: Bearer tap_live_xxx" { "data": [ { "id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "campaign_id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "type": "display", "status": "pending", "brief": { "headline": "string", "body_copy": "string", "call_to_action": "string", "tone": "string", "target_audience": "string", "key_messages": [ "string" ] }, "assets": [ { "id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "name": "string", "type": "image", "url": "https://example.com", "size_bytes": 0, "dimensions": { "width": 0, "height": 0 }, "duration_seconds": 0, "mime_type": "string", "created_at": "2026-01-15T10:30:00Z" } ], "rejection_reason": "string", "created_at": "2026-01-15T10:30:00Z", "updated_at": "2026-01-15T10:30:00Z" } ]}Add creative to campaign
Adds a creative to a campaign. Provide the creative type, brief, and asset IDs. The creative enters `pending` status for validation.
Parameters
campaignIdstringrequiredBody parameters
typestringrequired"display", "video", "audio", "native"briefCreativeBriefasset_idsstring[]Returns
curl -X POST https://sdk.tap.co/v1/campaigns/:campaignId/creatives \ -H "Authorization: Bearer tap_live_xxx" \ -H "Content-Type: application/json" \ -d '{ "type": "display", "brief": { "headline": "string", "body_copy": "string", "call_to_action": "string", "tone": "string", "target_audience": "string", "key_messages": [ "string" ] }, "asset_ids": [ "plan_8f2a9c4b1d3e5f6a7b8c9d0e" ] }' { "id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "campaign_id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "type": "display", "status": "pending", "brief": { "headline": "string", "body_copy": "string", "call_to_action": "string", "tone": "string", "target_audience": "string", "key_messages": [ "string" ] }, "assets": [ { "id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "name": "string", "type": "image", "url": "https://example.com", "size_bytes": 0, "dimensions": { "width": 0, "height": 0 }, "duration_seconds": 0, "mime_type": "string", "created_at": "2026-01-15T10:30:00Z" } ], "rejection_reason": "string", "created_at": "2026-01-15T10:30:00Z", "updated_at": "2026-01-15T10:30:00Z"}Get creative details
Retrieves a creative including its brief, assets, and approval status. If rejected, `rejection_reason` explains why.
Parameters
campaignIdstringrequiredcreativeIdstringrequiredReturns
curl https://sdk.tap.co/v1/campaigns/:campaignId/creatives/:creativeId \ -H "Authorization: Bearer tap_live_xxx" { "id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "campaign_id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "type": "display", "status": "pending", "brief": { "headline": "string", "body_copy": "string", "call_to_action": "string", "tone": "string", "target_audience": "string", "key_messages": [ "string" ] }, "assets": [ { "id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "name": "string", "type": "image", "url": "https://example.com", "size_bytes": 0, "dimensions": { "width": 0, "height": 0 }, "duration_seconds": 0, "mime_type": "string", "created_at": "2026-01-15T10:30:00Z" } ], "rejection_reason": "string", "created_at": "2026-01-15T10:30:00Z", "updated_at": "2026-01-15T10:30:00Z"}Update creative
Updates a creative's brief or assets. Updating an approved creative resets its status to `pending` for re-review.
Parameters
campaignIdstringrequiredcreativeIdstringrequiredBody parameters
briefCreativeBriefasset_idsstring[]Returns
curl -X PATCH https://sdk.tap.co/v1/campaigns/:campaignId/creatives/:creativeId \ -H "Authorization: Bearer tap_live_xxx" \ -H "Content-Type: application/json" \ -d '{ "brief": { "headline": "string", "body_copy": "string", "call_to_action": "string", "tone": "string", "target_audience": "string", "key_messages": [ "string" ] }, "asset_ids": [ "plan_8f2a9c4b1d3e5f6a7b8c9d0e" ] }' { "id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "campaign_id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "type": "display", "status": "pending", "brief": { "headline": "string", "body_copy": "string", "call_to_action": "string", "tone": "string", "target_audience": "string", "key_messages": [ "string" ] }, "assets": [ { "id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "name": "string", "type": "image", "url": "https://example.com", "size_bytes": 0, "dimensions": { "width": 0, "height": 0 }, "duration_seconds": 0, "mime_type": "string", "created_at": "2026-01-15T10:30:00Z" } ], "rejection_reason": "string", "created_at": "2026-01-15T10:30:00Z", "updated_at": "2026-01-15T10:30:00Z"}Remove creative
Removes a creative from a campaign. The underlying assets remain in your asset library. Cannot remove creatives from active campaigns.
Parameters
campaignIdstringrequiredcreativeIdstringrequiredReturns
curl -X DELETE https://sdk.tap.co/v1/campaigns/:campaignId/creatives/:creativeId \ -H "Authorization: Bearer tap_live_xxx" AI-generate creative
Generates creative assets using AI. Returns a `job_id` to poll for completion. Supports display, audio, and video formats. Pass `platform_id` to match platform specifications automatically.
Body parameters
typestringrequired"display", "video", "audio"briefCreativeBriefrequiredplatform_idstringPlatform to generate creative for (uses platform specs)
variationsintegerReturns
curl -X POST https://sdk.tap.co/v1/creatives/generate \ -H "Authorization: Bearer tap_live_xxx" \ -H "Content-Type: application/json" \ -d '{ "type": "display", "brief": { "headline": "string", "body_copy": "string", "call_to_action": "string", "tone": "string", "target_audience": "string", "key_messages": [ "string" ] }, "platform_id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "variations": 1 }' { "job_id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "status": "pending", "estimated_completion": "2026-01-15T10:30:00Z", "results": [ { "id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "name": "string", "type": "image", "url": "https://example.com", "size_bytes": 0, "dimensions": { "width": 0, "height": 0 }, "duration_seconds": 0, "mime_type": "string", "created_at": "2026-01-15T10:30:00Z" } ]}Validate creative
Validates an asset against a platform's specifications. Returns `valid` boolean with `errors` and `warnings` arrays.
Body parameters
asset_idstringrequiredplatform_idstringrequiredReturns
curl -X POST https://sdk.tap.co/v1/creatives/validate \ -H "Authorization: Bearer tap_live_xxx" \ -H "Content-Type: application/json" \ -d '{ "asset_id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "platform_id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e" }' { "valid": false, "errors": [ { "code": "string", "message": "string", "field": "string" } ], "warnings": [ { "code": "string", "message": "string" } ]}List assets
Returns a paginated list of assets in your library. Filter by `type` (image, video, audio).
Parameters
limitintegerMaximum number of items to return
cursorstringCursor for pagination (from previous response)
typestring"image", "video", "audio"Returns
curl https://sdk.tap.co/v1/assets \ -H "Authorization: Bearer tap_live_xxx" { "data": [ { "id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "name": "string", "type": "image", "url": "https://example.com", "size_bytes": 0, "dimensions": { "width": 0, "height": 0 }, "duration_seconds": 0, "mime_type": "string", "created_at": "2026-01-15T10:30:00Z" } ], "meta": { "has_more": false, "next_cursor": "string" }}Upload asset
Uploads a media file to your asset library. Supports images (max 10MB), audio (max 50MB), and video (max 500MB). Returns the asset with its ID and URL.
Body parameters
filestringrequiredThe file to upload
namestringOptional display name for the asset
Returns
curl -X POST https://sdk.tap.co/v1/assets \ -H "Authorization: Bearer tap_live_xxx" { "id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "name": "string", "type": "image", "url": "https://example.com", "size_bytes": 0, "dimensions": { "width": 0, "height": 0 }, "duration_seconds": 0, "mime_type": "string", "created_at": "2026-01-15T10:30:00Z"}Get asset details
Retrieves an asset's metadata including dimensions, duration, and a signed URL valid for 24 hours.
Parameters
assetIdstringrequiredReturns
curl https://sdk.tap.co/v1/assets/:assetId \ -H "Authorization: Bearer tap_live_xxx" { "id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "name": "string", "type": "image", "url": "https://example.com", "size_bytes": 0, "dimensions": { "width": 0, "height": 0 }, "duration_seconds": 0, "mime_type": "string", "created_at": "2026-01-15T10:30:00Z"}Delete asset
Permanently deletes an asset. Assets attached to active campaigns cannot be deleted.
Parameters
assetIdstringrequiredReturns
curl -X DELETE https://sdk.tap.co/v1/assets/:assetId \ -H "Authorization: Bearer tap_live_xxx" List payment methods
Returns all payment methods on file. Use the `id` when activating campaigns.
Returns
curl https://sdk.tap.co/v1/payment-methods \ -H "Authorization: Bearer tap_live_xxx" { "data": [ { "id": "string", "type": "card", "is_default": false, "card": { "brand": "string", "last4": "string", "exp_month": 0, "exp_year": 0 }, "bank_account": { "bank_name": "string", "last4": "string" }, "created_at": "2026-01-15T10:30:00Z" } ]}List invoices
Returns a paginated list of invoices. Includes both paid and outstanding invoices.
Parameters
limitintegerMaximum number of items to return
cursorstringCursor for pagination (from previous response)
Returns
curl https://sdk.tap.co/v1/invoices \ -H "Authorization: Bearer tap_live_xxx" { "data": [ { "id": "string", "number": "string", "status": "draft", "amount_cents": 0, "currency": "string", "campaign_id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "campaign_name": "string", "due_date": "2026-01-15", "paid_at": "2026-01-15T10:30:00Z", "created_at": "2026-01-15T10:30:00Z" } ], "meta": { "has_more": false, "next_cursor": "string" }}Get invoice details
Retrieves an invoice including amount, status, due date, and associated campaign.
Parameters
invoiceIdstringrequiredReturns
curl https://sdk.tap.co/v1/invoices/:invoiceId \ -H "Authorization: Bearer tap_live_xxx" { "id": "string", "number": "string", "status": "draft", "amount_cents": 0, "currency": "string", "campaign_id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "campaign_name": "string", "due_date": "2026-01-15", "paid_at": "2026-01-15T10:30:00Z", "created_at": "2026-01-15T10:30:00Z"}Download invoice PDF
Downloads a PDF of the invoice with itemized charges. Returns `application/pdf` content.
Parameters
invoiceIdstringrequiredReturns
curl https://sdk.tap.co/v1/invoices/:invoiceId/pdf \ -H "Authorization: Bearer tap_live_xxx" Get account balance
Returns your account balance including `available_cents` and `pending_cents`. Available balance is applied to new charges automatically.
Returns
curl https://sdk.tap.co/v1/balance \ -H "Authorization: Bearer tap_live_xxx" { "available_cents": 0, "pending_cents": 0, "currency": "string"}List transactions
Returns a paginated list of transactions including charges, refunds, and credits.
Parameters
limitintegerMaximum number of items to return
cursorstringCursor for pagination (from previous response)
Returns
curl https://sdk.tap.co/v1/transactions \ -H "Authorization: Bearer tap_live_xxx" { "data": [ { "id": "string", "type": "charge", "amount_cents": 0, "currency": "string", "description": "string", "campaign_id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "created_at": "2026-01-15T10:30:00Z" } ], "meta": { "has_more": false, "next_cursor": "string" }}List webhooks
Returns all webhook endpoints configured for your account.
Returns
curl https://sdk.tap.co/v1/webhooks \ -H "Authorization: Bearer tap_live_xxx" { "data": [ { "id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "url": "https://example.com", "events": [ "string" ], "secret": "string", "is_active": false, "created_at": "2026-01-15T10:30:00Z", "last_triggered_at": "2026-01-15T10:30:00Z" } ]}Create webhook
Registers a webhook endpoint. The response includes a `secret` for verifying payloads via the `X-Tap-Signature` header. The secret is only shown once.
Body parameters
urlstringrequiredeventsstring[]requiredReturns
curl -X POST https://sdk.tap.co/v1/webhooks \ -H "Authorization: Bearer tap_live_xxx" \ -H "Content-Type: application/json" \ -d '{ "url": "https://example.com", "events": [ "campaign.created" ] }' { "id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "url": "https://example.com", "events": [ "string" ], "secret": "string", "is_active": false, "created_at": "2026-01-15T10:30:00Z", "last_triggered_at": "2026-01-15T10:30:00Z"}Get webhook details
Retrieves a webhook's configuration, subscribed events, and `is_active` status.
Parameters
webhookIdstringrequiredReturns
curl https://sdk.tap.co/v1/webhooks/:webhookId \ -H "Authorization: Bearer tap_live_xxx" { "id": "plan_8f2a9c4b1d3e5f6a7b8c9d0e", "url": "https://example.com", "events": [ "string" ], "secret": "string", "is_active": false, "created_at": "2026-01-15T10:30:00Z", "last_triggered_at": "2026-01-15T10:30:00Z"}Delete webhook
Permanently removes a webhook. Pending retry events are discarded.
Parameters
webhookIdstringrequiredReturns
curl -X DELETE https://sdk.tap.co/v1/webhooks/:webhookId \ -H "Authorization: Bearer tap_live_xxx" Test webhook
Sends a test event to your webhook endpoint. Returns `success`, `response_status`, and `response_time_ms`.
Parameters
webhookIdstringrequiredReturns
curl -X POST https://sdk.tap.co/v1/webhooks/:webhookId/test \ -H "Authorization: Bearer tap_live_xxx" { "success": false, "response_status": 0, "response_time_ms": 0}