Skip to main content
POST
/
admin
/
v0
/
files
Upload a public file
curl --request POST \
  --url https://api.tightknit.ai/admin/v0/files \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'file={}' \
  --form filename=otter.png \
  --form 'description=This is a picture of an otter' \
  --form size=1024
{
  "success": true,
  "data": {
    "id": "12345678-90ab-cdef-1234-567890ab",
    "created_at": "2024-02-01 04:04:39.198523+00",
    "name": "my-file.png",
    "title": "My File",
    "size": 1024,
    "mimetype": "image/png",
    "url": "https://example.com/my-file.png"
  }
}

Authorizations

Authorization
string
header
required

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

Body

multipart/form-data
file
object
required

The file to upload

filename
string
required

The target name given to the file when it is uploaded to storage, including the file extension

Required string length: 1 - 255
Example:

"otter.png"

size
number
required

The size of the file being uploaded in bytes

Required range: x >= 1
Example:

1024

description
string

A concise description (or alt text) of the file being uploaded

Example:

"This is a picture of an otter"

Response

File uploaded successfully

success
boolean
required
data
object
required

Tightknit File

I