Projects

Update a Project

Update a Project

Update an existing project. Send the full options payload you want the project to keep, including AI options when applicable.

PUT https://api.dyntube.com/v1/projects/{id}

Headers

Name / Type / Description
NameTypeDescription
AuthorizationStringBearer YOUR_API_KEY
Content-TypeStringapplication/json

Send the request body as application/json. The example below shows the expected payload.

Request Body (key fields)

Name / Type / Required / Description
NameTypeRequiredDescription
nameString✅Project name
descriptionString❌Project description
regionString✅Region code (e.g., use-s)
planTypeInteger✅1 for Standard
optionsObject✅Transcode/storage options
videoOptionsObject❌Default player settings for videos in this project
aiOptionsObject❌AI transcription and translation settings for new and existing videos in this project

AI Options

Use aiOptions to enable or update automatic captions and translations for the project.

Name / Type / Required / Description
NameTypeRequiredDescription
aiOptions.originalLanguageString❌Primary spoken language in the original videos. Defaults to en.
aiOptions.transcription.enabledBoolean❌Generate captions automatically for new videos.
aiOptions.translationsArray❌Translation languages to generate after transcription completes. Each item should include language.
aiOptions.transcribeOldVideosBoolean❌Also queue existing videos in the project for transcription. Videos that already have captions are skipped.

For supported originalLanguage and translation language values, see AI Language Codes.

200: OK

Project updated successfully.

Sample Request Body

Here is a sample JSON request to update a project.

{ "id": "MgLVvAV7", "key": "Qss0qX27ZQ", "name": "Videos", "description": "", "region": "usw-s", "planType": 1, "options": { "convertToHls": true, "convertToMp4": false, "convertToOneMp4": true, "useOriginalMp4": false, "hlsEncrypt": false, "bitrate240p": 400, "bitrate360p": 1200, "bitrate540p": 1800, "bitrate720p": 3750, "bitrate1080p": 5625, "bitrate1440p": 0, "bitrate2160p": 0, "saveOriginalVideos": false }, "videoOptions": { "autoplay": false, "playerSkin": "solid", "controlsColor": "", "primaryColor": "", "seekButtons": false, "volumeControl": true, "preload": "auto", "fullscreenControl": true, "controls": true, "captionsOn": false, "bigPlayControl": true, "defaultQuality": "", "qualityControl": true, "speedControl": true, "fastForward": true, "volume": 1.0, "loop": false, "muted": false, "landscapeFullscreen": false, "modal": false, "resumePlayback": false, "hideLogo": false, "cast": true, "extraSecurity": false, "stickyPlayer": false, "pauseOnScroll": false, "storeAuth": false, "contextMenu": false }, "aiOptions": { "originalLanguage": "en", "transcription": { "enabled": true }, "translations": [ { "language": "es" }, { "language": "fr" } ], "transcribeOldVideos": false }, "status": 1, "created": "2020-05-27T07:47:52.362+00:00", "updated": "2020-05-27T07:47:52.362+00:00" }

C# Sample

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

namespace ProjectUpdate
{
    class Program
    {
        private static readonly HttpClient client = new HttpClient();

        static async Task Main(string[] args)
        {
            client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "your_bearer_token");

            var id = "MgLVvAV7";
            var url = "https://api.dyntube.com/v1/projects/" + id;

            var data = new
            {
                name = "New Name",
                description = "New Description",
                region = "usw-s",
                planType = 1,
                options = new
                {
                    convertToHls = true,
                    convertToMp4 = false,
                    convertToOneMp4 = true,
                    useOriginalMp4 = false,
                    hlsEncrypt = false,
                    bitrate240p = 400,
                    bitrate360p = 1200,
                    bitrate540p = 1800,
                    bitrate720p = 3750,
                    bitrate1080p = 5625,
                    bitrate1440p = 0,
                    bitrate2160p = 0,
                    saveOriginalVideos = false
                },
                videoOptions = new
                {
                    autoplay = false,
                    playerSkin = "solid",
                    controlsColor = "",
                    primaryColor = "",
                    seekButtons = false,
                    volumeControl = true,
                    preload = "auto",
                    fullscreenControl = true,
                    controls = true,
                    captionsOn = false,
                    bigPlayControl = true,
                    defaultQuality = "",
                    qualityControl = true,
                    speedControl = true,
                    fastForward = true,
                    volume = 1.0,
                    loop = false,
                    muted = false,
                    landscapeFullscreen = false,
                    modal = false,
                    resumePlayback = false,
                    hideLogo = false,
                    cast = true,
                    extraSecurity = false,
                    stickyPlayer = false,
                    pauseOnScroll = false,
                    storeAuth = false,
                    contextMenu = false
                },
                aiOptions = new
                {
                    originalLanguage = "en",
                    transcription = new
                    {
                        enabled = true
                    },
                    translations = new[]
                    {
                        new { language = "es" },
                        new { language = "fr" }
                    },
                    transcribeOldVideos = false
                }
            };

