Skip to content

Publish Asset

Publishes a confirmed asset to the public CDN. The file is copied from the private storage bucket to the public AWS S3 bucket and served via CloudFront. Once published, the asset receives a public_url for global delivery.

POST /v1/assets/{asset_id}/publish
assets:write

Path Parameters

ParameterTypeRequiredDescription
asset_idstringYesThe unique identifier of the asset (UUID). Must be in confirmed status.

Request Examples

Terminal window
curl -X POST https://xqr.co/api/v1/assets/a1b2c3d4-e5f6-7890-abcd-ef1234567890/publish \
-H "Authorization: Bearer xqr_pk_a1b2c3d4.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

Response

200 OK

The asset object, now including the public CDN URL.

{
"data": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"filename": "logo.png",
"mime_type": "image/png",
"file_size": 48210,
"status": "confirmed",
"is_public": true,
"public_url": "https://cdn.xqr.co/tenants/ws_abc/originals/a1b2c3d4.png",
"tags": [],
"created_at": "2026-03-21T14:30:00Z",
"updated_at": "2026-03-21T14:31:10Z"
},
"meta": {
"request_id": "req_4d5e6f7a8b9c0d12",
"rate_limit": {
"limit": 600,
"remaining": 594,
"reset": 1742572800
}
}
}

Was this page helpful?