create or update content
This creates new content, or updates existing content.
When you create new content, a
cardId
will be automatically generated.To update existing content, a
cardId
should be provided
You can learn more about how playlists work here.
Responses
200 OK (Create a card) / 200 OK (Update a card) application/json
cardobject
_idstring
cardIdstring
contentobject
chaptersarray
[items]
configobject
resumeTimeoutnumber
playbackTypestring
createdAtstring
metadataobject
descriptionstring
titlestring
updatedAtstring
userIdstring
{ "card": { "_id": "676016ea43bedbaa54a70549", "cardId": "31yYU", "content": { "chapters": [], "config": { "resumeTimeout": 2592000 }, "playbackType": "linear" }, "createdAt": "2024-12-16T12:02:50.164Z", "metadata": {}, "title": "Testing Podcast", "updatedAt": "2024-12-16T12:02:50.164Z", "userId": "2kRM9HdDaanNVdLqnjn1d5xFH46Ffmkh@clients" }}
Body application/json
cardId string
Example
31yYU
content object
metadata object
title string
Example
Testing Podcast
POST
/content
Server URL: https://api.yotoplay.com
Authorization (bearerAuth)
Request Body
curl "https://api.yotoplay.com/content"--header "Authorization: Bearer [YOUR_TOKEN]"
const options = { method: 'POST', headers: { 'Authorization': 'Bearer [YOUR_TOKEN]' }};
fetch('https://api.yotoplay.com/content', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
<?php
$curl = curl_init();
curl_setopt_array($curl, [ CURLOPT_URL => "https://api.yotoplay.com/content", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_HTTPHEADER => [ "Authorization: Bearer [YOUR_TOKEN]" ],]);
$response = curl_exec($curl);$err = curl_error($curl);
curl_close($curl);
if ($err) { echo "cURL Error #:" . $err;} else { echo $response;}
import requests
url = "https://api.yotoplay.com/content"
headers = { "Authorization": "Bearer [YOUR_TOKEN]"}
response = requests.request("POST", url, headers=headers)
print(response.text)