The Firework Livestreams 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 Livestreams 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
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
4.2. Path Parameters
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
Status Values
Product Object:
Product Image Object:
Product Unit Object (Variant/SKU):
4.4. Get Livestream Error Responses
Error Response Format:
All error responses follow a consistent JSON structure:
CURL Request
Example Response (Minimal)
Example Response (With Products)
5. 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).
5.1. Request Headers
5.2. Path Parameters
5.3. Request Body
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.
5.4. Pin Products Response
Success Response: 200 OK
Note: Upon receiving this success response, all products have already been broadcasted to all viewers. There is no delay - the pins are live immediately.
5.5. Pin Products Error Responses
5.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.
5.7. Error Responses
6. 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
6.1. Request Headers
6.2. Path Parameters
6.3. Request Body
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.
6.4. Unpin Products Response
Success Response: 200 OK
6.5. Unpin Products Error Responses
6.6. Example Requests
Example 1: Unpin Products
Success Response (200 OK)
Example 2: Unpin Product Unit (Variant/SKU)
Success Response (200 OK)
6.7. Error Responses
7. 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.
7.1. Request Headers
7.2. Path Parameters
7.3. Request Body
No request body is required.
7.4. End Livestream Response
Success Response: 200 OK
7.5. End Livestream Error Responses
Example 1: End an Active Livestream
CURL Request
Success Response (200 OK)
Error Response Examples