Workspace

Create file

Create a new file.

post/orgs/files

Request

  • Base URL: https://api.useinvent.com
  • URL: https://api.useinvent.com/orgs/files
  • Auth: HTTP bearer

Request body

file_urlstring

URL of the file to be uploaded

allowed_typesstring[]

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

visibility'PUBLIC' | 'PRIVATE'

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

Example request

{
  "file": {
    "data": "SGVsbG8sIHdvcmxkIQ==",
    "type": "application/pdf",
    "name": "document.pdf",
    "encoding": "base64"
  },
  "file_url": "https://example.com/files/document.pdf",
  "visibility": "PRIVATE"
}

Response

idstring required

Unique identifier for the file

file_pathstring required

Path to the file in the storage system

file_filenamestring required

Name of the file

file_sizenumber required

Size of the file in bytes

file_mimetypestring required

MIME type of the file

file_urlstring required

URL to access the file

created_atstring date-time nullable required

Timestamp when the file was created

Example response

{
  "file_filename": "document.pdf",
  "file_size": 1024,
  "file_mimetype": "application/pdf"
}

Changes

No recorded changes to this operation across all 1 revision of this API.