Preview: these APIs are still being designed and aren't available yet.
Skip to Content
UpskyDocs
API reference

Create a file

Reserves a file and returns a link to upload it to.

POST
/storage/files

Reserves a file and returns a link to upload it to.

Authorization

apiKey
headerAuthorizationBearer <token>

Request Body

application/json
  1. body
name*string
content_type*string
size*integer

Size in bytes.

Response Body

The new file and its upload link.

application/json
  1. response
id*string
name*string
content_type*string
size*integer
status*string
Value in"pending""uploaded"
upload_url*string
Formaturi
Example Request
curl -X POST 'https://api.upsky.dev/v1/storage/files' \  -H 'Content-Type: application/json' \  -d '{  "name": "string",  "content_type": "string",  "size": 0}'
Example Response
{  "id": "string",  "name": "string",  "content_type": "string",  "size": 0,  "status": "pending",  "upload_url": "http://example.com"}