POST
/
admin
/
v0
/
files
Upload a public file
curl --request POST \
  --url https://api.tightknit.dev/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

Response

201
application/json

File uploaded successfully

The response is of type object.