curl --request POST \
--url https://descriptapi.com/v1/jobs/import/drive_media \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"add_media": {},
"folder_id": "<string>",
"callback_url": "<string>"
}
'import requests
url = "https://descriptapi.com/v1/jobs/import/drive_media"
payload = {
"add_media": {},
"folder_id": "<string>",
"callback_url": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({add_media: {}, folder_id: '<string>', callback_url: '<string>'})
};
fetch('https://descriptapi.com/v1/jobs/import/drive_media', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://descriptapi.com/v1/jobs/import/drive_media",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'add_media' => [
],
'folder_id' => '<string>',
'callback_url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://descriptapi.com/v1/jobs/import/drive_media"
payload := strings.NewReader("{\n \"add_media\": {},\n \"folder_id\": \"<string>\",\n \"callback_url\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://descriptapi.com/v1/jobs/import/drive_media")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"add_media\": {},\n \"folder_id\": \"<string>\",\n \"callback_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://descriptapi.com/v1/jobs/import/drive_media")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"add_media\": {},\n \"folder_id\": \"<string>\",\n \"callback_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"job_id": "<string>",
"drive_id": "<string>",
"folder_id": "<string>",
"drive_name": "My Team Workspace",
"upload_urls": {}
}Import media to drive library
Import media files into the drive media library (shared workspace-level media collection).
Unlike project media import, this endpoint adds files to the drive’s shared media library rather than to a specific project. Files can optionally be placed in a folder.
Media URL requirements
- URLs must be accessible by Descript servers
- URLs must support HTTP Range requests
- Recommended to sign URLs for 12-48 hours to reduce chance of failure
- Supported file types: the API accepts more containers and codecs than the app, including MXF, MPEG-TS, and AVI
Direct file upload
Instead of providing a URL, you can upload files directly by specifying content_type and file_size for a media item. The response will include a signed upload_url for each direct upload item. PUT the file bytes to that URL, and the import job will process it automatically. See the Direct file upload guide for a full walkthrough.
Async Operations
Imports run in the background and return a job_id. Monitor progress via the GET /jobs/ endpoint.
Dynamic webhook
If callback_url is provided, Descript will POST the job status to that URL when the job finishes (successfully or not).
curl --request POST \
--url https://descriptapi.com/v1/jobs/import/drive_media \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"add_media": {},
"folder_id": "<string>",
"callback_url": "<string>"
}
'import requests
url = "https://descriptapi.com/v1/jobs/import/drive_media"
payload = {
"add_media": {},
"folder_id": "<string>",
"callback_url": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({add_media: {}, folder_id: '<string>', callback_url: '<string>'})
};
fetch('https://descriptapi.com/v1/jobs/import/drive_media', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://descriptapi.com/v1/jobs/import/drive_media",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'add_media' => [
],
'folder_id' => '<string>',
'callback_url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://descriptapi.com/v1/jobs/import/drive_media"
payload := strings.NewReader("{\n \"add_media\": {},\n \"folder_id\": \"<string>\",\n \"callback_url\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://descriptapi.com/v1/jobs/import/drive_media")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"add_media\": {},\n \"folder_id\": \"<string>\",\n \"callback_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://descriptapi.com/v1/jobs/import/drive_media")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"add_media\": {},\n \"folder_id\": \"<string>\",\n \"callback_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"job_id": "<string>",
"drive_id": "<string>",
"folder_id": "<string>",
"drive_name": "My Team Workspace",
"upload_urls": {}
}Authorizations
Body
Response
Job created

