Skip to main content
POST
/
orgs
/
{org_id}
/
files
{
  "id": "<string>",
  "file_path": "<string>",
  "file_filename": "document.pdf",
  "file_size": 1024,
  "file_mimetype": "application/pdf",
  "file_url": "<string>",
  "created_at": "2023-12-25"
}

Path Parameters

org_id
string
required

Body

CreateOrgFileSchema

file

File to be uploaded. It can be a file object, a base64 encoded string, or a file data object containing base64 data, name, and type.

file_url
string

URL of the file to be uploaded

Example:

"https://example.com/files/document.pdf"

allowed_types
string[]

The allowed mime types for the file field (e.g. image/*, application/pdf)

Maximum length: 255
visibility
enum<string>

Whether the file is private or public, private files URLs are signed with a token and can be accessed temporarily

Available options:
PUBLIC,
PRIVATE
Example:

"PRIVATE"

Response

200 - application/json

Detailed information about a file

id
string
required

Unique identifier for the file

file_path
string
required

Path to the file in the storage system

Maximum length: 2048
file_filename
string
required

Name of the file

Maximum length: 255
Example:

"document.pdf"

file_size
number
required

Size of the file in bytes

Example:

1024

file_mimetype
string
required

MIME type of the file

Maximum length: 255
Example:

"application/pdf"

file_url
string
required

URL to access the file

Maximum length: 2048
created_at
string<date> | null
required

Timestamp when the file was created