Skip to main content
PATCH
/
files
/
{id}
Typescript (SDK)
import { Crevio } from "@crevio/sdk";

const crevio = new Crevio({
  apiKey: process.env["CREVIO_API_KEY"] ?? "",
});

async function run() {
  const result = await crevio.files.update({
    id: "<id>",
    fileUpdateRequest: {},
  });

  console.log(result);
}

run();
{
  "object": "<string>",
  "id": "<string>",
  "title": "<string>",
  "description": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "url": "<string>",
  "tags": [
    "<string>"
  ],
  "source_job_id": "<string>",
  "filename": "<string>",
  "content_type": "<string>",
  "size": 123,
  "provider": "<string>",
  "file_url": "<string>"
}

Authorizations

Authorization
string
header
required

API key in the format: Bearer {api_token}

Path Parameters

id
string
required

File ID (e.g., "file_abc123")

Body

application/json
title
string | null

Human-readable display title. Pass null to clear it.

filename
string | null

Rename the file (updates the stored blob filename). Files only.

description
string | null

Free-text description. Pass null to clear it.

tags
string[] | null

Replaces the tag list. Pass an empty array to clear all tags.

url
string | null

New source URL for an external-video embed (YouTube, Vimeo, or Wistia).

Response

Updated file

object
string
required
id
string
required
kind
enum<string>
required
Available options:
file,
external_video
upload_status
enum<string>
required
Available options:
pending,
processing,
ready,
failed
source
enum<string>
required
Available options:
upload,
url_import,
external_video,
generation
title
string | null
required
description
string | null
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
url
string | null
required
tags
string[] | null
required
source_job_id
string | null
required
filename
string | null
required
content_type
string | null
required
size
integer | null
required
provider
string | null
required
file_url
string | null
required