API
To use the HotMic Public API, you need to use a public API key provided by HotMic.
Retrieve 1 or More Streams
Get one or more streams.
GET
Params
Query Parameters
limit
optional
Integer
Limits the number of results returned by the query. Defaults to 100.
state
optional
String
Filter results to only include streams with a given state. Can be: "SCHEDULED", "LIVE", "ENDED", or "VOD"
userId
optional
String
Filter results to only include streams with a certain userId.
ids
optional
String
Filter results to only include 1 or more streams by id. If passing multiple ids, separate them by an underscore _. (example: abc-123_def-456 would filter for 2 streams "abc-123" and "def-456").
orderBy
optional
String
The field to order by, ascending by default
desc
optional
Boolean
If true, order by descending instead of ascending.
cursor
optional
String
This filters the results to only return the next results after this cursor, up to the limit. Typically used for pagination, this is the last result that will be ignored based on the orderBy field. So if you are sorting by ids, and you have 5 users with id 1,2,3,4,5: passing cursor=2 limit=2 would return 3,4.
Do not use combined with "skip".
skip
optional
Integer
When paginating, how many results to skip. If using skip 30 limit 10, you would get results 31 to 40. Do not use combined with "cursor".
pagination
optional
String
Defaults to "skip". If this is set to "cursor", then the "next" result on the link will always return the correct next paginated result using a cursor.
Header Parameters
x-api-key
required
String
The API key provided to you by HotMic.
ο»Ώ
Example Requests
Get all Streams (default limit)
https://public-api.hotmic.io/streams
Get set of 100 Streams
https://public-api.hotmic.io/streams?limit=1000
Get next set of 1000 Streams (provided by β$.links.nextβ in response
https://public-api.hotmic.io/streams?cursor=a3113c5b-26f5-4704-aa43-288446d250b6&limit=1000
Get specific Streams by Stream ID
https://public-api.hotmic.io/streams?ids=e35a851b-e161-46b7-a921-f6899ccb9cc0_0e246a7b-1a14-4028-aac6-a2f0433bd8c7
Get all Streams for specific User ID (default limit)
https://public-api.hotmic.io/streams?userId=e35a851b-e161-46b7-a921-f6899ccb9cc0
Get all Streams updated since last check
https://public-api.hotmic.io/streams?orderBy=ο»Ώlast_updated&cursor=2022-10-13T17:00:08Z
Response
Returns the stream object if the update succeeded. Returns an error if there the update fails.
- _id: string - the id of the streams
- user_id: string - the user_id of the host
- title: string - the title of the stream
- thumbnail: string - the url to the thumbnail image
- scheduled_date: string - the datetime a stream is scheduled
- state: string - can be "SCHEDULED" "LIVE" "ENDED" or "VOD"
- duration: integer - length of VOD in seconds
- video_url: string - url for the live hls stream when live and vod hls stream when the state is VOD
- description: string - a description of the stream
- event_id: - the id of the event a stream is associated to. Only useful if you are creating mutiple streams per event.
- type: string - the type of stream
- live_date: string - the datetime the stream was set to "LIVE"
- last_updated: string - the datetime the stream was edited
- invite_link: string - the link stored by HotMic to the stream
- user: object with:
- _id: string - the id of the user
- followers: string - the number of followers of the user if using HotMic following tools
- display_name: string - the name of the user to display to others
- profile_pic: string - the url to the profile pic of the user
Update a Stream
Update stream information, such as title or invite link.
PUT
Params
Path Params
id
required
String
ID of the stream to modify
Header Parameters
x-api-key
required
String
The API key provided to you by HotMic.
Body Parameters
title
optional
String
The title of the stream
user_id
optional
String
Update the user_id of the owner of the stream in HotMic. Note, this must be a valid HotMic user_id.
thumbnail
optional
String
Update the url to the stream thumbnail of used in HotMic. Note: the url must be publically accessible if updating in this way.
scheduled_date
optional
String
Update the scheduled_date of the stream. Dates are in ISO-8601 format, for example: "2019-09-08T00:00:00.000+00:00".
description
optional
String
Update the description of the event.
invite_link
optional
String
The invite link is the link to the stream. If you generate a link for the event, use this to update the link for the hosts to see. This doesn't change the link to the event itself, rather the link for the hosts to view.
ο»Ώ
Returns the stream object if the update succeeded. Returns an error if there the update fails.
ο»Ώ
Update a User
Update user information, such as their name or the default invite link for their profile.
PUT
Params
Path Params
id
required
String
The ID of the user to modify.
Header Parameters
x-api-key
required
String
The API key provided to you by HotMic.
Body Parameters
name
optional
String
The ID of the user to modify
email
optional
String
default_invite_link
optional
String
ο»Ώ
ο»Ώ