Skip to main content
POST
/
files
/
sync
Sync a public URL into a file
curl --request POST \
  --url https://api.cloudglue.dev/v1/files/sync \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "https://example.com/video.mp4",
  "metadata": {},
  "enable_segment_thumbnails": true
}
'
import requests

url = "https://api.cloudglue.dev/v1/files/sync"

payload = {
"url": "https://example.com/video.mp4",
"metadata": {},
"enable_segment_thumbnails": True
}
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({
url: 'https://example.com/video.mp4',
metadata: {},
enable_segment_thumbnails: true
})
};

fetch('https://api.cloudglue.dev/v1/files/sync', 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://api.cloudglue.dev/v1/files/sync",
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([
'url' => 'https://example.com/video.mp4',
'metadata' => [

],
'enable_segment_thumbnails' => true
]),
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://api.cloudglue.dev/v1/files/sync"

payload := strings.NewReader("{\n \"url\": \"https://example.com/video.mp4\",\n \"metadata\": {},\n \"enable_segment_thumbnails\": true\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://api.cloudglue.dev/v1/files/sync")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://example.com/video.mp4\",\n \"metadata\": {},\n \"enable_segment_thumbnails\": true\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.cloudglue.dev/v1/files/sync")

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 \"url\": \"https://example.com/video.mp4\",\n \"metadata\": {},\n \"enable_segment_thumbnails\": true\n}"

response = http.request(request)
puts response.read_body
{
  "id": "<string>",
  "uri": "<string>",
  "bytes": 123,
  "created_at": 123,
  "filename": "<string>",
  "metadata": {},
  "media_info": {
    "duration_seconds": 123,
    "width": 123,
    "height": 123,
    "sample_rate": 123,
    "channels": 123,
    "bitrate": 123,
    "format": "<string>",
    "has_audio": true
  },
  "video_info": {
    "duration_seconds": 123,
    "height": 123,
    "width": 123,
    "format": "<string>",
    "has_audio": true
  },
  "thumbnail_url": "<string>",
  "source_metadata": {
    "source_type": "grain",
    "grain_recording_id": "<string>",
    "title": "<string>",
    "start_datetime": "2023-11-07T05:31:56Z",
    "end_datetime": "2023-11-07T05:31:56Z",
    "duration_ms": 123,
    "grain_url": "<string>",
    "tags": [
      "<string>"
    ],
    "teams": [
      {
        "id": "<string>",
        "name": "<string>"
      }
    ],
    "thumbnail_url": "<string>",
    "meeting_type": {
      "id": "<string>",
      "name": "<string>",
      "scope": "<string>"
    },
    "participants": [
      {
        "id": "<string>",
        "name": "<string>",
        "email": "<string>",
        "confirmed_attendee": true,
        "hs_contact_id": "<string>"
      }
    ],
    "highlights": [
      {}
    ],
    "ai_summary": {
      "text": "<string>"
    },
    "ai_action_items": [
      {
        "timestamp_ms": 123,
        "text": "<string>",
        "assignee": {
          "id": "<string>",
          "name": "<string>",
          "user_id": "<string>"
        }
      }
    ],
    "ai_template_sections": [
      {}
    ],
    "calendar_event": {
      "ical_uid": "<string>"
    },
    "hubspot": {
      "hubspot_company_ids": [
        "<string>"
      ],
      "hubspot_deal_ids": [
        "<string>"
      ]
    }
  }
}
{
"error": "<string>"
}
{
"error": "<string>"
}
{
"error": "<string>"
}
{
"error": "<string>"
}
{
"error": "<string>"
}
{
"error": "<string>"
}
{
"error": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
url
string
required

Publicly accessible URL to sync. Accepted forms — direct http(s) file URL: https://example.com/video.mp4 · Dropbox share link: https://www.dropbox.com/scl/fi/... or https://www.dropbox.com/s/... · TikTok: https://www.tiktok.com/@user/video/<id> (and vm.tiktok.com/vt.tiktok.com short links) · Loom: https://www.loom.com/share/<id>.

Example:

"https://example.com/video.mp4"

metadata
object

Optional metadata to associate with the file. Ignored if the URL was already synced (the existing file is returned unchanged).

enable_segment_thumbnails
boolean
default:true

Whether to generate per-segment thumbnails for the file. Defaults to true, matching file upload.

Response

The synced file

id
string
required

Unique identifier for the file

status
enum<string>
required

Processing status of the file

Available options:
pending,
processing,
completed,
failed,
not_applicable
uri
string
required

Cloudglue URI for the file, to be used in other API calls

bytes
integer | null

Size of the file in bytes, null if not available

created_at
integer

Unix timestamp in milliseconds when the file was created

filename
string

Original filename

metadata
object | null

User-provided metadata about the file, null if none provided

media_type
enum<string>

Type of media file (video, audio, or image). Images are processed at the file level only (no segmentation).

Available options:
video,
audio,
image
media_info
object

Unified media information for video, audio, and image files

video_info
object

Information about the video content

thumbnail_url
string

URL of the thumbnail for the file

source
enum<string>

Source of the file

Available options:
video,
youtube,
s3,
dropbox,
http,
upload,
google-drive,
zoom,
gong,
recall,
gcs,
grain,
loom
source_metadata
object | null

Source provenance captured from the upstream connector at ingest time. Null when nothing was captured (older files, or a connector that does not yet populate it).