OpenAPI Specification
openapi: 3.0.0
info:
title: SE API Docs activities store 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: store
description: Store items management
paths:
/store/{channel}/items:
get:
tags:
- store
summary: /:channel/items
description: List store items
operationId: /:channel/items
parameters:
- name: limit
in: query
description: integer - number of items per page
required: true
style: form
explode: true
schema:
type: integer
format: int32
example: 25
- name: offset
in: query
description: integer - number of items to be skipped
required: true
style: form
explode: true
schema:
type: integer
format: int32
example: 0
- 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: Sat, 08 Dec 2018 12:06:31 GMT
Content-Length:
content:
text/plain:
schema:
type: string
example: '1186'
content:
application/json; charset=utf-8:
schema:
type: array
items:
$ref: '#/components/schemas/LoyaltyItem'
example:
- bot:
enabled: true
identifier: testitem
cooldown:
user: 5
global: 0
quantity:
total: -1
alert:
graphics:
duration: 8
audio:
volume: 0.5
src: null
enabled: true
subscriberOnly: false
userInput: []
_id: 5c0bb2aede9a4c4402a15056
enabled: true
featured: false
name: Test item
description: Test description
type: perk
cost: 1
public: false
channel: 5b2e2007760aeb7729487dab
createdAt: '2018-12-08T12:01:50.208Z'
updatedAt: '2018-12-08T12:02:47.902Z'
- bot:
enabled: true
identifier: super_item
cooldown:
user: 10
global: 0
quantity:
total: 3
current: 3
alert:
graphics:
duration: 8
audio:
volume: 0.5
src: https://cdn.streamelements.com/uploads/08e58dd8-b750-4113-a496-2b5817fd8031.mp3
enabled: true
subscriberOnly: false
userInput: []
_id: 5c0bb3b0de9a4c40a3a1505d
enabled: true
featured: false
name: Super item
description: Super description
type: code
cost: 100
preview: https://cdn.streamelements.com/uploads/dbf6ff1f-3d03-4db7-a4bd-43d30e22461a.gif
public: false
channel: 5b2e2007760aeb7729487dab
createdAt: '2018-12-08T12:06:08.435Z'
updatedAt: '2018-12-08T12:06:08.435Z'
example:
- bot:
enabled: true
identifier: testitem
cooldown:
user: 5
global: 0
quantity:
total: -1
alert:
graphics:
duration: 8
audio:
volume: 0.5
src: null
enabled: true
subscriberOnly: false
userInput: []
_id: 5c0bb2aede9a4c4402a15056
enabled: true
featured: false
name: Test item
description: Test description
type: perk
cost: 1
public: false
channel: 5b2e2007760aeb7729487dab
createdAt: '2018-12-08T12:01:50.208Z'
updatedAt: '2018-12-08T12:02:47.902Z'
- bot:
enabled: true
identifier: super_item
cooldown:
user: 10
global: 0
quantity:
total: 3
current: 3
alert:
graphics:
duration: 8
audio:
volume: 0.5
src: https://cdn.streamelements.com/uploads/08e58dd8-b750-4113-a496-2b5817fd8031.mp3
enabled: true
subscriberOnly: false
userInput: []
_id: 5c0bb3b0de9a4c40a3a1505d
enabled: true
featured: false
name: Super item
description: Super description
type: code
cost: 100
preview: https://cdn.streamelements.com/uploads/dbf6ff1f-3d03-4db7-a4bd-43d30e22461a.gif
public: false
channel: 5b2e2007760aeb7729487dab
createdAt: '2018-12-08T12:06:08.435Z'
updatedAt: '2018-12-08T12:06:08.435Z'
deprecated: false
post:
tags:
- store
summary: /:channel/items
description: Add new item to store
operationId: Post/:channel/items
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
requestBody:
description: ''
content:
application/json:
schema:
type: object
example: {}
example: {}
required: true
responses:
'200':
description: ''
headers:
Date:
content:
text/plain:
schema:
type: string
example: Sat, 08 Dec 2018 12:01:50 GMT
Content-Length:
content:
text/plain:
schema:
type: string
example: '555'
Vary:
content:
text/plain:
schema:
type: string
example: X-HTTP-Method-Override
content:
application/json; charset=utf-8:
schema:
$ref: '#/components/schemas/LoyaltyItem'
example:
cooldown:
user: 10
global: 0
accessCodes:
keys: []
mode: multi
random: false
alert:
graphics:
duration: 8
audio:
volume: 0.5
src: null
enabled: true
subscriberOnly: false
userInput: []
_id: 5c0bb2aede9a4c4402a15056
enabled: true
featured: false
name: Test item
description: Test description
type: perk
cost: 1
quantity:
total: -1
bot:
enabled: true
identifier: testitem
public: false
channel: 5b2e2007760aeb7729487dab
createdAt: '2018-12-08T12:01:50.208Z'
updatedAt: '2018-12-08T12:01:50.208Z'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/400-badrequest'
example:
statusCode: 400
error: Bad Request
message: child "name" fails because ["name" is required]. child "description" fails because ["description" is required]
details:
- path:
- name
message: '"name" is required'
- path:
- description
message: '"description" is required'
deprecated: false
/store/{channel}/items/{itemId}:
get:
tags:
- store
summary: /:channel/items/:itemId
description: Get item details
operationId: /:channel/items/:itemId
parameters:
- name: channel
in: path
description: guid - Channel id
required: true
style: simple
schema:
type: string
example: 5b2e2007760aeb7729487dab
- name: itemId
in: path
description: guid - Item id
required: true
style: simple
schema:
type: string
- 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: Tue, 11 Dec 2018 08:41:04 GMT
Content-Length:
content:
text/plain:
schema:
type: string
example: '554'
content:
application/json; charset=utf-8:
schema:
$ref: '#/components/schemas/LoyaltyItem'
example:
bot:
enabled: true
identifier: testitem
cooldown:
user: 5
global: 0
quantity:
total: -1
accessCodes:
keys: []
mode: multi
random: false
alert:
graphics:
duration: 8
audio:
volume: 0.5
src: null
enabled: true
subscriberOnly: false
userInput: []
_id: 5c0bb2aede9a4c4402a15056
enabled: true
featured: false
name: Test item
description: Test description
type: perk
cost: 0
public: false
channel: 5b2e2007760aeb7729487dab
createdAt: '2018-12-08T12:01:50.208Z'
updatedAt: '2018-12-08T12:12:45.883Z'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/400-badrequest'
example:
statusCode: 400
error: Bad Request
message: 'child "itemId" fails because ["itemId" with value "truncated" fails to match the required pattern: /^[0-9a-fA-F]{24}$/]'
details:
- path:
- itemId
message: '"itemId" with value "truncated" fails to match the required pattern: /^[0-9a-fA-F]{24}$/'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Notfound2'
example:
statusCode: 404
error: Not Found
deprecated: false
put:
tags:
- store
summary: /:channel/items/:itemId
description: Update item
operationId: Put/:channel/items/:itemId
parameters:
- name: channel
in: path
description: guid - Channel id
required: true
style: simple
schema:
type: string
example: 5b2e2007760aeb7729487dab
- name: itemId
in: path
description: guid - Item id
required: true
style: simple
schema:
type: string
- name: Accept
in: header
description: ''
required: true
style: simple
schema:
type: string
example: application/json; charset=utf-8
requestBody:
description: ''
content:
application/json:
schema:
type: object
example: {}
example: {}
required: true
responses:
'200':
description: ''
headers:
Date:
content:
text/plain:
schema:
type: string
example: Sat, 08 Dec 2018 12:02:47 GMT
Content-Length:
content:
text/plain:
schema:
type: string
example: '554'
content:
application/json; charset=utf-8:
schema:
$ref: '#/components/schemas/LoyaltyItem'
example:
bot:
enabled: true
identifier: testitem
cooldown:
user: 5
global: 0
quantity:
total: -1
accessCodes:
keys: []
mode: multi
random: false
alert:
graphics:
duration: 8
audio:
volume: 0.5
src: null
enabled: true
subscriberOnly: false
userInput: []
_id: 5c0bb2aede9a4c4402a15056
enabled: true
featured: false
name: Test item
description: Test description
type: perk
cost: 1
public: false
channel: 5b2e2007760aeb7729487dab
createdAt: '2018-12-08T12:01:50.208Z'
updatedAt: '2018-12-08T12:02:47.902Z'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/400-badrequest'
example:
statusCode: 400
error: Bad Request
message: child "name" fails because ["name" is required]. child "description" fails because ["description" is required]
details:
- path:
- name
message: '"name" is required'
- path:
- description
message: '"description" is required'
deprecated: false
delete:
tags:
- store
summary: /:channel/items/:itemId1
description: Delete item from store
operationId: /:channel/items/:itemId1
parameters:
- name: channel
in: path
description: guid - Channel id
required: true
style: simple
schema:
type: string
example: 5b2e2007760aeb7729487dab
- name: itemId
in: path
description: guid - Item id
required: true
style: simple
schema:
type: string
- name: Accept
in: header
description: ''
required: true
style: simple
schema:
type: string
example: text/plain; charset=utf-8
- name: Content-Type
in: header
description: ''
required: true
style: simple
schema:
type: string
example: application/json
responses:
'201':
description: ''
headers:
Date:
content:
text/plain:
schema:
type: string
example: Sat, 08 Dec 2018 12:08:15 GMT
Content-Length:
content:
text/plain:
schema:
type: string
example: '7'
content:
text/plain; charset=utf-8:
schema:
type: string
example: Created
example: Created
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Notfound2'
example:
statusCode: 404
error: Not Found
deprecated: false
components:
schemas:
AccessCodes:
title: AccessCodes
required:
- keys
- mode
- random
type: object
properties:
keys:
type: array
items:
type: string
description: ''
mode:
type: string
random:
type: boolean
example:
keys: []
mode: multi
random: false
LoyaltyItem:
title: LoyaltyItem
required:
- bot
- cooldown
- quantity
- alert
- subscriberOnly
- userInput
- _id
- enabled
- featured
- name
- description
- type
- cost
- public
- channel
- createdAt
- updatedAt
type: object
properties:
bot:
$ref: '#/components/schemas/Bot2'
cooldown:
$ref: '#/components/schemas/Cooldown'
quantity:
$ref: '#/components/schemas/Quantity1'
accessCodes:
$ref: '#/components/schemas/AccessCodes'
alert:
$ref: '#/components/schemas/Alert'
subscriberOnly:
type: boolean
userInput:
type: array
items:
type: string
description: ''
_id:
type: string
enabled:
type: boolean
featured:
type: boolean
name:
type: string
description:
type: string
type:
type: string
cost:
type: integer
format: int32
public:
type: boolean
channel:
type: string
createdAt:
type: string
updatedAt:
type: string
example:
bot:
enabled: true
identifier: testitem
cooldown:
user: 5
global: 0
quantity:
total: -1
accessCodes:
keys: []
mode: multi
random: false
alert:
graphics:
duration: 8
audio:
volume: 0.5
src: null
enabled: true
subscriberOnly: false
userInput: []
_id: 5c0bb2aede9a4c4402a15056
enabled: true
featured: false
name: Test item
description: Test description
type: perk
cost: 0
public: false
channel: 5b2e2007760aeb7729487dab
createdAt: '2018-12-08T12:01:50.208Z'
updatedAt: '2018-12-08T12:12:45.883Z'
Notfound2:
title: Notfound2
required:
- statusCode
- error
type: object
properties:
statusCode:
type: integer
format: int32
error:
type: string
example:
statusCode: 404
error: Not Found
Cooldown:
title: Cooldown
required:
- user
- global
type: object
properties:
user:
type: integer
format: int32
global:
type: integer
format: int32
example:
user: 15
global: 5
Detail:
title: Detail
required:
- path
- message
type: object
properties:
path:
type: array
items:
type: string
description: ''
message:
type: string
example:
path:
- types
message: '"types" must be an array'
Alert:
title: Alert
required:
- graphics
- audio
- enabled
type: object
properties:
graphics:
$ref: '#/components/schemas/Graphics8'
audio:
$ref: '#/components/schemas/Audio1'
enabled:
type: boolean
example:
graphics:
duration: 8
audio:
volume: 0.5
src: null
enabled: true
Bot2:
title: Bot2
required:
- enabled
- identifier
type: object
properties:
enabled:
type: boolean
identifier:
type: string
example:
enabled: true
identifier: testitem
Quantity1:
title: Quantity1
required:
- total
type: object
properties:
total:
type: integer
format: int32
example:
total: -1
Graphics8:
title: Graphics8
required:
- duration
type: object
properties:
duration:
type: integer
format: int32
example:
duration: 8
Audio1:
title: Audio1
required:
- src
type: object
properties:
src:
type: string
nullable: true
volume:
type: number
example:
src: https://cdn.streamelements.com/static/alertbox/default.ogg
volume: 0.5
400-badrequest:
title: 400-badrequest
required:
- statusCode
- error
- message
- details
type: object
properties:
statusCode:
type: integer
format: int32
error:
type: string
message:
type: string
details:
type: array
items:
$ref: '#/components/schemas/Detail'
description: ''
example:
statusCode: 400
error: Bad Request
message: 'child "giveawayId" fails because ["giveawayId" with value "5c10e383bd1e475b7c3d6eb" fails to match the required pattern: /^[0-9a-fA-F]{24}$/]'
details:
- path:
- giveawayId
message: '"giveawayId" with value "5c10e383bd1e475b7c3d6eb" fails to match the required pattern: /^[0-9a-fA-F]{24}$/'
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