StreamElements loyalties API

Endpoints to manage loyalty settings

OpenAPI Specification

streamelements-loyalties-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: SE API Docs activities loyalties API
  description: '## Custom Variable types

    `guid` - string that matches pattern: `/^[0-9a-fA-F]{24}$/` (24 character hexadecimal string)

    `datetime` - either timestamp in milliseconds (unix timestamp*1000) or string in ISO 8061 format

    ## Global variables

    `Authorization` - string:  JWT Token you can obtain here: https://streamelements.com/dashboard/account/channels (click "Show secrets")

    `channelId` - guid: obtained by requesting `/channels/me` endpoint with provided JWT token

    `channelName` - string: lowercase channel name

    `timezone` - integer: timezone index'
  contact: {}
  version: '1.0'
servers:
- url: https://api.streamelements.com/kappa/v2
  description: V2
  variables: {}
- url: https://api.streamelements.com/kappa/v3
  description: V3
  variables: {}
security:
- JWTBearer: []
- OAuth2: []
- ApiKeyBearer: []
tags:
- name: loyalties
  description: Endpoints to manage loyalty settings
paths:
  /loyalty/{channel}:
    get:
      tags:
      - loyalties
      summary: /:channel
      description: Get loyalty settings
      operationId: Get/:channel12345678
      parameters:
      - name: channel
        in: path
        description: guid - Channel id
        required: true
        style: simple
        schema:
          type: string
          example: 5b2e2007760aeb7729487dab
      - name: Accept
        in: header
        description: ''
        required: true
        style: simple
        schema:
          type: string
          example: application/json; charset=utf-8
      responses:
        '200':
          description: ''
          headers:
            Date:
              content:
                text/plain:
                  schema:
                    type: string
                  example: Fri, 07 Dec 2018 11:46:57 GMT
            Content-Length:
              content:
                text/plain:
                  schema:
                    type: string
                  example: '333'
          content:
            application/json; charset=utf-8:
              schema:
                $ref: '#/components/schemas/Success40'
              example:
                loyalty:
                  bonuses:
                    follow: 0
                    tip: 0
                    subscriber: 0
                    cheer: 0
                    host: 0
                  name: points
                  enabled: false
                  amount: 5
                  subscriberMultiplier: 3
                  ignored:
                  - streamelements
                _id: 5b2e2007760aeb7230487dc1
                channel: 5b2e2007760aeb7729487dab
                createdAt: '2018-06-23T10:25:11.768Z'
                updatedAt: '2018-06-23T10:25:11.768Z'
      deprecated: false
    put:
      tags:
      - loyalties
      summary: /:channel1
      description: Update loyalty settings
      operationId: /:channel1
      parameters:
      - name: channel
        in: path
        description: guid - Channel id
        required: true
        style: simple
        schema:
          type: string
          example: 5b2e2007760aeb7729487dab
      - name: Accept
        in: header
        description: ''
        required: true
        style: simple
        schema:
          type: string
          example: application/json; charset=utf-8
      - name: Content-Type
        in: header
        description: ''
        required: true
        style: simple
        schema:
          type: string
          example: application/json
      responses:
        '200':
          description: ''
          headers:
            Date:
              content:
                text/plain:
                  schema:
                    type: string
                  example: Fri, 07 Dec 2018 12:20:42 GMT
            Content-Length:
              content:
                text/plain:
                  schema:
                    type: string
                  example: '333'
          content:
            application/json; charset=utf-8:
              schema:
                $ref: '#/components/schemas/Success40'
              example:
                loyalty:
                  bonuses:
                    follow: 0
                    tip: 0
                    subscriber: 0
                    cheer: 0
                    host: 0
                  name: points
                  enabled: false
                  amount: 5
                  subscriberMultiplier: 3
                  ignored:
                  - streamelements
                _id: 5b2e2007760aeb7230487dc1
                channel: 5b2e2007760aeb7729487dab
                createdAt: '2018-06-23T10:25:11.768Z'
                updatedAt: '2018-06-23T10:25:11.768Z'
      deprecated: false
components:
  schemas:
    Success40:
      title: Success40
      required:
      - loyalty
      - _id
      - channel
      - createdAt
      - updatedAt
      type: object
      properties:
        loyalty:
          $ref: '#/components/schemas/Loyalty'
        _id:
          type: string
        channel:
          type: string
        createdAt:
          type: string
        updatedAt:
          type: string
      example:
        loyalty:
          bonuses:
            follow: 0
            tip: 0
            subscriber: 0
            cheer: 0
            host: 0
          name: points
          enabled: false
          amount: 5
          subscriberMultiplier: 3
          ignored:
          - streamelements
        _id: 5b2e2007760aeb7230487dc1
        channel: 5b2e2007760aeb7729487dab
        createdAt: '2018-06-23T10:25:11.768Z'
        updatedAt: '2018-06-23T10:25:11.768Z'
    Bonuses:
      title: Bonuses
      required:
      - follow
      - tip
      - subscriber
      - cheer
      - host
      type: object
      properties:
        follow:
          type: integer
          format: int32
        tip:
          type: integer
          format: int32
        subscriber:
          type: integer
          format: int32
        cheer:
          type: integer
          format: int32
        host:
          type: integer
          format: int32
      example:
        follow: 0
        tip: 0
        subscriber: 0
        cheer: 0
        host: 0
    Loyalty:
      title: Loyalty
      required:
      - bonuses
      - name
      - enabled
      - amount
      - subscriberMultiplier
      - ignored
      type: object
      properties:
        bonuses:
          $ref: '#/components/schemas/Bonuses'
        name:
          type: string
        enabled:
          type: boolean
        amount:
          type: integer
          format: int32
        subscriberMultiplier:
          type: integer
          format: int32
        ignored:
          type: array
          items:
            type: string
          description: ''
      example:
        bonuses:
          follow: 0
          tip: 0
          subscriber: 0
          cheer: 0
          host: 0
        name: points
        enabled: false
        amount: 5
        subscriberMultiplier: 3
        ignored:
        - streamelements
  securitySchemes:
    JWTBearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
    ApiKeyBearer:
      type: http
      scheme: bearer
      name: apiKey
    OAuth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://api.streamelements.com/oauth2/authorize
          tokenUrl: https://api.streamelements.com/oauth2/token
          scopes:
            tips:read: Ability read of tips
            tips:write: Grants create/modify/delete tips
            activities:read: Grants read of activities
            activities:write: Grants create activities
            loyalty:read: Grants read of loyalty settings and the leaderboard
            loyalty:write: Grants update of loyalty settings and update the leaderboard
            overlays:read: Grants read overlays
            overlays:write: Grants creation, update, deletion of overlays
            store:read: Grants read redemptions and items
            store:write: Grants create new store items and complete redemptions
            bot:read: Grants read timers, commands, spam filters and modules
            bot:write: Grants create and update timers, commands, spam filters and modules
            session:read: Grants read of session data
            contest:read: Grants read of contests
            contest:write: Grants create and update contests
            giveaway:read: Grants read of giveaways
            giveaway:write: Grants create and update giveaways