Content API
Video Content API for Primis users will contain all the data our system offers regarding videos, channels and playlists.
Authenticate
To start the process, the user must send a POST request to obtain a token.https://console.primis.tech/api/v1/credentials/authenticate (POST).
Process:
- The user will send the POST request
- The user will send 2 param keys with as form-data (both required)
- userName - users table, field=userName
- apiCode - users table, field=apiCode
- If the userName and the apiCode is valid, the user will get a token with TTL of 2 months
- This new token will be attached to every (POST) request
Get User Videos
Will return the list of your available video/s according to the filters applied - https://console.primis.tech/api/v1/videos/getVideos (POST)
Available response Fields Names:
- videoId
- videoTitle
- description
- width
- height
- duration
- thumbnailUrl
- orientation
- clickUrl
- language
- pubDate
- keyWords
- category
- guid
- scope
- channelId
- beginTime
- endTime
- iabCategories
- videoEmbedId
- videoPreviewUrl - specific page with a player (get embed code from request)
Optional filters
Param | Sub Param | Format | Response | Notes |
---|---|---|---|---|
videoId/ channelId/ playlistId | Retrieves video/ channel/ playlist based on it’s id | Each time, only one of them can be filtered | ||
filters | key Words | comma-separated | Retrieves a list of channels that includes any of this key word/s. | Based on OR (not AND). |
language | comma-separated | Retrieves a list of channels that includes any of these language/s. | Based on OR (not AND). | |
category | comma-separated | Retrieves a list of channels that includes any of these category/s. | Based on OR (not AND). | |
orientation | horizontal/vertical/mixed | Default will return all types. | Based on “type” field. | |
guid | string | will return only the specific video | ||
pubDate(addTimestamp) | YYYY-MM-DD || YYYY-MM || YYYY | |||
pagination | number | |||
Number of items | number |
Filters example
To obtain all videos in English that contain the keyword "dog", the following filters should be applied: {“category”: “dog”, ”language”: “en”}
Upload a Video
Step 1: Create Video Upload
Initializes an upload session and accepts video metadata.
Endpoint
POST https://uploads.primis.tech/api/v1/platform/channel/createVideoUpload
Headers
Content-Type: application/json
Authorization: Bearer
Example Request
{
"title": "Sample Video",
"description": "A descriptive summary of the video content.",
"duration": 120,
"publishStartDate": "2025-05-25 12:00:00",
"publishEndDate": "2025-06-01 12:00:00",
"keywords": "sports,highlights,2025",
"language": "en",
"custom_params": {},
"guid": "VE-abc1234567"
}
Minimal Example
{
"title": "Sample Video"
}
Response
{
"errorCode": 0,
"errorMsg": "No error",
"status": true,
"data": {
"uploadId": "uplembed1jhxnoikvgwq"
}
}
Body Parameters:
Request Parameters
Field | Type | Required | Description |
---|---|---|---|
managedUserId | integer | No | ID of the user initiating the upload. Used to verify login status. |
title | string | Yes | Title of the video. Must be unique within the user's target folder. |
description | string | No | A summary of the video content. |
duration | integer | No | Duration of the video in seconds. |
publishStartDate | string | No | Start date for publication in format YYYY-MM-DD HH:MM:SS . |
publishEndDate | string | No | End date for publication in format YYYY-MM-DD HH:MM:SS . |
keywords | string | No | Comma-separated keywords for search and categorization. |
language | string | No | Language code of the video (e.g., en ). |
custom_params | object | No | Custom metadata parameters. |
guid | string | No | External reference ID for the video. |
Step 2: Upload Video Media
Uploads the actual video file. This step must be called once per upload and finalizes the session.
Endpoint
POST https://uploads.primis.tech/api/v1/platform/channel/videoUploadMedia
Headers
Content-Type: multipart/form-data
Authorization: Bearer
Form Data
Field | Required | Description |
---|---|---|
uploadId | ✅ | ID returned from Step 1 |
videoFile | ✅ | The video file to upload |
Example
curl --location 'https://uploads.primis.tech/api/v1/platform/channel/videoUploadMedia'
--header 'Authorization: Bearer '
--header 'Accept: application/json'
--form 'videoFile=@/your/path/test.mp4;type=video/mp4'
--form 'uploadId="uplembed1jhxnoikvgwq"'
Success Response
{
"errorCode": 0,
"errorMsg": "No error",
"status": true,
"data": {
"uploadId": "uplembed1jhxnoikvgwq",
"videoId": "vid12345abc"
}
}
Failure Example
{
"errorCode": 454,
"errorMsg": "Data Is Not Ready",
"details": "Upload is closed, create a new one",
"status": false,
"data": ""
}
Upload Flow Summary
- Authenticate – Get your JWT Bearer token.
- Create Upload – Send metadata and receive uploadId.
- Upload Media – Use the uploadId to upload the video file.
- Done – Get a videoId in the final response
Get User Playlist
Will return the list of your available playlist/s according to the filters applied -https://console.primis.tech/api/v1/playlists/getPlaylists (POST)
Available response Fields Names:
- playlistId
- playlistName
- playlistLength
- extrenalContextualMathcing(Yes/No)
- orientation
- categories
- includeKeyWords
- excludeKeyWords
- languages
- playlistEmbedId
The API won’t display playlists with contextual matching.
Optional filters
Param | Sub Param | Format | Response | Notes |
---|---|---|---|---|
playlistId | number | Retrieves a list of existing (active) playlists or playlist, based on it’s id | ||
filters | includeKeyWords | comma-separated | Retrieves a list of playlists which includes any of these keyword/s | Based on OR (not AND) |
excludeKeyWords | comma-separated | Retrieves a list of playlists which exclude any of these keyword/s | Based on OR (not AND) | |
language | comma-separated | Retrieves a list of playlists which includes any of these language/s | Based on OR (not AND) | |
category | comma-separated | Retrieves a list of playlists which includes any of these category/s | Based on OR (not AND) | |
orientation | horizontal/vertical/mixed | Default will return all types | Based on the “type” field | |
pagination | number | |||
Number of items | number |
Filters specification
- All filter types assigned with “AND” logic
- Inactive/deleted playlists are filtered out as default
- There is no meaning to the filters parameters when a playlist id is specified
Filters example
To obtain all playlists that exclude the keyword "cars" with orientation "horizontal", the following filters should be applied: {“excludeKeyWords”: “cars”,”orientation”: “horizontal”}
Get User Channels
Will return the list of your available Channel/s according to the filters applied -https://console.primis.tech/api/v1/channels/getChannels (POST)
Available response Fields Names:
- channelId
- channelName
- scope
- categorykeyWords
- sourceUrl
- videoSourceType
- applicableForContexualMatching
- language
- captions
- pubDate
- orientationContributorName
- domainsFilter
- geosFilter
- duration
- totalVideos
- lastModifiedDate
- views
- geosList
Optional filters
Param | Sub Param | Format | Response | Notes |
---|---|---|---|---|
channelId | number | Retrieves a list of existing (active) channels or channel, based on it’s id | ||
filters | key Words | comma-separated | Retrieves a list of channels which includes any of this key word/s. | Based on OR (not AND) |
language | comma-separated | Retrieves a list of channels which includes any of this language/s. | Based on OR (not AND) | |
category | comma-separated | Retrieves a list of channels which includes any of this category/s. | Based on OR (not AND) | |
orientation | horizontal/vertical/mixed | Default will return all types. | Based on the “type” field | |
pubDate(addTimestamp) | YYYY-MM-DD || YYYY-MM || YYYY | |||
lastModifiedDate | YYYY-MM-DD || YYYY-MM || YYYY | This is generated field |
Filters specification:
- All filter types assigned with “AND” logic
- Inactive/deleted channels are filtered out as default
Filters example
In order to obtain all channels containing the keywords "food" with orientation "mixed", the following filters should be applied: {“includeKeyWords”: “food”,”orientation”: “mixed”}
Updated 3 days ago