Skip to main content
POST
/
files
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.create({});

  console.log(result);
}

run();
{
  "object": "<string>",
  "id": "<string>",
  "kind": {},
  "upload_status": {},
  "url": {},
  "created_at": {},
  "updated_at": {},
  "filename": "<string>",
  "content_type": "<string>",
  "size": 123,
  "provider": "<string>",
  "file_url": "<string>",
  "upload_url": "<string>",
  "upload_headers": {}
}

Documentation Index

Fetch the complete documentation index at: https://docs.crevio.co/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

API key in the format: Bearer {api_token}

Body

application/json
kind
enum<string> | null

Defaults to 'file'. Set to 'external_video' to pin a YouTube, Vimeo, or Wistia URL as an embed.

Available options:
file,
external_video,
null
url
string | null

Required when kind=external_video, or for server-side URL imports of files.

filename
string | null

Required for presigned uploads. Optional for URL imports.

Response

File created

object
string
required
id
string
required
kind
object
required
upload_status
object
required
url
object
required
created_at
object
required
updated_at
object
required
filename
string
required
content_type
string
required
size
integer
required
provider
string
required
file_url
string
required
upload_url
string | null
upload_headers
object