            var request = new HttpRequestMessage
            {
                Method = HttpMethod.Put,
                RequestUri = new Uri(url),
                Content = new StringContent(JsonSerializer.Serialize(data), System.Text.Encoding.UTF8, "application/json")
            };

            var response = await client.SendAsync(request);

            if (response.IsSuccessStatusCode)
            {
                Console.WriteLine("Project updated successfully.");
            }
            else
            {
                var body = await response.Content.ReadAsStringAsync();
                Console.WriteLine($"Project update failed: {(int)response.StatusCode} {body}");
            }
        }
    }
}

Node.js Sample

javascript
const axios = require('axios');

async function updateProject(projectId, bearerToken, name, description, region, planType, options, videoOptions, aiOptions, status) {
  const url = `https://api.dyntube.com/v1/projects/${projectId}`;

  const payload = {
    name,
    description,
    region,
    planType,
    options,
    videoOptions,
    aiOptions,
    status
  };

  try {
    const response = await axios.put(url, payload, {
      headers: {
        Authorization: `Bearer ${bearerToken}`
      }
    });
    console.log(`Project with ID ${projectId} updated successfully`);
    console.log(response.data);
  } catch (error) {
    console.error(`Failed to update project with ID ${projectId}: ${error}`);
  }
}

updateProject(
  'MgLVvAV7',
  'your_bearer_token',
  'My Videos',
  '',
  'usw-s',
  1,
  {
    convertToHls: true,
    convertToMp4: false,
    convertToOneMp4: true,
    useOriginalMp4: false,
    hlsEncrypt: false,
    bitrate240p: 400,
    bitrate360p: 1200,
    bitrate540p: 1800,
    bitrate720p: 3750,
    bitrate1080p: 5625,
    bitrate1440p: 0,
    bitrate2160p: 0,
    saveOriginalVideos: false
  },
  {
    autoplay: false,
    playerSkin: 'solid',
    controlsColor: '',
    primaryColor: '',
    seekButtons: false,
    volumeControl: true,
    preload: 'auto',
    fullscreenControl: true,
    controls: true,
    captionsOn: false,
    bigPlayControl: true,
    defaultQuality: '',
    qualityControl: true,
    speedControl: true,
    fastForward: true,
    volume: 1.0,
    loop: false,
    muted: false,
    landscapeFullscreen: false,
    modal: false,
    resumePlayback: false,
    hideLogo: false,
    cast: true,
    extraSecurity: false,
    stickyPlayer: false,
    pauseOnScroll: false,
    storeAuth: false,
    contextMenu: false
  },
  {
    originalLanguage: 'en',
    transcription: {
      enabled: true
    },
    translations: [
      { language: 'es' },
      { language: 'fr' }
    ],
    transcribeOldVideos: false
  },
  1
);

Python

python
import requests
import json

bearer_token = "your_bearer_token"
project_id = "your_project_id"
url = f"https://api.dyntube.com/v1/projects/{project_id}"

headers = {
    "Authorization": f"Bearer {bearer_token}",
    "Content-Type": "application/json"
}

