Twitch Hype Train API

Retrieve Hype Train events

Documentation

Specifications

Other Resources

OpenAPI Specification

twitch-hype-train-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Twitch Drops Ads Hype Train API
  description: APIs for game developers to create and manage Drops campaigns that grant in-game rewards to Twitch viewers watching streamers play their game. Drops campaigns are managed through the Twitch Developer Console and fulfilled via the Helix API entitlements endpoints.
  version: '1.0'
  contact:
    name: Twitch Developer Support
    url: https://dev.twitch.tv/support/
  termsOfService: https://www.twitch.tv/p/legal/terms-of-service/
servers:
- url: https://api.twitch.tv/helix
  description: Twitch Helix API Production
security:
- oauth2: []
tags:
- name: Hype Train
  description: Retrieve Hype Train events
paths:
  /hypetrain/events:
    get:
      operationId: getHypeTrainEvents
      summary: Twitch Get Hype Train Events
      description: Gets the information of the most recent Hype Train of the specified broadcaster.
      tags:
      - Hype Train
      parameters:
      - $ref: '#/components/parameters/clientId'
      - name: broadcaster_id
        in: query
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/first'
      - $ref: '#/components/parameters/after'
      responses:
        '200':
          description: Hype Train events returned successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/HypeTrainEvent'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
components:
  parameters:
    after:
      name: after
      in: query
      schema:
        type: string
      description: Cursor for forward pagination
    first:
      name: first
      in: query
      schema:
        type: integer
        default: 20
        maximum: 100
      description: Maximum number of items to return
    clientId:
      name: Client-Id
      in: header
      required: true
      schema:
        type: string
      description: Your registered application's client ID
  schemas:
    Pagination:
      type: object
      properties:
        cursor:
          type: string
          description: Cursor value for pagination
    HypeTrainEvent:
      type: object
      properties:
        id:
          type: string
        event_type:
          type: string
        event_timestamp:
          type: string
          format: date-time
        version:
          type: string
        event_data:
          type: object
          properties:
            broadcaster_id:
              type: string
            cooldown_end_time:
              type: string
              format: date-time
            expires_at:
              type: string
              format: date-time
            goal:
              type: integer
            id:
              type: string
            last_contribution:
              type: object
              properties:
                total:
                  type: integer
                type:
                  type: string
                user:
                  type: string
            level:
              type: integer
            started_at:
              type: string
              format: date-time
            top_contributions:
              type: array
              items:
                type: object
                properties:
                  total:
                    type: integer
                  type:
                    type: string
                  user:
                    type: string
            total:
              type: integer
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://id.twitch.tv/oauth2/token
          scopes: {}
externalDocs:
  description: Twitch Drops Documentation
  url: https://dev.twitch.tv/docs/drops/