Skip to content
On this page

Categories

Categories can be used to label videos within your content library. They are like pre-defined tags. You can manage your categories by making the following requests:

GET /categories

Example request

shell
curl \
-H "Authorization: Bearer YOUR-API-KEY" \
"https://api.vidbeo.com/v2/categories"

Example response

json
{
  "success": true,
  "result": [
    {
      "id": "abcde12345abcde12345a",
      "name": "Cars",
      "value": "cars",
      "created_by": "abcde12345abcde12345a",
      "created_time": "2022-01-01T00:00:00.000Z",
      "updated_by": "abcde12345abcde12345a",
      "updated_time": "2022-01-01T00:00:00.000Z"
    }
  ],
  "links": {},
  "errors": []
}

Optional parameters (query string)

NameTypeDefaultInformation
limitString25Maximum number to return
cursorString""Used to get the next page of results: if applicable we return this as part of the links.next URL

GET /categories/:id

Example request

shell
curl \
-H "Authorization: Bearer YOUR-API-KEY" \
"https://api.vidbeo.com/v2/categories/abcde12345abcde12345a"

Example response

json
{
  "success": true,
  "result": {
    "id": "abcde12345abcde12345a",
    "name": "Cars",
    "value": "cars",
    "created_by": "abcde12345abcde1234a",
    "created_time": "2022-01-01T00:00:00.000Z",
    "updated_by": "abcde12345abcde12345a",
    "updated_time": "2022-01-01T00:00:00.000Z"
  },
  "links": null,
  "errors": []
}

Response format

KeyTypeDescription
idStringThe unique identifier given to this category
nameStringThe name of this category (its label)
valueStringThe value of this category
created_byStringThe ID of the user who created it (if known)
created_timeStringThe date and time it was created
updated_byStringThe ID of the user who last modified it (if known)
updated_timeStringThe date and time it was last modified

PATCH /categories/:id

The body of the request should contain one, or more, attributes that you would like to update for the category. Please be careful when making changes to existing items to avoid losing data, particularly if a particular key has sub-keys.

Example request

shell
curl \
-g \
-H "Authorization: Bearer YOUR-API-KEY" \
-H "Content-Type: application/json" \
-X PATCH \
-d '{"name":"New", "value":"new"}' \
"https://api.vidbeo.com/v2/categories/abcde12345abcde12345a"

Example response

json
{
  "success": true,
  "result": {
    "id": "abcde12345abcde12345a",
    "name": "New",
    "value": "new",
    "created_by": "abcde12345abcde1234a",
    "created_time": "2022-01-01T00:00:00.000Z",
    "updated_by": "abcde12345abcde12345a",
    "updated_time": "2022-01-01T00:00:00.000Z"
  },
  "links": null,
  "errors": []
}

DELETE /categories/:id

Example request

shell
curl \
-H "Authorization: Bearer YOUR-API-KEY" \
-X DELETE \
"https://api.vidbeo.com/v2/categories/abcde12345abcde12345a"

Example response

json
{
  "success": true,
  "result": {},
  "links": null,
  "errors": []
}

POST /categories

Required parameters

Its name and its corresponding value. These can be the same but normally they are used in the context of populating a dropdown menu. For example the name might be 'Cars' (the label), and its value a lowercase version of it 'cars'.

KeyTypeDescription
nameStringThe name of the category (1-40 characters)
valueStringThe value of the category (1-40 characters)

Example request

shell
curl \
-g \
-H "Authorization: Bearer YOUR-API-KEY" \
-H "Content-Type: application/json" \
-X POST \
-d '{"name":"Cars","value":"cars"}' \
"https://api.vidbeo.com/v2/categories"

Example response

json
{
  "success": true,
  "result": {
    "id": "abcde12345abcde12345a",
    "name": "Cars",
    "value": "cars",
    "created_by": "abcde12345abcde1234a",
    "created_time": "2022-01-01T00:00:00.000Z",
    "updated_by": "abcde12345abcde12345a",
    "updated_time": "2022-01-01T00:00:00.000Z"
  },
  "links": null,
  "errors": []
}