openapi: 3.1.0 info: title: Outbrain Amplify API description: > The Outbrain Amplify API enables advertisers, agencies, and technology partners to integrate Amplify campaign management and reporting into their own tools and platforms. The API is organized around core entities: Marketer (a customer account), Campaign (a collection of promoted links), PromotedLink (a single piece of promoted content), Budget, AudienceTargeting, and PerformanceBy* analytics resources for retrieving performance metrics. version: '0.1' contact: name: Outbrain Developer Center url: https://developer.outbrain.com license: name: Outbrain Amplify API Terms and Conditions url: https://www.outbrain.com/legal/ servers: - url: https://api.outbrain.com/amplify/v0.1 description: Production Server security: - OBTokenAuth: [] tags: - name: Authentication description: Token-based authentication - name: Marketers description: Marketer (customer account) resources - name: Campaigns description: Campaign management - name: PromotedLinks description: Promoted link (ad creative) management - name: Budgets description: Budget management - name: Targeting description: Audience and contextual targeting - name: Reporting description: Performance reporting paths: /login: get: summary: Authenticate And Retrieve Token description: > Authenticate using HTTP Basic auth (Base64 of username:password) and receive an OB-TOKEN-V1 token to be sent in the OB-TOKEN-V1 header on subsequent requests. Rate limited to 2 requests per hour per user. operationId: login tags: - Authentication security: - BasicAuth: [] responses: '200': description: Successful authentication. content: application/json: schema: $ref: '#/components/schemas/LoginResponse' '401': description: Invalid credentials. /marketers: get: summary: List Marketers For The Authenticated User description: Retrieve all marketers (customer accounts) accessible to the authenticated user. operationId: listMarketers tags: - Marketers responses: '200': description: A list of marketers. content: application/json: schema: $ref: '#/components/schemas/MarketerList' /marketers/{marketerId}: get: summary: Get A Marketer By Id description: Retrieve a single marketer by its identifier. operationId: getMarketer tags: - Marketers parameters: - $ref: '#/components/parameters/MarketerIdPath' responses: '200': description: A marketer resource. content: application/json: schema: $ref: '#/components/schemas/Marketer' /marketers/{marketerId}/campaigns: get: summary: List Campaigns For A Marketer description: Retrieve all campaigns belonging to a specific marketer. operationId: listCampaignsByMarketer tags: - Campaigns parameters: - $ref: '#/components/parameters/MarketerIdPath' responses: '200': description: A list of campaigns. content: application/json: schema: $ref: '#/components/schemas/CampaignList' post: summary: Create A Campaign For A Marketer description: Create a new campaign under the specified marketer. operationId: createCampaign tags: - Campaigns parameters: - $ref: '#/components/parameters/MarketerIdPath' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CampaignRequest' responses: '201': description: Campaign created. content: application/json: schema: $ref: '#/components/schemas/Campaign' /campaigns/{campaignId}: get: summary: Get A Campaign By Id description: Retrieve a single campaign by its identifier. operationId: getCampaign tags: - Campaigns parameters: - $ref: '#/components/parameters/CampaignIdPath' responses: '200': description: A campaign resource. content: application/json: schema: $ref: '#/components/schemas/Campaign' put: summary: Update A Campaign description: Update an existing campaign's settings. operationId: updateCampaign tags: - Campaigns parameters: - $ref: '#/components/parameters/CampaignIdPath' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CampaignRequest' responses: '200': description: Campaign updated. content: application/json: schema: $ref: '#/components/schemas/Campaign' /campaigns/{campaignId}/promotedLinks: get: summary: List Promoted Links For A Campaign description: Retrieve all promoted links (ad creatives) in a campaign. operationId: listPromotedLinks tags: - PromotedLinks parameters: - $ref: '#/components/parameters/CampaignIdPath' responses: '200': description: A list of promoted links. content: application/json: schema: $ref: '#/components/schemas/PromotedLinkList' post: summary: Create A Promoted Link description: Create a new promoted link inside a campaign. operationId: createPromotedLink tags: - PromotedLinks parameters: - $ref: '#/components/parameters/CampaignIdPath' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PromotedLinkRequest' responses: '201': description: Promoted link created. content: application/json: schema: $ref: '#/components/schemas/PromotedLink' /promotedLinks/{promotedLinkId}: get: summary: Get A Promoted Link By Id description: Retrieve a single promoted link by its identifier. operationId: getPromotedLink tags: - PromotedLinks parameters: - $ref: '#/components/parameters/PromotedLinkIdPath' responses: '200': description: A promoted link resource. content: application/json: schema: $ref: '#/components/schemas/PromotedLink' put: summary: Update A Promoted Link description: Update an existing promoted link. operationId: updatePromotedLink tags: - PromotedLinks parameters: - $ref: '#/components/parameters/PromotedLinkIdPath' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PromotedLinkRequest' responses: '200': description: Promoted link updated. /marketers/{marketerId}/budgets: get: summary: List Budgets For A Marketer description: Retrieve all budgets belonging to a marketer. operationId: listBudgets tags: - Budgets parameters: - $ref: '#/components/parameters/MarketerIdPath' responses: '200': description: A list of budgets. content: application/json: schema: $ref: '#/components/schemas/BudgetList' post: summary: Create A Budget description: Create a new shared budget for the marketer. operationId: createBudget tags: - Budgets parameters: - $ref: '#/components/parameters/MarketerIdPath' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BudgetRequest' responses: '201': description: Budget created. /budgets/{budgetId}: get: summary: Get A Budget By Id description: Retrieve a single budget by its identifier. operationId: getBudget tags: - Budgets parameters: - $ref: '#/components/parameters/BudgetIdPath' responses: '200': description: A budget resource. content: application/json: schema: $ref: '#/components/schemas/Budget' /campaigns/{campaignId}/targeting/audience: get: summary: Get Audience Targeting For A Campaign description: Retrieve audience targeting (segments, geo, devices, OS, browsers) for a campaign. operationId: getAudienceTargeting tags: - Targeting parameters: - $ref: '#/components/parameters/CampaignIdPath' responses: '200': description: Audience targeting object. content: application/json: schema: $ref: '#/components/schemas/AudienceTargeting' put: summary: Update Audience Targeting For A Campaign description: Update the audience targeting configuration for a campaign. operationId: updateAudienceTargeting tags: - Targeting parameters: - $ref: '#/components/parameters/CampaignIdPath' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AudienceTargeting' responses: '200': description: Audience targeting updated. /reports/marketers/{marketerId}/campaigns: get: summary: Performance Report By Campaign description: > Retrieve performance metrics (impressions, clicks, spend, conversions, CPA, CTR) aggregated by campaign for the given marketer and date range. Limited to 10 requests per minute per marketer. operationId: reportPerformanceByCampaign tags: - Reporting parameters: - $ref: '#/components/parameters/MarketerIdPath' - $ref: '#/components/parameters/FromDateQuery' - $ref: '#/components/parameters/ToDateQuery' - $ref: '#/components/parameters/BreakdownQuery' responses: '200': description: Performance report. content: application/json: schema: $ref: '#/components/schemas/PerformanceReport' /reports/marketers/{marketerId}/periodicContent: get: summary: Performance Report By Periodic Content description: Retrieve performance by promoted link over a period. operationId: reportPerformanceByPeriodicContent tags: - Reporting parameters: - $ref: '#/components/parameters/MarketerIdPath' - $ref: '#/components/parameters/FromDateQuery' - $ref: '#/components/parameters/ToDateQuery' responses: '200': description: Performance report. content: application/json: schema: $ref: '#/components/schemas/PerformanceReport' /reports/marketers/{marketerId}/realtime: get: summary: Real Time Performance Report description: > Retrieve real-time performance metrics for a marketer. Limited to 50 requests per minute per marketer. operationId: reportPerformanceRealtime tags: - Reporting parameters: - $ref: '#/components/parameters/MarketerIdPath' responses: '200': description: Real-time performance report. content: application/json: schema: $ref: '#/components/schemas/PerformanceReport' components: securitySchemes: OBTokenAuth: type: apiKey in: header name: OB-TOKEN-V1 description: Token returned from /login. Send on all authenticated requests. BasicAuth: type: http scheme: basic parameters: MarketerIdPath: name: marketerId in: path required: true schema: type: string description: Marketer (customer account) identifier. CampaignIdPath: name: campaignId in: path required: true schema: type: string description: Campaign identifier. PromotedLinkIdPath: name: promotedLinkId in: path required: true schema: type: string BudgetIdPath: name: budgetId in: path required: true schema: type: string FromDateQuery: name: from in: query required: true schema: type: string format: date description: Start date of the report range (YYYY-MM-DD). ToDateQuery: name: to in: query required: true schema: type: string format: date description: End date of the report range (YYYY-MM-DD). BreakdownQuery: name: breakdown in: query required: false schema: type: string enum: [day, week, month, campaign, country, platform] description: Breakdown dimension for the report. schemas: LoginResponse: type: object properties: OB-TOKEN-V1: type: string description: Bearer token to be sent on all subsequent requests. Marketer: type: object properties: id: type: string name: type: string currency: type: string enabled: type: boolean creationTime: type: string format: date-time MarketerList: type: object properties: count: type: integer marketers: type: array items: $ref: '#/components/schemas/Marketer' Campaign: type: object properties: id: type: string name: type: string marketerId: type: string enabled: type: boolean budgetId: type: string cpc: type: number targeting: $ref: '#/components/schemas/AudienceTargeting' startDate: type: string format: date endDate: type: string format: date objective: type: string enum: [traffic, awareness, conversions, leadGeneration] CampaignRequest: type: object required: [name, cpc] properties: name: type: string enabled: type: boolean budgetId: type: string cpc: type: number objective: type: string CampaignList: type: object properties: count: type: integer campaigns: type: array items: $ref: '#/components/schemas/Campaign' PromotedLink: type: object properties: id: type: string campaignId: type: string text: type: string url: type: string format: uri cachedImageUrl: type: string format: uri enabled: type: boolean status: type: string enum: [pending, approved, rejected] PromotedLinkRequest: type: object required: [text, url] properties: text: type: string url: type: string format: uri imageUrl: type: string format: uri enabled: type: boolean PromotedLinkList: type: object properties: count: type: integer promotedLinks: type: array items: $ref: '#/components/schemas/PromotedLink' Budget: type: object properties: id: type: string marketerId: type: string name: type: string amount: type: number currency: type: string type: type: string enum: [daily, monthly, total] startDate: type: string format: date endDate: type: string format: date BudgetRequest: type: object required: [name, amount, type] properties: name: type: string amount: type: number currency: type: string type: type: string startDate: type: string format: date endDate: type: string format: date BudgetList: type: object properties: count: type: integer budgets: type: array items: $ref: '#/components/schemas/Budget' AudienceTargeting: type: object properties: geoTargeting: type: array items: type: string description: ISO country codes. platformTargeting: type: array items: type: string enum: [DESKTOP, TABLET, SMARTPHONE] operatingSystems: type: array items: type: string browsers: type: array items: type: string interestSegments: type: array items: type: string PerformanceReport: type: object properties: marketerId: type: string from: type: string format: date to: type: string format: date results: type: array items: type: object properties: key: type: string impressions: type: integer clicks: type: integer spend: type: number conversions: type: integer ctr: type: number cpc: type: number cpa: type: number