Skip to content

create or update content

This creates new content, or updates existing content.

  • To create new content, the cardId should not be provided

  • To update existing content, its cardId should be provided

An example of the properties that can be set for card content can be found here.

Example Request Body:

{
  "cardId": "",
  "title": "Test file validation",
  "deleted": false,
  "createdAt": "",
  "updatedAt": "",
  "content": {
    "activity": "yoto_Player",
    "chapters": [
      {
        "title": "Centrifuge",
        "key": "4eda8628-acd8-4298-bec6-17cc33...",
        "tracks": [
          {
            "title": "Centrifuge.mp3",
            "trackUrl": "uo-7xRmZo8UynxgT_brGPrvXHCT5L_...",
            "key": "4eda8628-acd8-4298-bec6-17cc33...",
            "format": "mpeg",
            "uid": "",
            "type": "audio",
            "overlayLabel": "",
            "duration": 170,
            "fileSize": 5473506,
            "channels": "stereo"
          }
        ],
        "_status": {
          "status": "uploaded",
          "file": {},
          "percentage": 100,
          "error": null
        }
      }
    ],
    "restricted": true,
    "config": {
      "onlineOnly": false
    },
    "version": 1
  },
  "metadata": {}
}

Body

application/json
cardIdstring
Example: "31yYU"
contentobject
metadataobject
titlestring
Example: "Testing Podcast"

Responses

200 OK (Create a card) / 200 OK (Update a card)

Content-Type: application/json
{
  "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"
  }
}
POST
/content
Server URL:https://api.yotoplay.com
Authorization
bearerAuth
Request Body

Samples

curl "https://api.yotoplay.com/content"
--header "Authorization: Bearer [YOUR_TOKEN]"