stable · api · 0.1.0
Upload bytes with a single-use grant
PUT /api/v1/file-uploads/{uploadToken}
Capability Domain: Files Media
Authentication
No authentication required
Scope: None
Parameters and request body
-
uploadToken— path, requireduploadToken schema { "type": "string", "pattern": "^[a-f0-9]{64}$" }
Request schema
application/octet-stream
{
"type": "string",
"format": "binary"
}
text/plain
{
"type": "string",
"format": "binary"
}
image/jpeg
{
"type": "string",
"format": "binary"
}
image/gif
{
"type": "string",
"format": "binary"
}
image/png
{
"type": "string",
"format": "binary"
}
application/pdf
{
"type": "string",
"format": "binary"
}
application/octet-stream request example
"<binary bytes matching the declared SHA-256>"
Responses and errors
| Status | Description |
|---|---|
200 | Uploaded quarantined File Object |
422 | Request violates the public contract |
200 schema
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "object",
"required": [
"file_object_id"
],
"properties": {
"file_object_id": {
"type": "string",
"format": "uuid"
}
}
}
}
}
422 schema
{
"type": "object",
"required": [
"error"
],
"properties": {
"error": {
"type": "object",
"required": [
"code",
"message",
"retryable",
"correlation_id",
"details"
],
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"retryable": {
"type": "boolean"
},
"correlation_id": {
"type": "string",
"format": "uuid"
},
"details": {
"type": "object"
}
}
}
}
}
200 example
{
"data": {
"file_object_id": "50000000-0000-4000-8000-000000000005"
}
}
Idempotency
The upload token is single-use; obtain a new grant after an uncertain upload.