data = {
    "name": "New Project Name",
    "description": "New Project Description",
    "region": "usw-s",
    "planType": 1,
    "options": {
        "convertToHls": True,
        "convertToMp4": False,
        "convertToOneMp4": True,
        "useOriginalMp4": False,
        "hlsEncrypt": False,
        "bitrate240p": 400,
        "bitrate360p": 1200,
        "bitrate540p": 1800,
        "bitrate720p": 3750,
        "bitrate1080p": 5625,
        "bitrate1440p": 0,
        "bitrate2160p": 0,
        "saveOriginalVideos": False
    },
    "videoOptions": {
        "autoplay": False,
        "playerSkin": "solid",
        "controlsColor": "",
        "primaryColor": "",
        "seekButtons": False,
        "volumeControl": True,
        "preload": "auto",
        "fullscreenControl": True,
        "controls": True,
        "captionsOn": False,
        "bigPlayControl": True,
        "defaultQuality": "",
        "qualityControl": True,
        "speedControl": True,
        "fastForward": True,
        "volume": 1.0,
        "loop": False,
        "muted": False,
        "landscapeFullscreen": False,
        "modal": False,
        "resumePlayback": False,
        "hideLogo": False,
        "cast": True,
        "extraSecurity": False,
        "stickyPlayer": False,
        "pauseOnScroll": False,
        "storeAuth": False,
        "contextMenu": False
    },
    "aiOptions": {
        "originalLanguage": "en",
        "transcription": {
            "enabled": True
        },
        "translations": [
            { "language": "es" },
            { "language": "fr" }
        ],
        "transcribeOldVideos": False
    }
}

response = requests.put(url, headers=headers, data=json.dumps(data))

if response.status_code == 200:
    print("Project updated successfully.")
else:
    print(f"Error updating project. Status code: {response.status_code}")

PHP

php
<?php

$projectId = "your_project_id";
$bearerToken = "your_bearer_token";
$remoteServerUrl = "https://api.dyntube.com/v1/projects/$projectId";

// Create the request payload
$data = array(
    'name' => 'New Project Name',
    'description' => 'New Project Description',
    'region' => 'use-s',
    'planType' => 1,
    'options' => array(
        'convertToHls' => true,
        'convertToMp4' => false,
        'convertToOneMp4' => true,
        'useOriginalMp4' => false,
        'hlsEncrypt' => false,
        'bitrate240p' => 400,
        'bitrate360p' => 1200,
        'bitrate540p' => 1800,
        'bitrate720p' => 3750,
        'bitrate1080p' => 5625,
        'bitrate1440p' => 0,
        'bitrate2160p' => 0,
        'saveOriginalVideos' => false
    ),
    'videoOptions' => array(
        'autoplay' => false,
        'playerSkin' => 'solid',
        'controlsColor' => '',
        'primaryColor' => '',
        'seekButtons' => false,
        'volumeControl' => true,
        'preload' => 'auto',
        'fullscreenControl' => true,
        'controls' => true,
        'captionsOn' => false,
        'bigPlayControl' => true,
        'defaultQuality' => '',
        'qualityControl' => true,
        'speedControl' => true,
        'fastForward' => true,
        'volume' => 1.0,
        'loop' => false,
        'muted' => false,
        'landscapeFullscreen' => false,
        'modal' => false,
        'resumePlayback' => false,
        'hideLogo' => false,
        'cast' => true,
        'extraSecurity' => false,
        'stickyPlayer' => false,
        'pauseOnScroll' => false,
        'storeAuth' => false,
        'contextMenu' => false
    ),
    'aiOptions' => array(
        'originalLanguage' => 'en',
        'transcription' => array(
            'enabled' => true
        ),
        'translations' => array(
            array('language' => 'es'),
            array('language' => 'fr')
        ),
        'transcribeOldVideos' => false
    )
);

// Encode the data as JSON
$data_json = json_encode($data);

// Set the HTTP headers
$headers = array(
    'Content-Type: application/json',
    'Authorization: Bearer ' . $bearerToken
);

// Set up the cURL request
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $remoteServerUrl);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_json);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

// Execute the request and get the response
$response = curl_exec($ch);

// Check the response status code
$http_status_code = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
if ($http_status_code == 200) {
    echo "Project updated successfully.\n";
} else {
    echo "Project update failed with status code: " . $http_status_code . "\n";
}

// Close the cURL session
curl_close($ch);

Common Next Steps

After updating a project, use the related endpoints below depending on what changed:

  • Upload a video by file to use the project settings for new uploads.
  • Move videos between projects if existing videos should use a different project.
  • AI Language Codes when updating transcription or translation language settings.

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