Content Upload 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://uploads.primis.tech/api/v1/authorization/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. apiUserName
    2. apiUserCode
  3. If the apiUserName and the apiUserCode are valid, the user will get a bearer-token with TTL of 4 hours
  4. This new token will be attached to every (POST) request

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": "Garik Test Daily Dot 2243",
//"channelId": 18128,
"description": "A very descriptive summary of the video content.",
"keyWords": ["sports","highlights","2025"],
"publishStartDate": "2025-09-25 12:00:00",
"publishEndDate": "2025-10-01 12:00:00",
"language": "es",
"guid": "VE-abc1234567"
}

**The title is unique in the channel

Response

{{
"errorCode": 0,
"errorMsg": "No error",
"details": "",
"status": true,
"data": {
"uploadId": "uplembed9a1zytrixmuo",
"videoEmbedId": "embed5ff2dfxzilwn"
}
}

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",
"videoEmbedID": "embed5ff2dfxzilwn"
}
}

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