> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://fastpix.com/docs/cloud-playout-api/schedule-channel/add-events-to-cloud-playout-schedule-channel/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://fastpix.com/_mcp/server. # Add several events to a schedule channel POST https://api.fastpix.com/v1/cloud-playout/channels/{channelId}/schedule-events Content-Type: application/json This endpoint places up to 500 events on a Cloud Playout schedule channel in one request, so a block of programming from a few minutes to a full day can be scheduled in a single call rather than one event at a time. The request is all or nothing. Every event is checked before any is written, and if any event cannot be placed, none of them are and the response lists every event that was a problem, identified by its position in the array as `events[0]`, `events[1]` and so on. #### How it works 1. Make a POST request to this endpoint with an `events` array. Each entry has a `type` and a `startTime`. 2. What else an entry carries depends on its `type`: * `vod` plays one media item. Send its `referenceId` and leave `endTime` and `name` out; the event ends when the media does. * `live` reserves a slot for the channel's live input. Send `endTime` and a `name`, and leave `referenceId` out. The slot must be at least 5 minutes long. 3. The response returns the events that were created, in the order they play. All of the events must fall within a single 24 hour window, measured from the earliest start to the latest end, and every one must sit inside the channel's own start and end times. Events may not overlap one another or anything already scheduled on the channel; an event may start exactly when the previous one ends. Media used by a `vod` event must have reached the `ready` status. On a channel that is on air, no event may start or end in the next few minutes. Gaps between events are allowed. The channel shows its slate for any time nothing is scheduled. #### Example A news channel loads tomorrow's line-up in one request: an overnight loop of recorded bulletins as `vod` events, a two hour `live` slot for the morning show, and the afternoon programming, all placed at their exact times. Reference: https://fastpix.com/docs/cloud-playout-api/schedule-channel/add-events-to-cloud-playout-schedule-channel ## Authentication - `Authorization` header (basic auth, required) — FastPix APIs are secured with Basic Authentication. Use your Access Token ID as the username and Secret Key as the password in the Authorization header of each API request. * Username: Access Token ID * Password: Secret Key Activate your FastPix account to generate your API credentials. See the guide here ## Request ### Path parameters - `channelId` (string, required) — The unique identifier of the schedule channel the events are added to. ### Body (application/json) This endpoint expects a CloudPlayoutScheduleEventBatchRequest. - `events` (list of CloudPlayoutScheduleEventBatchItem, required) — The events to place on the channel. Up to 500 per request, and all of them must fall within a single 24 hour window. ## Response ### 201 Events added to the schedule channel successfully - `success` (boolean, optional) — Shows the request status. Returns true for success and false for failure. - `data` (list of CloudPlayoutScheduleEvent, optional) — The events on the channel, in the order they play. ## Types ### CloudPlayoutScheduleEventBatchItem - `type` (enum, required) — What the event plays. `vod` plays a single media item, and `live` reserves a slot for the channel's live input. - Allowed values: `vod`, `live` - `startTime` (string, required) — When the event starts, in `yyyy-MM-dd'T'HH:mm:ss` format and interpreted as UTC. It must be in the future and must fall inside the channel's own start and end times. - `referenceId` (string, optional) — The unique identifier of the media for a `vod` event. Required for `vod`, and must be left out for `live`. - `endTime` (string, optional) — When the event ends, in `yyyy-MM-dd'T'HH:mm:ss` format and interpreted as UTC. Required for a `live` event, which must be at least 5 minutes long, and must be left out for `vod`, which ends when its media does. - `name` (string, optional) — A name for a `live` event. It must be between 3 and 255 characters and can contain only alphanumeric characters, hyphens, underscores, and spaces. Required for `live`, and must be left out for `vod`, which takes its name from the media. ### CloudPlayoutScheduleEvent An event on a Cloud Playout schedule channel. - `id` (string, optional) — The unique identifier FastPix assigns to the event. Use this identifier when you update or remove it. - `channelId` (string, optional) — The unique identifier of the channel the event is scheduled on. - `type` (enum, optional) — What the event plays. A `playlist` you scheduled is returned as one `vod` event per item in it. - Allowed values: `vod`, `live` - `referenceId` (string, optional, nullable) — The unique identifier of the media the event plays. Not returned for a `live` event. - `name` (string, optional) — The name of the event. For a `vod` event this is the media's title, and for a `live` event it is the name you gave the event. - `startTime` (datetime, optional) — When the event starts, defined as a localDateTime (UTC Time). - `endTime` (datetime, optional) — When the event ends, defined as a localDateTime (UTC Time). - `duration` (string, optional) — How long the event runs, formatted as `HH:MM:SS`. - `sourceResolution` (string, optional) — The resolution the event is played out at. - `thumbnail` (string, optional, nullable) — A URL to the event's thumbnail image. - `bumper` (CloudPlayoutScheduleEventBumper, optional) — The bumpers attached to the event. Each key is present only when a bumper of that kind is attached. - `segments` (list of CloudPlayoutSegment, optional) — The segments marked on the event, in the order they occur. - `createdAt` (datetime, optional) — Time the event was created, defined as a localDateTime (UTC Time). - `updatedAt` (datetime, optional) — Time the event was last updated, defined as a localDateTime (UTC Time). ### CloudPlayoutScheduleEventBumper The bumpers attached to the event. Each key is present only when a bumper of that kind is attached. - `preroll` (CloudPlayoutScheduleEventRollResponse, optional) - `postroll` (CloudPlayoutScheduleEventRollResponse, optional) ### CloudPlayoutSegment A time window marked on an item, which can carry bumpers around it. - `id` (string, optional) — The unique identifier FastPix assigns to the segment. - `segmentMediaId` (string, optional) — The unique identifier of the media the segment is marked on. - `startTime` (integer, optional) — The point in the media where the segment begins, in seconds from the start of the media. - `duration` (integer, optional) — The length of the segment in seconds. - `bumper` (CloudPlayoutSegmentBumper, optional) — The bumpers attached to this segment. Each key is present only when a bumper of that kind has been added. - `thumbnail` (string, optional, nullable) — A URL to the segment's thumbnail image. - `status` (string, optional, nullable) — The current state of the segment. ### CloudPlayoutScheduleEventRollResponse - `id` (string, optional) — The unique identifier of the bumper. - `duration` (integer, optional) — The duration of the bumper in seconds. ### CloudPlayoutSegmentBumper The bumpers attached to this segment. Each key is present only when a bumper of that kind has been added. - `preroll` (CloudPlayoutSegmentBumper, optional) — The bumpers attached to this segment. Each key is present only when a bumper of that kind has been added. - `postroll` (CloudPlayoutSegmentBumper, optional) — The bumpers attached to this segment. Each key is present only when a bumper of that kind has been added. ## Examples **Request** ```json { "events": [ { "type": "vod", "startTime": "2026-09-02T18:00:00", "referenceId": "8c2c4ef1-1c2a-4a49-9c5b-8f9c0a7c3d21" }, { "type": "live", "startTime": "2026-09-03T07:00:00", "endTime": "2026-09-03T09:00:00", "name": "Morning show" }, { "type": "vod", "startTime": "2026-09-03T09:00:00", "referenceId": "3e5c7a90-8b2d-4f61-9c07-6d4a1b8e2f53" } ] } ``` **Response** ```json { "success": true, "data": [ { "id": "b1d6f0a7-4e28-4b93-90c5-7f2a8c1d3e64", "channelId": "cc99cae6-56b4-46ab-9f4a-8b2462d8137c", "type": "vod", "referenceId": "8c2c4ef1-1c2a-4a49-9c5b-8f9c0a7c3d21", "name": "Morning headlines", "startTime": "2026-09-02T18:00:00Z", "endTime": "2026-09-02T18:10:30Z", "duration": "00:10:30", "sourceResolution": "1080p", "thumbnail": "https://images.fastpix.com/8c2c4ef1-1c2a-4a49-9c5b-8f9c0a7c3d21/thumbnail.png", "segments": [], "createdAt": "2026-08-20T09:02:11.114530Z", "updatedAt": "2026-08-20T09:02:11.114530Z" }, { "id": "3e5c7a90-8b2d-4f61-9c07-6d4a1b8e2f53", "channelId": "cc99cae6-56b4-46ab-9f4a-8b2462d8137c", "type": "live", "name": "Evening press conference", "startTime": "2026-09-02T19:00:00Z", "endTime": "2026-09-02T20:00:00Z", "duration": "01:00:00", "sourceResolution": "1080p", "segments": [], "createdAt": "2026-08-20T09:05:44.210338Z", "updatedAt": "2026-08-20T09:05:44.210338Z" } ] } ``` **SDK Code** ```python import requests url = "https://api.fastpix.com/v1/cloud-playout/channels/cc99cae6-56b4-46ab-9f4a-8b2462d8137c/schedule-events" payload = { "events": [ { "type": "vod", "startTime": "2026-09-02T18:00:00", "referenceId": "8c2c4ef1-1c2a-4a49-9c5b-8f9c0a7c3d21" }, { "type": "live", "startTime": "2026-09-03T07:00:00", "endTime": "2026-09-03T09:00:00", "name": "Morning show" }, { "type": "vod", "startTime": "2026-09-03T09:00:00", "referenceId": "3e5c7a90-8b2d-4f61-9c07-6d4a1b8e2f53" } ] } headers = { "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers, auth=("", "")) print(response.json()) ``` ```javascript const url = 'https://api.fastpix.com/v1/cloud-playout/channels/cc99cae6-56b4-46ab-9f4a-8b2462d8137c/schedule-events'; const credentials = btoa(":"); const options = { method: 'POST', headers: { Authorization: `Basic ${credentials}`, 'Content-Type': 'application/json' }, body: '{"events":[{"type":"vod","startTime":"2026-09-02T18:00:00","referenceId":"8c2c4ef1-1c2a-4a49-9c5b-8f9c0a7c3d21"},{"type":"live","startTime":"2026-09-03T07:00:00","endTime":"2026-09-03T09:00:00","name":"Morning show"},{"type":"vod","startTime":"2026-09-03T09:00:00","referenceId":"3e5c7a90-8b2d-4f61-9c07-6d4a1b8e2f53"}]}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.fastpix.com/v1/cloud-playout/channels/cc99cae6-56b4-46ab-9f4a-8b2462d8137c/schedule-events" payload := strings.NewReader("{\n \"events\": [\n {\n \"type\": \"vod\",\n \"startTime\": \"2026-09-02T18:00:00\",\n \"referenceId\": \"8c2c4ef1-1c2a-4a49-9c5b-8f9c0a7c3d21\"\n },\n {\n \"type\": \"live\",\n \"startTime\": \"2026-09-03T07:00:00\",\n \"endTime\": \"2026-09-03T09:00:00\",\n \"name\": \"Morning show\"\n },\n {\n \"type\": \"vod\",\n \"startTime\": \"2026-09-03T09:00:00\",\n \"referenceId\": \"3e5c7a90-8b2d-4f61-9c07-6d4a1b8e2f53\"\n }\n ]\n}") req, _ := http.NewRequest("POST", url, payload) req.SetBasicAuth("", "") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.fastpix.com/v1/cloud-playout/channels/cc99cae6-56b4-46ab-9f4a-8b2462d8137c/schedule-events") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request.basic_auth("", "") request["Content-Type"] = 'application/json' request.body = "{\n \"events\": [\n {\n \"type\": \"vod\",\n \"startTime\": \"2026-09-02T18:00:00\",\n \"referenceId\": \"8c2c4ef1-1c2a-4a49-9c5b-8f9c0a7c3d21\"\n },\n {\n \"type\": \"live\",\n \"startTime\": \"2026-09-03T07:00:00\",\n \"endTime\": \"2026-09-03T09:00:00\",\n \"name\": \"Morning show\"\n },\n {\n \"type\": \"vod\",\n \"startTime\": \"2026-09-03T09:00:00\",\n \"referenceId\": \"3e5c7a90-8b2d-4f61-9c07-6d4a1b8e2f53\"\n }\n ]\n}" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.fastpix.com/v1/cloud-playout/channels/cc99cae6-56b4-46ab-9f4a-8b2462d8137c/schedule-events") .basicAuth("", "") .header("Content-Type", "application/json") .body("{\n \"events\": [\n {\n \"type\": \"vod\",\n \"startTime\": \"2026-09-02T18:00:00\",\n \"referenceId\": \"8c2c4ef1-1c2a-4a49-9c5b-8f9c0a7c3d21\"\n },\n {\n \"type\": \"live\",\n \"startTime\": \"2026-09-03T07:00:00\",\n \"endTime\": \"2026-09-03T09:00:00\",\n \"name\": \"Morning show\"\n },\n {\n \"type\": \"vod\",\n \"startTime\": \"2026-09-03T09:00:00\",\n \"referenceId\": \"3e5c7a90-8b2d-4f61-9c07-6d4a1b8e2f53\"\n }\n ]\n}") .asString(); ``` ```php request('POST', 'https://api.fastpix.com/v1/cloud-playout/channels/cc99cae6-56b4-46ab-9f4a-8b2462d8137c/schedule-events', [ 'body' => '{ "events": [ { "type": "vod", "startTime": "2026-09-02T18:00:00", "referenceId": "8c2c4ef1-1c2a-4a49-9c5b-8f9c0a7c3d21" }, { "type": "live", "startTime": "2026-09-03T07:00:00", "endTime": "2026-09-03T09:00:00", "name": "Morning show" }, { "type": "vod", "startTime": "2026-09-03T09:00:00", "referenceId": "3e5c7a90-8b2d-4f61-9c07-6d4a1b8e2f53" } ] }', 'headers' => [ 'Content-Type' => 'application/json', ], 'auth' => ['', ''], ]); echo $response->getBody(); ``` ```csharp using RestSharp; using RestSharp.Authenticators; var client = new RestClient("https://api.fastpix.com/v1/cloud-playout/channels/cc99cae6-56b4-46ab-9f4a-8b2462d8137c/schedule-events"); client.Authenticator = new HttpBasicAuthenticator("", ""); var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"events\": [\n {\n \"type\": \"vod\",\n \"startTime\": \"2026-09-02T18:00:00\",\n \"referenceId\": \"8c2c4ef1-1c2a-4a49-9c5b-8f9c0a7c3d21\"\n },\n {\n \"type\": \"live\",\n \"startTime\": \"2026-09-03T07:00:00\",\n \"endTime\": \"2026-09-03T09:00:00\",\n \"name\": \"Morning show\"\n },\n {\n \"type\": \"vod\",\n \"startTime\": \"2026-09-03T09:00:00\",\n \"referenceId\": \"3e5c7a90-8b2d-4f61-9c07-6d4a1b8e2f53\"\n }\n ]\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let credentials = Data(":".utf8).base64EncodedString() let headers = [ "Authorization": "Basic \(credentials)", "Content-Type": "application/json" ] let parameters = ["events": [ [ "type": "vod", "startTime": "2026-09-02T18:00:00", "referenceId": "8c2c4ef1-1c2a-4a49-9c5b-8f9c0a7c3d21" ], [ "type": "live", "startTime": "2026-09-03T07:00:00", "endTime": "2026-09-03T09:00:00", "name": "Morning show" ], [ "type": "vod", "startTime": "2026-09-03T09:00:00", "referenceId": "3e5c7a90-8b2d-4f61-9c07-6d4a1b8e2f53" ] ]] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.fastpix.com/v1/cloud-playout/channels/cc99cae6-56b4-46ab-9f4a-8b2462d8137c/schedule-events")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` > The single API stack for video: upload, encode, stream, secure, and analyze video at any scale. Explore guides, API references, and SDKs.