Videos

Video Upload via URL (Server-Side)

Provide a direct source URL and let DynTube import the remote video.

API URL

Upload Video via URL

If you have a remote URL of a file, you can provide the URL to upload your video to DynTube.

  • The process is the same as uploading a normal file but instead of providing a file input, you can provide a field named url
  • Submit the multipart form to the following endpoint.
  • The Content-Type should be multipart/form-data.
  • You can optionally provide other fields, such as projectId, planType, and videoId.

Replace an Existing Video

To replace an existing video, include the videoId parameter in the upload request. The optional parameters supported by the upload methods above can be used in the same request.

API Request

POST https://upload.dyntube.com/v1/videos

Headers

Name / Type / Description
NameTypeDescription
AuthorizationStringBearer YOUR_API_KEY

Request Body

Name / Type / Description
NameTypeDescription
url*StringRemote video URL (multipart/form-data field url)
projectIdStringProject ID
planTypeIntegerSee more details here
titleStringVideo Title
videoIdStringTo replace an existing video (optional)
descriptionStringVideo description
tagsStringVideo tags, add multiple tags by adding the 'tags' field multiple times in your POST request with different values.
uploadIdStringOptional client-generated id to track the upload

Response

200: OK

example
{
    "videoKey": "hgor6PnFQ",
    "uploadId": "3060c035-95ec-76495564",
    "videoId": "DTQ5It1KwNg",
    "channelKey": "u3u0iNPlL1Bg",
    "privateLink": "pheF3ukFQQ",
    "iframeLink": "klGiWrxW0nPzxw"
}

Code samples

Node.js

javascript
import FormData from 'form-data';
import axios from 'axios';

const form = new FormData();
form.append('url', 'https://domain.com/video.mp4');

const res = await axios.post('https://upload.dyntube.com/v1/videos', form, {
  headers: {
    Authorization: 'Bearer YOUR_API_KEY',
    ...form.getHeaders()
  }
});
console.log(res.data);

Python

python
import requests

url = "https://upload.dyntube.com/v1/videos"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
data = {"url": "https://domain.com/video.mp4"}

resp = requests.post(url, headers=headers, data=data)
resp.raise_for_status()
print(resp.json())

C#

csharp
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;

var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "YOUR_API_KEY");

var form = new MultipartFormDataContent
{
    { new StringContent("https://domain.com/video.mp4"), "url" }
};

var response = await client.PostAsync("https://upload.dyntube.com/v1/videos", form);
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();

PHP

php
<?php
$ch = curl_init("https://upload.dyntube.com/v1/videos");
$headers = ["Authorization: Bearer YOUR_API_KEY"];

$data = [
  'url' => 'https://domain.com/video.mp4'
];

curl_setopt_array($ch, [
  CURLOPT_POST => true,
  CURLOPT_POSTFIELDS => $data,
  CURLOPT_HTTPHEADER => $headers,
  CURLOPT_RETURNTRANSFER => true
]);

$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

if ($status >= 200 && $status < 300) {
  echo $response;
} else {
  echo "Upload failed, status: $status";
}

Notes

  • Use videoId to replace an existing video; otherwise a new video is created.
  • Accepts either url or file; for URL uploads send url as multipart form-data.

Common Next Steps

After starting a URL upload, use these endpoints to continue:

  • Get video status to poll transcoding progress.
  • Get video to retrieve playback URLs and embed fields after publishing.
  • Update video to change title, description, tags, or player options.
  • Setting up webhooks to receive publish notifications automatically.

Something missing or wrong here? Tell us and we will correct it. New to DynTube? Start with uploading and embedding.