Integrations & SDKs
API
To use the HotMic Public API, you need to use a public API key provided by HotMic.
Get one or more streams.
GET
Request
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
- tags: array - an array of objects
- video_url: string - url for the live hls stream when live and vod hls stream when the state is VOD. This url for the live stream is available when the stream is created, but will not be a valid working HLS until the creator broadcasts HLS. The URL will not change until it is VOD, at which time the video_url will return the VOD url.
- video_mp4_url: string - the url of a mp4 download link, available after the stream has in the VOD state.
- video_dash_url: string - url for the live dash stream when live and vod dash stream when the state is VOD. This url for the live stream is available when the stream is created, but will not be a valid working dash until the creator broadcasts dash. The URL will not change until it is VOD, at which time the video_dash_url will return the VOD url.
- video_orientation: string - null or "landscape" for horizontal video. "portrait" for vertical video.
- 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
- tags: array - 1 ore more tags associated with the user
Update stream information, such as title or invite link.
PUT
Request
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 user information, such as their name or the default invite link for their profile.
PUT
Request
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 name of the user to modify
email
optional
String
The email of the user to modify
default_invite_link
optional
String
The default_invite_link of the user to modify
tags
optional
Array
General tags are added, edited, and returned with the user object when it is returned in the API. This allows you to add information for future use.
authorized_stream_tags
optional
Array
"authorized_stream_tags" define the tags a user can add to a stream. When adding a stream, a user can add tags to the stream from this list, and their selected tags will appear as stream tags.
ο»Ώ
ο»Ώ
Creates a new user
POST
Request
Header Parameters
x-api-key
required
String
The API key provided to you by HotMic.
Body Parameters
name
required
String
The name of the user to modify
email
optional
String
The email of the user to modify
default_invite_link
optional
String
The default_invite_link of the user to modify
display_name
optional
String
The display name, such as "superfan".
profile_pic
optional
String
A URL to show for the user as a profile picture in chats and other areas.
tags
optional
Array
General tags are added, edited, and returned with the user object when it is returned in the API. This allows you to add information for future use.
authorized_stream_tags
optional
Array
"authorized_stream_tags" define the tags a user can add to a stream. When adding a stream, a user can add tags to the stream from this list, and their selected tags will appear as stream tags.
ο»Ώ
Get a user by its ID
GET
Request
Query Parameters
limit
optional
String
Limits the number of results returned by the query. Defaults to 100.
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").
Header Parameters
x-api-key
required
String
The API key provided to you by HotMic.
ο»Ώ
ο»Ώ