Skip to main content

Files API

Files endpoints exposed by the Devotel CPaaS API Base path: /api/v1/files Endpoint count: 5

List files

GET /api/v1/files/
Lists uploaded files for the tenant with cursor-based pagination. Each row carries a fresh 1-hour signed read URL.
cursor
string
Opaque cursor for the next page (from previous response meta.pagination.cursor)
limit
integer
Number of items per page (1–200, default 25)

Get a file by ID

GET /api/v1/files/{id}
Returns metadata + a fresh 1-hour signed read URL for a single file. Responds 404 when the file ID does not exist in the tenant namespace.
id
string
required
Resource identifier

Presign a file URL

GET /api/v1/files/{id}/presign
Mints a fresh S3-style presigned read URL for an existing object with a caller-controlled lifetime. Pass ttl_ms (60000..604800000 / 1 minute..7 days); omit for the conservative 1-hour default. Responds 404 when the file ID does not exist in the tenant namespace.
id
string
required
Resource identifier
ttl_ms
integer
Signed-URL lifetime in milliseconds (clamped to a 60000 floor / 604800000 ceiling). Omit for the 1-hour default.

Upload a file

POST /api/v1/files/upload
Uploads a single file (multipart/form-data, field name file) to the tenant media bucket and returns a signed read URL. The signed URL defaults to a 1-hour TTL; pass ttl_ms to pin a longer-lived URL (capped at 7 days, the GCS V4-signing maximum). Mime type must be in the server allow-list; oversized uploads return 413.
ttl_ms
integer
Signed-URL lifetime in milliseconds (1..604800000 / 7 days). Omit for the conservative 1-hour default.

Delete a file

DELETE /api/v1/files/{id}
Deletes a file from the tenant media bucket. Returns 204 on success and 404 when the file ID does not exist in the tenant namespace.
id
string
required
Resource identifier