Start an upload through a link
POST
/api/v1/shared/{token}/uploads
const url = 'http://localhost:3000/api/v1/shared/example/uploads';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"filename":"example","mime":"example","size":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:3000/api/v1/shared/example/uploads \ --header 'Content-Type: application/json' \ --data '{ "filename": "example", "mime": "example", "size": 1 }'Like POST /api/v1/uploads: PUT the bytes to uploadUrl, then hand them in.
No key needed.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”token
required
string
From an upload link
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
filename
required
string
mime
required
string
size
required
integer
Examplegenerated
{ "filename": "example", "mime": "example", "size": 1}Responses
Section titled “Responses”An upload ticket
Media typeapplication/json
object
token
required
string format: uuid
uploadUrl
required
PUT the bytes here, with the same Content-Type
string format: uri
expiresIn
required
integer
Examplegenerated
{ "token": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "uploadUrl": "https://example.com", "expiresIn": 1}default
Section titled “default”An error
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
detail
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": "example" }}