For AI agents: markdown of this page — /docs-content-en/storage/objects/public-get.md documentation index — /llms.txt

Public access to an object

GET /v1/public-storage/:portalId/:objectId

Returns the content of a completed (COMPLETED) publicly accessible object as a redirect (302) to a temporary link. PENDING objects are not served and return 404 STORAGE_OBJECT_NOT_FOUND. No API key is required — the endpoint is anonymous. Anonymous access is enabled separately at the Bitrix24 account level and is off by default.

Parameters

Parameter Type Required Description
ParameterportalId (path) Typestring (UUID) Requiredyes DescriptionThe Bitrix24 portal identifier in Vibecode. Format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. Source: GET /v1/me — the data.portalId field for vibe_api_ and vibe_app_ keys, data.portals[n].id for a vibe_live_ management key
ParameterobjectId (path) Typestring (CUID) Requiredyes DescriptionInternal object identifier: the object.id field from the Direct file upload response or data[].id from the List objects response

Examples

No key required. Both examples are sent without authorization headers — this is an anonymous endpoint.

curl

Terminal
curl -L "https://vibecode.bitrix24.com/v1/public-storage/YOUR_PORTAL_ID/YOUR_OBJECT_ID"

JavaScript

javascript
const res = await fetch(
  'https://vibecode.bitrix24.com/v1/public-storage/YOUR_PORTAL_ID/YOUR_OBJECT_ID',
  { redirect: 'follow' }
)
if (!res.ok) {
  const body = await res.json()
  console.error(body.error.code, body.error.message)
  return
}
// res.url — the final file URL

Response fields

The behavior depends on the state of anonymous access in the Bitrix24 account:

Anonymous access enabled in the Bitrix24 account. For a completed PUBLIC object, the server returns 302 Found with a Location header pointing to a temporary storage link. The link is valid for 10 minutes. Response header: Cache-Control: private, no-store.

Anonymous access disabled in the Bitrix24 account (the default for a new Bitrix24 account): 503 STORAGE_PUBLIC_GET_DISABLED_FOR_PORTAL. Enabled by the Bitrix24 account administrator.

Response example

Anonymous access is enabled in the Bitrix24 account and the object is PUBLIC — a redirect with no response body:

http
HTTP/1.1 302 Found
Location: <temporary link, valid for 10 minutes>
Cache-Control: private, no-store
Content-Length: 0

Error response example

503 — anonymous access disabled in the Bitrix24 account:

JSON
{
  "success": false,
  "error": {
    "code": "STORAGE_PUBLIC_GET_DISABLED_FOR_PORTAL",
    "message": "Public storage GET is disabled for this portal"
  }
}

Errors

HTTP Code Description
HTTP404 CodeSTORAGE_OBJECT_NOT_FOUND DescriptionThe upload is incomplete (PENDING), the object is missing, has PRIVATE visibility, belongs to another portal, or objectId does not match any object
HTTP410 CodeSTORAGE_OBJECT_DELETED DescriptionThe completed object was deleted
HTTP429 CodeSTORAGE_RATE_LIMIT_EXCEEDED DescriptionExceeded the limit of 60 requests per minute from a single IP address. The current limit is returned in the x-ratelimit-limit header
HTTP503 CodeSTORAGE_PUBLIC_GET_DISABLED_FOR_PORTAL DescriptionAnonymous access is disabled for this portal
HTTP503 CodeSTORAGE_FEATURE_DISABLED DescriptionStorage is temporarily unavailable on the platform

For the full list of general API errors, see Errors.

Known specifics

  • Anonymous access is enabled separately. Even a completed object with PUBLIC visibility does not automatically become available through this endpoint — the Bitrix24 account administrator must enable anonymous access in the storage settings.
  • objectId is the internal identifier, not the logical key. Use the object.id field from the Direct file upload response or data[].id from the List objects response.
  • Do not cache the redirect address — a new temporary link is generated on each request.

See also