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:

  1. The user will send the POST request
  2. The user will send 2 param keys with as form-data (both required)
    1. userName - users table, field=userName
    2. apiCode - users table, field=apiCode
  3. If the userName and the apiCode is valid, the user will get a token with TTL of 2 months
  4. 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

ParamSub ParamFormatResponseNotes
videoId/
channelId/
playlistId
Retrieves video/ channel/ playlist based on it’s idEach time, only one of them can be filtered
filterskey Wordscomma-separatedRetrieves a list of channels that includes any of this key word/s.Based on OR (not AND).
languagecomma-separatedRetrieves a list of channels that includes any of these language/s.Based on OR (not AND).
categorycomma-separatedRetrieves a list of channels that includes any of these category/s.Based on OR (not AND).
orientationhorizontal/vertical/mixedDefault will return all types.Based on “type” field.
guidstringwill return only the specific video
pubDate(addTimestamp)YYYY-MM-DD || YYYY-MM || YYYY
paginationnumber
Number of itemsnumber

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

FieldTypeRequiredDescription
managedUserIdintegerNoID of the user initiating the upload. Used to verify login status.
titlestringYesTitle of the video. Must be unique within the user's target folder.
descriptionstringNoA summary of the video content.
durationintegerNoDuration of the video in seconds.
publishStartDatestringNoStart date for publication in format YYYY-MM-DD HH:MM:SS.
publishEndDatestringNoEnd date for publication in format YYYY-MM-DD HH:MM:SS.
keywordsstringNoComma-separated keywords for search and categorization.
languagestringNoLanguage code of the video (e.g., en).
custom_paramsobjectNoCustom metadata parameters.
guidstringNoExternal 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


FieldRequiredDescription
uploadIdID returned from Step 1
videoFileThe 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


  1. Authenticate – Get your JWT Bearer token.
  2. Create Upload – Send metadata and receive uploadId.
  3. Upload Media – Use the uploadId to upload the video file.
  4. 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

ParamSub ParamFormatResponseNotes
playlistIdnumberRetrieves a list of existing (active) playlists or playlist, based on it’s id
filtersincludeKeyWordscomma-separatedRetrieves a list of playlists which includes any of these keyword/sBased on OR (not AND)
excludeKeyWordscomma-separatedRetrieves a list of playlists which exclude any of these keyword/sBased on OR (not AND)
languagecomma-separatedRetrieves a list of playlists which includes any of these language/sBased on OR (not AND)
categorycomma-separatedRetrieves a list of playlists which includes any of these category/sBased on OR (not AND)
orientationhorizontal/vertical/mixedDefault will return all typesBased on the “type” field
paginationnumber
Number of itemsnumber

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

ParamSub ParamFormatResponseNotes
channelIdnumberRetrieves a list of existing (active) channels or channel, based on it’s id
filterskey Wordscomma-separatedRetrieves a list of channels which includes any of this key word/s.Based on OR (not AND)
languagecomma-separatedRetrieves a list of channels which includes any of this language/s.Based on OR (not AND)
categorycomma-separatedRetrieves a list of channels which includes any of this category/s.Based on OR (not AND)
orientationhorizontal/vertical/mixedDefault will return all types.Based on the “type” field
pubDate(addTimestamp)YYYY-MM-DD || YYYY-MM || YYYY
lastModifiedDateYYYY-MM-DD || YYYY-MM || YYYYThis 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”}