The Firework Livestream API lets you manage livestreams end to end. Two core workflows are supported:
Read: Fetch livestream details, current status, schedule, and attached products
Write: Pin or unpin products in real time and force-end live sessions when needed
Use these endpoints to create interactive commerce moments while keeping operational control of every broadcast.
Base URL: <https://api.firework.com>
2. Authentication
The Firework Livestream API uses OAuth 2.0 for authentication. Before using this API, you must obtain an access token.
Authentication Methods Supported:
Client Credentials: OAuth 2.0 Client Credentials flow for server-to-server authentication (machine-to-machine)
📖 See Authentication Documentation for the complete OAuth 2.0 flow
3. Endpoint Summary
GET /api/v1/live_streams/{id}/detail
Get livestream details and status (New API will be designed to replace)
GET /api/v1/live_streams/playlists/{id}/videos
Get livestreams in a specific playlist (New API will be designed to replace)
POST /api/v1/live_streams/{id}/pin_product
Pin products during livestream
POST /api/v1/live_streams/{id}/unpin_product
Unpin products during livestream
PATCH /api/v1/live_streams/{id}/end
Force end an active livestream
4. Get Livestream Details
⚠️ Legacy API: This endpoint is marked as legacy. A new API will be designed to replace this endpoint.
Retrieve detailed information about a specific livestream including its current status, scheduling information, event details, and associated products.
Endpoint: GET /api/v1/live_streams/{live_stream_id}/detail
Authentication: Bearer token required (OAuth 2.0 Client Credentials or User token)
Required Scope: livestreams:read (for OAuth apps)
4.1. Request Headers
Bearer token: Bearer {ACCESS_TOKEN}
4.2. Path Parameters
Parameter
Type
Required
Description
The unique identifier of the livestream
4.3. Get Livestream Response
Note: This API documents only the essential response fields required for typical livestream display use cases. Other fields may be present in the actual response but are omitted here.
Success Response: 200 OK
Field
Type
Nullable
Description
Current livestream state (see status values above)
ISO 8601 datetime when livestream is scheduled
Description of the livestream event
Name of the livestream event
Array of product objects (see Product Object)
Status Values
Status
Description
Web Player Behavior
Livestream not yet started
Livestream currently in progress
Livestream paused by host
Livestream ended, replay available
Product Object:
Encoded product identifier
ISO currency code (e.g., "USD")
Array of product image objects (see below)
Array of product variants (see below)
Product Image Object:
Product Unit Object (Variant/SKU):
Variant name (e.g., "Large / Blue")
Formatted price with currency symbol
External variant ID from provider
4.4. Get Livestream Error Responses
Invalid request format or malformed livestream ID
Invalid or missing authentication token, or access denied to this livestream
Error Response Format:
All error responses follow a consistent JSON structure:
CURL Request
Example Response (Minimal)
Example Response (With Products)
5. Get Livestreams in Playlist
⚠️ Legacy API: This endpoint is marked as legacy. A new API will be designed to replace this endpoint.
Retrieve livestreams contained within a specific playlist with pagination support.
Endpoint: GET /api/v1/live_streams/playlists/{playlist_id}/videos
Authentication: Bearer token required (OAuth 2.0 Client Credentials or User token)
Required Scope: livestreams:read (for OAuth apps)
Pagination: Yes (cursor-based)
5.1. Request Headers
Bearer token: Bearer {ACCESS_TOKEN}
5.2. Path Parameters
Parameter
Type
Required
Description
The unique identifier of the playlist
5.3. Query Parameters
Parameter
Type
Required
Default
Description
Number of livestreams to return per page
Return entries with ID smaller than this value
5.4. Get Livestreams Response
Success Response: 200 OK
Note: The following fields are the primary fields included in the response. Other fields may be present in the actual response but are omitted here.
Field
Type
Nullable
Description
Array of livestream objects
Livestream Object:
Field
Type
Nullable
Description
Unique identifier of the livestream
Current livestream state (see status values)
ISO 8601 datetime when livestream is scheduled
Description of the livestream event
Name of the livestream event
Paging Object:
Field
Type
Nullable
Description
The API path to fetch the next page
CURL Request
Example Response
6. Pin Products to Livestream
Pin (highlight) one or more products during an active livestream. The pinned products will be prominently displayed to all viewers watching the livestream in real-time.
Endpoint: POST /api/v1/live_streams/{live_stream_id}/pin_product
Authentication: Bearer token required
Content Type: application/json
Important: This endpoint can only be used when the livestream status is active or paused. Products cannot be pinned to livestreams in idle, replay, completed, or expired status.
Note: The system supports up to 3 products pinned simultaneously(override).
6.1. Request Headers
Bearer token: Bearer {ACCESS_TOKEN}
6.2. Path Parameters
Parameter
Type
Required
Description
The unique identifier of the livestream
6.3. Request Body
Parameter
Type
Required
Description
Array of Firework product IDs or product unit IDs to pin
Note: Both Firework product IDs and product unit IDs are supported. You can obtain these IDs from the Firework product catalog or product management APIs. The array must contain at least 1 item and maximum 3 items per request.
6.4. Pin Products Response
Success Response: 200 OK
Array of product IDs that were pinned in this request
Note: Upon receiving this success response, all products have already been broadcasted to all viewers. There is no delay - the pins are live immediately.
6.5. Pin Products Error Responses
Invalid request format, missing product_ids, or malformed IDs
Invalid or missing authentication token, or access denied to this livestream
Livestream not found or no valid products found
Livestream is not active (must be in active or paused status)
6.6. Example Requests
Example 1: Pin Products
Success Response (200 OK)
Example 2: Pin Product Unit (Variant/SKU)
Success Response (200 OK)
Note: In this example, 082YOm is a product unit ID representing a specific variant (e.g., "Black / Standard"). Pinning a product unit highlights that specific variant during the livestream.
6.7. Error Responses
7. Unpin Products from Livestream
Remove one or more pinned (highlighted) products from a livestream. This clears the product highlights for all viewers.
Endpoint: POST /api/v1/live_streams/{live_stream_id}/unpin_product
Authentication: Bearer token required
Content Type: application/json
7.1. Request Headers
Bearer token: Bearer {ACCESS_TOKEN}
7.2. Path Parameters
Parameter
Type
Required
Description
The unique identifier of the livestream
7.3. Request Body
Parameter
Type
Required
Description
Array of Firework product IDs or product unit IDs to unpin
Note: Provide the Firework product IDs or product unit IDs (variant/SKU IDs) you want to remove from the highlighted set. The array must contain at least 1 item and maximum 3 items per request.
7.4. Unpin Products Response
Success Response: 200 OK
Array of product IDs that were unpinned in this request
7.5. Unpin Products Error Responses
Invalid request format or malformed livestream ID
Invalid or missing authentication token, or access denied to this livestream
Livestream not found or no valid products found
7.6. Example Requests
Example 1: Unpin Products
Success Response (200 OK)
Example 2: Unpin Product Unit (Variant/SKU)
Success Response (200 OK)
7.7. Error Responses
8. End Livestream
End an active or paused livestream. The livestream status will transition to replay.
Endpoint: PATCH /api/v1/live_streams/{live_stream_id}/end
Authentication: Bearer token required
Content Type: application/json
Important: This action is irreversible. Once ended, the livestream cannot return to active status.
8.1. Request Headers
Bearer token: Bearer {ACCESS_TOKEN}
8.2. Path Parameters
Parameter
Type
Required
Description
The unique identifier of the livestream
8.3. Request Body
No request body is required.
8.4. End Livestream Response
Success Response: 200 OK
The livestream that was ended
Always "ended" once the operation succeeds
8.5. End Livestream Error Responses
Livestream already ended or in a non-active state
Invalid or missing authentication token, or access denied to this livestream
Example 1: End an Active Livestream
CURL Request
Success Response (200 OK)
Error Response Examples