Skip to main content
POST
/
documents
/
upload
Get presigned upload URL
curl --request POST \
  --url https://api.vocobase.com/api/v2/documents/upload \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Product FAQ.pdf",
  "file_size": 1048576,
  "mime_type": "application/pdf"
}
'
{
  "success": true,
  "data": {
    "document_id": "d1234567-abcd-1234-abcd-123456789012",
    "upload_url": "https://s3.amazonaws.com/bucket/path?X-Amz-Signature=...",
    "expires_in": 900
  }
}

Authorizations

Authorization
string
header
required

API key in format: rg_live_xxxx. Pass as a Bearer token in the Authorization header.

Body

application/json
name
string
required

Document display name.

Required string length: 1 - 100
Example:

"Product FAQ.pdf"

file_size
integer
required

File size in bytes (max 50 MB).

Required range: 1 <= x <= 52428800
Example:

1048576

mime_type
enum<string>
required

MIME type of the file.

Available options:
application/pdf,
application/vnd.openxmlformats-officedocument.wordprocessingml.document,
text/plain,
text/markdown,
image/png,
image/jpeg,
image/gif,
image/webp
Example:

"application/pdf"

Response

Upload URL generated.

success
boolean
data
object