API keys

API keys

Keys (API keys) are used to interact with our Video API. They are not assigned to a particular user (though of course a user does initially create one).

You will need to create the first (perhaps only) API key using our dashboard (since you need to make an authenticated request to get an API key: for the first one, you use your email and password to authenticate).

You can manage API keys by making the following requests:

Return the details of all the keys
GET /keys

Example request

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

Example response

{
"success": true,
"result": [
{
"id": "abcde12345abcde12345a",
"name": "Example key",
"type": "api",
"permissions": [],
"created_by": "abcde12345abcde12345a",
"created_time": "2021-01-01T12:00:00.000Z",
"updated_by": "abcde12345abcde12345a",
"updated_time": "2021-01-01T12:00:00.000Z"
},
...
],
"links": {},
"errors": []
}

Optional parameters

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
Return the details of a key
GET /keys/:id

Example request

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

Example response

{
"success": true,
"result": {
"id": "abcde12345abcde12345a",
"name": "Example key",
"type": "api",
"permissions": [],
"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 key
nameStringThe name given to this key
typeStringThe type of key
permissionsArrayWhat actions should this key be limited to. We currently support [] for read-write and ["fetch"] for read-only
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
Update a key
PATCH /keys/:id

The body of the request should contain one, or more, attributes that you would like to update for the key.

Example request

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

Example response

{
"success": true,
"result": {
"id": "abcde12345abcde12345a",
"name": "New name",
"type": "api",
"permissions": [],
"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 a key
DELETE /keys/:id

Example request

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

Example response

{
"success": true,
"result": {},
"links": null,
"errors": []
}
Create a key
POST /keys

Note the addition of the value field in this response. That is only revealed once, here, so please make a note of it.

Example request

curl \
-g \
-H "Authorization: Bearer YOUR-API-KEY" \
-H "Content-Type: application/json" \
-X POST \
-d '{"type":"api", "name": "Example", "permissions": []}' \
"https://api.vidbeo.com/v2/keys"

Example response

{
"success": true,
"result": {
"id": "abcde12345abcde12345a",
"name": "Example",
"type": "api",
"permissions": [],
"value": "THE-NEW-API-KEY",
"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": []
}

Required parameters

You need to provide a type (we currently only support "api"), a short name to describe it, and a value for permissions. For that value for permissions we currently support either [] to make a read/write key or ['fetch'] to make a read-only key.

KeyTypeDescription
typeStringThe type of key (we currently only support "api")
nameStringA short name for the key (1-50 characters)
permissionsArrayThe actions this key is restricted to. We currently support [] for read/write or ["fetch"] for read-only