Twitch Goals API

Retrieve creator goals

Documentation

Specifications

Other Resources

OpenAPI Specification

twitch-goals-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Twitch Drops Ads Goals 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: Goals
  description: Retrieve creator goals
paths:
  /goals:
    get:
      operationId: getCreatorGoals
      summary: Twitch Get Creator Goals
      description: Gets the broadcaster's list of active goals.
      tags:
      - Goals
      parameters:
      - $ref: '#/components/parameters/clientId'
      - name: broadcaster_id
        in: query
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Creator goals returned successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/CreatorGoal'
components:
  schemas:
    CreatorGoal:
      type: object
      properties:
        id:
          type: string
        broadcaster_id:
          type: string
        broadcaster_name:
          type: string
        broadcaster_login:
          type: string
        type:
          type: string
          enum:
          - follower
          - subscription
          - subscription_count
          - new_subscription
          - new_subscription_count
        description:
          type: string
        current_amount:
          type: integer
        target_amount:
          type: integer
        created_at:
          type: string
          format: date-time
  parameters:
    clientId:
      name: Client-Id
      in: header
      required: true
      schema:
        type: string
      description: Your registered application's client ID
  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/