openapi: 3.2.0 info: title: NewsBreak Advertising Campaign API version: v1 description: 'The NewsBreak Advertising API (NewsBreak API for Business) lets technology companies, direct advertisers and agencies programmatically manage the NewsBreak Ads Manager at scale: create and manage organizations, ad accounts and ad-account users; build campaigns, ad sets and ads; upload creative assets to the NewsBreak CDN; configure audience targeting and inventory platforms; manage account spending caps; read conversion tracking events; and run multidimensional performance reports. This document was generated by API Evangelist from the operations NewsBreak publishes in its Ad Manager API reference (https://advertising-api.newsbreak.com/hc/en-us). NewsBreak does not publish a machine-readable OpenAPI definition; every path, method, parameter, enumeration and response field here is transcribed from the published reference articles, which are linked per operation via externalDocs.' termsOfService: https://www.newsbreak.com/terms contact: name: NewsBreak Ad Support email: adsupport@newsbreak.com url: https://advertising-api.newsbreak.com/hc/en-us servers: - url: https://business.newsbreak.com/business-api/v1 description: NewsBreak Advertising API production security: - AccessToken: [] tags: - name: Campaign description: 'Campaigns: the objective-level container for ad sets.' paths: /campaign/create: post: operationId: createCampaign tags: - Campaign summary: Create a campaign description: Create a campaign under an ad account. externalDocs: description: 'NewsBreak reference: Create a Campaign' url: https://advertising-api.newsbreak.com/hc/en-us/articles/37869159614477-Create-a-Campaign requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateCampaignRequest' responses: '200': description: 'Successful response. Check `code` in the body: 0 is success, any other value is an error (see Return Codes).' content: application/json: schema: $ref: '#/components/schemas/CampaignResponse' '400': description: Validation error. content: application/json: schema: $ref: '#/components/schemas/Envelope' '403': description: Permission denied, not logged in, invalid access token, or rate limit exceeded (return codes 403 / 4031 / 4033 / 4034). content: application/json: schema: $ref: '#/components/schemas/Envelope' /campaign/getList: get: operationId: getCampaigns tags: - Campaign summary: Get campaigns description: Get all campaigns for an ad account. Optionally filter to return only certain campaigns. externalDocs: description: 'NewsBreak reference: Get Campaigns' url: https://advertising-api.newsbreak.com/hc/en-us/articles/37869190998925-Get-Campaigns parameters: - name: adAccountId in: query required: true description: ID of ad account. schema: type: string - name: search in: query required: false description: Query to search. schema: type: string - name: onlineStatus in: query required: false description: Campaign status filter. schema: type: array items: type: string enum: - WARNING - INACTIVE - ACTIVE - DELETED - name: pageNo in: query required: true description: Page number. schema: type: integer - name: pageSize in: query required: true description: Page size. schema: type: integer enum: - 5 - 10 - 20 - 50 - 100 - 200 - 500 responses: '200': description: 'Successful response. Check `code` in the body: 0 is success, any other value is an error (see Return Codes).' content: application/json: schema: $ref: '#/components/schemas/CampaignPageResponse' '400': description: Validation error. content: application/json: schema: $ref: '#/components/schemas/Envelope' '403': description: Permission denied, not logged in, invalid access token, or rate limit exceeded (return codes 403 / 4031 / 4033 / 4034). content: application/json: schema: $ref: '#/components/schemas/Envelope' /campaign/update/{campaignId}: put: operationId: updateCampaign tags: - Campaign summary: Update a campaign description: Update a campaign. externalDocs: description: 'NewsBreak reference: Update a Campaign' url: https://advertising-api.newsbreak.com/hc/en-us/articles/37869170482061-Update-a-Campaign parameters: - name: campaignId in: path required: true description: ID of the campaign to update. schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdateCampaignRequest' responses: '200': description: 'Successful response. Check `code` in the body: 0 is success, any other value is an error (see Return Codes).' content: application/json: schema: $ref: '#/components/schemas/CampaignResponse' '400': description: Validation error. content: application/json: schema: $ref: '#/components/schemas/Envelope' '403': description: Permission denied, not logged in, invalid access token, or rate limit exceeded (return codes 403 / 4031 / 4033 / 4034). content: application/json: schema: $ref: '#/components/schemas/Envelope' /campaign/updateStatus/{campaignId}: put: operationId: updateCampaignStatus tags: - Campaign summary: Update campaign status (ON/OFF) description: Enable or disable a campaign. externalDocs: description: 'NewsBreak reference: Update Campaign Status (ON/OFF)' url: https://advertising-api.newsbreak.com/hc/en-us/articles/37869222017549-Update-Campaign-Status-ON-OFF parameters: - name: campaignId in: path required: true description: ID of the campaign to update. schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/StatusRequest' responses: '200': description: 'Successful response. Check `code` in the body: 0 is success, any other value is an error (see Return Codes).' content: application/json: schema: $ref: '#/components/schemas/CampaignResponse' '400': description: Validation error. content: application/json: schema: $ref: '#/components/schemas/Envelope' '403': description: Permission denied, not logged in, invalid access token, or rate limit exceeded (return codes 403 / 4031 / 4033 / 4034). content: application/json: schema: $ref: '#/components/schemas/Envelope' /campaign/delete/{campaignId}: delete: operationId: deleteCampaign tags: - Campaign summary: Delete a campaign description: Delete a campaign. The returned campaign has onlineStatus DELETED. externalDocs: description: 'NewsBreak reference: Delete a Campaign' url: https://advertising-api.newsbreak.com/hc/en-us/articles/37869167992077-Delete-a-Campaign parameters: - name: campaignId in: path required: true description: ID of the campaign to delete. schema: type: string responses: '200': description: 'Successful response. Check `code` in the body: 0 is success, any other value is an error (see Return Codes).' content: application/json: schema: $ref: '#/components/schemas/CampaignResponse' '400': description: Validation error. content: application/json: schema: $ref: '#/components/schemas/Envelope' '403': description: Permission denied, not logged in, invalid access token, or rate limit exceeded (return codes 403 / 4031 / 4033 / 4034). content: application/json: schema: $ref: '#/components/schemas/Envelope' components: schemas: StatusRequest: type: object description: Toggle the ON/OFF status of a campaign, ad set or ad. properties: status: type: string description: Target status. enum: - 'ON' - 'OFF' required: - status CampaignPageResponse: type: object description: Envelope carrying a page of campaigns. properties: code: type: integer description: Status code. 0 is successful; see Return Codes. errMsg: type: string description: Error message when code != 0. data: type: object properties: pageNo: type: integer description: Number of current page. pageSize: type: integer description: Size of current page. total: type: integer description: Total size for this search. hasNext: type: boolean description: Whether there is a next page. rows: type: array items: $ref: '#/components/schemas/Campaign' CreateCampaignRequest: type: object properties: adAccountId: type: string description: ID of ad account. name: type: string description: Descriptive name of campaign. objective: type: string description: Campaign objective. enum: - WEB_CONVERSION - APP_CONVERSION - REACH - WEB_TRAFFIC - APP_TRAFFIC status: type: string description: Status of the campaign. Default is ON. enum: - 'ON' - 'OFF' required: - adAccountId - name - objective UpdateCampaignRequest: type: object properties: name: type: string description: Descriptive name of campaign. required: - name Campaign: type: object description: A NewsBreak advertising campaign. properties: id: type: string description: Campaign ID. name: type: string description: Campaign name. orgId: type: string description: Organization ID. adAccountId: type: string description: Ad account ID. objective: type: string description: Objective of the campaign. enum: - WEB_CONVERSION - APP_CONVERSION - REACH - WEB_TRAFFIC - APP_TRAFFIC budget: type: integer description: Campaign budget in cents. onlineStatus: type: string description: Online status of the campaign. enum: - WARNING - INACTIVE - ACTIVE - DELETED status: type: string description: Campaign status. enum: - 'ON' - 'OFF' createTime: type: string description: Create time of the campaign (unix timestamp as string). updateTime: type: string description: Update time of the campaign (unix timestamp as string). CampaignResponse: type: object description: Envelope carrying a single campaign. properties: code: type: integer description: Status code. 0 is successful; see Return Codes. errMsg: type: string description: Error message when code != 0. data: $ref: '#/components/schemas/Campaign' Envelope: type: object description: The standard NewsBreak response envelope. Every operation returns HTTP 200 with a `code` field; code 0 means success and any other value is an error (see Return Codes). properties: code: type: integer description: Status code. 0 is successful; see Return Codes. errMsg: type: string description: Error message when code != 0. data: type: object description: Response object. securitySchemes: AccessToken: type: apiKey in: header name: Access-Token description: Authorized access token. Generate it in the NewsBreak Ad Manager under Resources -> API Access Tokens ("Generate Token"). The token carries the permissions granted by the advertiser. Keep it secret. externalDocs: description: NewsBreak Ad Manager API reference url: https://advertising-api.newsbreak.com/hc/en-us