Create Campaign
Creates one campaign for each flight in the request.
const url = 'https://backend.podscribe.ai/api/public/campaign';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","publisher":"example","advertiser":"example","type":"Baked-in","flights":[{"startDate":"2026-04-15T12:00:00Z","endDate":"2026-04-15T12:00:00Z","expectedDate":"2026-04-15T12:00:00Z","totalCost":1,"cpm":1,"currency":"USD","expectedImpressions":1}],"externalId":"example","itunesOrYtId":"example","geo":"GLOBAL","expectedUnits":[{"position":"pre","length":1}],"promo":"example","expectedLandingUrl":"https://example.com","product":"example","initiative":"example","expectedTalkingPoints":["example"],"disallowedTalkingPoints":["example"],"mediaType":"podcast","tags":["example"],"scriptUrl":"https://example.com","teamMembers":["example"],"creativeIds":["example"],"billToPublisher":false}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}import requests
url = "https://backend.podscribe.ai/api/public/campaign"
payload = { "name": "example", "publisher": "example", "advertiser": "example", "type": "Baked-in", "flights": [ { "startDate": "2026-04-15T12:00:00Z", "endDate": "2026-04-15T12:00:00Z", "expectedDate": "2026-04-15T12:00:00Z", "totalCost": 1, "cpm": 1, "currency": "USD", "expectedImpressions": 1 } ], "externalId": "example", "itunesOrYtId": "example", "geo": "GLOBAL", "expectedUnits": [ { "position": "pre", "length": 1 } ], "promo": "example", "expectedLandingUrl": "https://example.com", "product": "example", "initiative": "example", "expectedTalkingPoints": ["example"], "disallowedTalkingPoints": ["example"], "mediaType": "podcast", "tags": ["example"], "scriptUrl": "https://example.com", "teamMembers": ["example"], "creativeIds": ["example"], "billToPublisher": False}headers = { "Authorization": "Bearer <token>", "Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())curl --request POST \ --url https://backend.podscribe.ai/api/public/campaign \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "publisher": "example", "advertiser": "example", "type": "Baked-in", "flights": [ { "startDate": "2026-04-15T12:00:00Z", "endDate": "2026-04-15T12:00:00Z", "expectedDate": "2026-04-15T12:00:00Z", "totalCost": 1, "cpm": 1, "currency": "USD", "expectedImpressions": 1 } ], "externalId": "example", "itunesOrYtId": "example", "geo": "GLOBAL", "expectedUnits": [ { "position": "pre", "length": 1 } ], "promo": "example", "expectedLandingUrl": "https://example.com", "product": "example", "initiative": "example", "expectedTalkingPoints": [ "example" ], "disallowedTalkingPoints": [ "example" ], "mediaType": "podcast", "tags": [ "example" ], "scriptUrl": "https://example.com", "teamMembers": [ "example" ], "creativeIds": [ "example" ], "billToPublisher": false }'Request Bodyrequired
Section titled “Request Bodyrequired”Campaign name
Publisher name (lookup). Optional when itunesOrYtId is provided; then the publisher is inferred from the show.
Advertiser name
Campaign type. Instagram campaigns (mediaType instagram) take story, reel or feed; other media types take DAI or Baked-in.
Flights of the campaign
Array<{startDate,endDate,expectedDate,4 more}>
start of the campaign in ISO format for DAI campaigns
end of the campaign in ISO format for DAI campaigns
expected date in ISO format for Baked-in campaings
rate of the campaign
cpm rate of the campaign
Currency code (USD, EUR, GBP).
expected impressions of the campaign
External ID of the campaign
ITunes ID / YouTube Channel ID / YouTube Playlist ID
Country
Expected units of the campaign
Array<{position,length}>
Ad position
Ad length in seconds
The discount code
Expected landing URL of the campaign
Product metadata
Initiative metadata
Expected talking points
Disallowed talking points
Media type of the campaign
Tags
Script URL of the campaign
Team members metadata
creative IDs metadata
whether to bill publisher
Response Body
Section titled “Response Body”OK
The created campaigns, one per flight, in the order of flights.
ID of the campaign
External ID of the campaign
{ "campaigns": [ { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "externalId": "example" } ]}