stable · api · 0.1.0
Publish an available image through an approved metadata-stripping preset
POST /api/v1/file-objects/{fileObjectId}/public-assets
Capability Domain: Files Media
Authentication
projectCredential (files:write)
Scope: files:write
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" }
Request schema
application/json
{
"type": "object",
"additionalProperties": false,
"required": [
"image_preset_id"
],
"properties": {
"image_preset_id": {
"type": "string",
"format": "uuid"
}
}
}
application/json request example
{
"image_preset_id": "50000000-0000-4000-8000-000000000008"
}
Responses and errors
| Status | Description |
|---|---|
200 | Published Public Asset |
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": [
"id",
"version",
"url",
"sha256"
],
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"version": {
"type": "integer",
"minimum": 1
},
"url": {
"type": "string",
"format": "uri"
},
"sha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
}
}
}
}
}
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": {
"id": "50000000-0000-4000-8000-000000000007",
"version": 1,
"url": "https://cdn.example.test/public/lawyer-profile.png",
"sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
}
Idempotency
Retry the same File Object and approved preset with the same Idempotency-Key after a lost response.