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
| Parameter | Type | Required | Description |
|---|---|---|---|
asset_id | string | Yes | The unique identifier of the asset (UUID). Must be in confirmed status. |
Request Examples
curl -X POST https://xqr.co/api/v1/assets/a1b2c3d4-e5f6-7890-abcd-ef1234567890/publish \ -H "Authorization: Bearer xqr_pk_a1b2c3d4.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"const assetId = "a1b2c3d4-e5f6-7890-abcd-ef1234567890";
const response = await fetch( `https://xqr.co/api/v1/assets/${assetId}/publish`, { method: "POST", headers: { Authorization: "Bearer xqr_pk_a1b2c3d4.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", }, },);
const { data } = await response.json();console.log(data.public_url); // "https://cdn.xqr.co/tenants/ws_abc/originals/a1b2c3d4.png"import httpx
asset_id = "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
response = httpx.post( f"https://xqr.co/api/v1/assets/{asset_id}/publish", headers={ "Authorization": "Bearer xqr_pk_a1b2c3d4.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", },)
data = response.json()["data"]print(data["public_url"]) # "https://cdn.xqr.co/tenants/ws_abc/originals/a1b2c3d4.png"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?
Thanks for your feedback!