Presign a download URL
const url = 'https://example.com/api/v1/orgs/example/buckets/example/objects/download-url?disposition=attachment&key=example';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://example.com/api/v1/orgs/example/buckets/example/objects/download-url?disposition=attachment&key=example' \ --header 'Authorization: Bearer <token>'Returns a short-lived (15 minute) presigned S3 GET URL for downloading the object directly. Requires read capability on the bucket.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Organization ID.
Bucket ID.
Query Parameters
Section titled “Query Parameters”inline lets a browser show PDF, .txt and .md objects instead of saving them, and sets the response type from the extension. Other objects always download.
Object key to presign relative to the bucket’s basePath.
Responses
Section titled “Responses”Presigned download URL
object
Example generated
{ "url": "example"}Invalid request input or rule violation.
Error returned when request input fails schema validation or violates a domain rule.
object
object
Field-level validation failures, present when schema validation fails.
object
Dot-separated field path.
Human-readable error explanation.
Example
{ "code": "BAD_REQUEST"}Authentication required or credentials invalid.
Standard REST error envelope.
object
Machine-readable error code.
Optional structured error details.
Human-readable error explanation.
Example generated
{ "code": "example", "data": "example", "message": "example"}Insufficient role, bucket grant, or token scope.
Standard REST error envelope.
object
Machine-readable error code.
Optional structured error details.
Human-readable error explanation.
Example generated
{ "code": "example", "data": "example", "message": "example"}Resource not found.
Standard REST error envelope.
object
Machine-readable error code.
Optional structured error details.
Human-readable error explanation.
Example generated
{ "code": "example", "data": "example", "message": "example"}Unexpected server error. Quote data.requestId when you report it.
Error returned when Sendcrate or one of its providers fails (5xx).
object
object
Error chain with stack traces. Present only when the server runs in development mode.
Request reference to quote when you report the error.
Human-readable error explanation.
Example
{ "code": "INTERNAL_SERVER_ERROR"}