openapi: 3.0.3
info:
  title: Everflow Affiliate API - Channels
  description: >
    Channel endpoints for the Everflow Affiliate API. These endpoints allow
    affiliates to retrieve their configured traffic channels.
  version: 1.0.0
servers:
  - description: Production Server
    url: https://api.eflow.team/v1
tags:
  - name: Affiliate Channels
    description: Endpoints for retrieving traffic channels as an affiliate.
paths:
  /affiliates/channels:
    get:
      summary: List Channels
      tags:
        - Affiliate Channels
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                type: object
                properties:
                  channels:
                    type: array
                    description: Array of traffic channels.
                    items:
                      type: object
                      properties:
                        network_channel_id:
                          type: integer
                          description: Unique identifier for the channel.
                        network_id:
                          type: integer
                          description: Network ID.
                        name:
                          type: string
                          description: Display name of the channel.
                        status:
                          type: string
                          description: Current status of the channel.
                        time_created:
                          type: integer
                          example: 1734455015
                          description: Unix timestamp when the channel was created.
                        time_saved:
                          type: integer
                          example: 1734455015
                          description: Unix timestamp when the channel was last updated.
      security:
        - API Key: []

components:
  securitySchemes:
    API Key:
      description: >
        The affiliate's API key generated from the Affiliate Portal.
        Uses the X-Eflow-Api-Key header.
      in: header
      name: X-Eflow-Api-Key
      type: apiKey
