Event Lifecycle and Hosting
A live streaming event is managed as a state machine. The below diagram illustrates the status transitions of a livestream driven by control operations.

To create and edit a livestream, using the following APIs:
- Create: POST /bv/cms/v1/lives
- Update: PUT /bv/cms/v1/lives/:id
| Field | Required | Description | 
|---|---|---|
| name | Optional | Name of the livestream | 
| custom_id | Optional | Custom ID for the livestream | 
| type | Required | Type of the livestream: LIVE_TYPE_LIVE: Standard livestream that required live source ingestionLIVE_TYPE_SIMULIVE: Simulive that utilizes a pre-recorded video for live broadcasting | 
| broadcast_mode | Required | Type of the broadcast mode: BROADCAST_MODE_TRADITIONAL_LIVE: Standard mode that only allows viewers to watch the current moment of the live streamingBROADCAST_MODE_DVR: DVR (Start-Over) mode that enables viewers to rewind or start from the beginning during the live streaming until it endsBROADCAST_MODE_PLAYBACK: Playback mode that directly utilizes a standard VOD, enabling viewers to have full control over progress | 
| resolution | Required | Resolution for the livestream broadcasting | 
| security | Required | Content protection settings for the live streaming | 
| ull_enabled | Required | Set to trueif you would like to enable the ultra-low lantency | 
To host and manage the status of your livestream, refer to the following guide and APIs:
| State | Value | Description | 
|---|---|---|
| Scheduled | LIVE_STATUS_SCHEDULED | This is the initial state of an event when it is scheduled but not yet ready for streaming. | 
| Preparing | LIVE_STATUS_PREPARING | When the scheduled event is less than 12 hours away, the status changes to "Preparing." At this point, the infrastructure is being set up for the event. | 
| Wait for Preview | LIVE_STATUS_WAIT_FOR_PREVIEW | After the infrastructure is set up, the status changes to "Wait for Preview." The streaming server has been built-up but is still not open for pushing signals. | 
| Preview | LIVE_STATUS_PREVIEW | POST /bv/cms/v1/lives/{id}:previewWhen the server is ready, the status changes to "Preview," indicating that the event can start sending signals and rehearsing. | 
| Live | LIVE_STATUS_LIVE | POST /bv/cms/v1/lives/{id}:startAfter the "Go Live" action is triggered, the event is live, and the status changes to "Live." | 
| Encoding | LIVE_STATUS_ENCODING | Once the live event has ended, the content is transcoded to VOD by BlendVision encoding service, and the status changes to "Encoding." | 
| VOD Ready | LIVE_STATUS_VOD_READY | When the VOD is ready to be broadcast, the status changes to "VOD Ready," indicating it is waiting for the scheduled time. | 
| VOD | LIVE_STATUS_VOD | Once the transcoding has been completed and the live event can be played as VOD content, the status changes to "VOD." | 
| End | LIVE_STATUS_LIVE_END | POST /bv/cms/v1/lives/{id}:endWhen the live-only event ends or the VOD of a Live to VOD event ends, the status changes to "Live END." | 
| Closed | LIVE_STATUS_CLOSED | POST /bv/cms/v1/lives/{id}:cancelWhen the event is canceled or successfully ended, the status changes to "Closed," and the channel can be re-opened and recreated. | 
| Archived | LIVE_STATUS_ARCHIVED | POST /bv/cms/v1/lives/{id}:archiveWhen the channel is archived, the status changes to "Archived." |