Content Upload API
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:
- The user will send the POST request
- The user will send 2 param keys with as form-data (both required)
- apiUserName
- apiUserCode
- If the apiUserName and the apiUserCode are valid, the user will get a bearer-token with TTL of 4 hours
- 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 <your-token>
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
| 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 <your-token>
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 <your-token>'
--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
- 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
Updated 7 months ago