beehiiv subpackage_advertisement_opportunities API

The subpackage_advertisement_opportunities API from beehiiv — 1 operation(s) for subpackage_advertisement_opportunities.

Documentation

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

beehiiv-subpackage-advertisement-opportunities-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: API Reference subpackage_advertisement_opportunities API
  version: 1.0.0
servers:
- url: https://api.beehiiv.com/v2
tags:
- name: subpackage_advertisement_opportunities
paths:
  /publications/{publicationId}/advertisement_opportunities:
    get:
      operationId: index
      summary: 'Get advertisement opportunities <Badge intent="info" minimal outlined>OAuth Scope: posts:read</Badge>'
      description: Retrieve a list of accepted advertisement opportunities for the publication.
      tags:
      - subpackage_advertisement_opportunities
      parameters:
      - name: publicationId
        in: path
        description: The prefixed ID of the publication object
        required: true
        schema:
          $ref: '#/components/schemas/type_ids:PublicationId'
      - name: Authorization
        in: header
        description: Bearer authentication
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_advertisement_opportunities:AdvertisementOpportunitiesGetResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_:Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_:Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_:Error'
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_:Error'
        '429':
          description: Rate Limit Exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_:Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_:Error'
components:
  schemas:
    type_ids:PublicationId:
      type: string
      description: The prefixed ID of the publication.
      title: PublicationId
    type_:Error:
      type: object
      properties:
        status:
          type: integer
        statusText:
          type: string
        errors:
          type: array
          items:
            $ref: '#/components/schemas/type_:ErrorDetail'
      required:
      - status
      - statusText
      - errors
      description: The top level error response.
      title: Error
    type_:ErrorDetail:
      type: object
      properties:
        message:
          type: string
        code:
          type: string
      required:
      - message
      - code
      title: ErrorDetail
    type_advertisement_opportunities:AdvertisementOpportunitiesGetResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/type_advertisement_opportunities:AdvertisementOpportunity'
          description: A list of post templates available for this publication.
        total_results:
          type: integer
          description: The total number of results from all pages.
      required:
      - data
      - total_results
      title: AdvertisementOpportunitiesGetResponse
    type_advertisement_opportunities:AdvertisementOpportunity:
      type: object
      properties:
        id:
          type: string
          description: The ID of the opportunity.
        advertiser_name:
          type: string
          description: The name of the advertiser.
        payout_rate:
          type: string
          description: The amount you'll earn.
        advertisement_kind:
          type: string
          description: What kind of an ad it is. With or without logo.
        send_by_window_start_at:
          type: integer
          description: The earliest this ad can be sent. Measured in seconds since the Unix epoch.
        send_by_window_end_at:
          type: integer
          description: When this ad needs to be sent by. Measured in seconds since the Unix epoch.
      required:
      - id
      - advertiser_name
      - payout_rate
      - advertisement_kind
      - send_by_window_start_at
      - send_by_window_end_at
      title: AdvertisementOpportunity
  securitySchemes:
    BearerAuthScheme:
      type: http
      scheme: bearer