stable · api · 0.1.0
Create a short-lived authorized private download grant
POST /api/v1/file-objects/{fileObjectId}/download-grants
Capability Domain: Files Media
Authentication
projectCredential (files:read)
Scope: files:read
Parameters and request body
-
fileObjectId— path, requiredfileObjectId schema { "type": "string", "format": "uuid" } -
Idempotency-Key— header, requiredIdempotency-Key schema { "type": "string", "maxLength": 120 } -
X-Correlation-ID— header, optionalX-Correlation-ID schema { "type": "string", "format": "uuid" }
Responses and errors
| Status | Description |
|---|---|
200 | Short-lived download grant |
401 | Invalid or revoked Project Credential |
403 | Project Credential lacks the required scope |
422 | Request violates the public contract |
200 schema
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "object",
"required": [
"grant_id",
"download_url",
"expires_at"
],
"properties": {
"grant_id": {
"type": "string",
"format": "uuid"
},
"download_url": {
"type": "string",
"format": "uri"
},
"expires_at": {
"type": "string",
"format": "date-time"
}
}
}
}
}
401 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"
}
}
}
}
}
403 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"
}
}
}
}
}
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": {
"grant_id": "50000000-0000-4000-8000-000000000006",
"download_url": "https://storage.example.test/private-download",
"expires_at": "2026-08-09T13:00:00Z"
}
}
Idempotency
Retry with the same Idempotency-Key for the same File Object after a lost response.