Create API Keys
Developing
POST
/api-keys
Create API key
{
"name": "Sample API Key2",
"origin": "http://example.com",
"permissions": "{\"video.read\":true,\"video.write\":false,\"video.delete\":true}",
"expires_at": "2024-05-16T00:00:00Z"
}
name
: A required string field for the API key name with a length between 2 and 255 charactersorigin
: a required field which contains the domainpermissions
: A required field which contains all the permissionsexpires_at
: A required field which contains the expired time/v1/api-keys
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.vidinfra.com/v1/api-keys' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Raka API Key1",
"origin": "http://ahmedraka.com",
"permissions": [
{
"entity_id": "f32a0116-fe11-454c-8e6a-5ff4101882e5",
"entity_type": "projects",
"name": "custom",
"action": "",
"permission": [
{
"action": "custom",
"folders": [
{
"action": "write+read+delete",
"folder_id": "6e4f9469-fbbe-48c7-adb4-9f67ea3bac1a"
}
],
"name": "folders"
},
{
"action": "write+read+delete",
"name": "livestreams"
},
{
"action": "write+read+delete",
"name": "analytics"
},
{
"action": "write+read+delete",
"name": "advertisements"
},
{
"action": "write+read",
"name": "settings"
}
]
},
{
"entity_id": "0a4a7720-c50d-475d-b4af-4a58f3847d7d",
"entity_type": "organizations",
"name": "billing",
"action": "write+read",
"permission": []
},
{
"entity_id": "0a4a7720-c50d-475d-b4af-4a58f3847d7d",
"entity_type": "organizations",
"name": "api",
"action": "write+read",
"permission": []
}],
"expires_at": "2024-05-16T00:00:00Z"
}'
Response Response Example
200 - Success - Example 1
{}
Request
Body Params application/json
Responses
Modified at 2025-06-19 04:59:01