Assets

Search Documentation

Search across all developer documentation

Assets

The assets API exposes your image asset library — the same images your dashboard shows under Edge / CDN → Asset Library. These are the images discovered in your connected git repository and promoted to your Edge CDN when templates deploy.

The surface is read-only: both endpoints are a GET. Assets are managed entirely as code — you commit an image to your repository, and SendOps promotes it on the next sync. There is no upload endpoint. See Asset Library & Images in the product help for how promotion works.

The CDN URL needs an Edge stack

An asset’s url is its public CloudFront address. It is only populated once your Edge stack is active — the stack is where the S3 bucket and CloudFront distribution that serve images live. Before then the asset still exists (with its bytes, hash, and dimensions), but url is an empty string.

How it maps to the dashboard

DashboardAPI
Edge / CDN → Asset LibraryGET /v1/assets
A single image’s detail pageGET /v1/assets/{id}

Scope

One scope gates this surface, granted by the matching dashboard permission:

ScopeGrantsPII
api.assets.view/v1/assets, /v1/assets/{id}No — image metadata only (path, CDN URL, hash, dimensions). No recipient data.

The asset object

Each asset is one promoted image. Sizes are in bytes; width and height are pixel dimensions, or 0 when SendOps can’t read them (SVGs and some formats don’t report a size).

{
"id": "0192f1a3-1c2b-7e44-9a01-7d2f6b5e4c3a",
"source_path": "static/logo.png",
"url": "https://cdn.acme.example/0192.../assets/3f9a...c1.png",
"content_hash": "3f9a...c1",
"content_type": "image/png",
"size_bytes": 20480,
"width": 280,
"height": 80,
"last_synced_at": "2026-06-17T22:00:00Z",
"created_at": "2026-05-01T09:00:00Z"
}
  • source_path — the image’s repository-relative logical path (relative to your connection’s path prefix, if you use one). This is the value you reference from a template as {{asset "static/logo.png"}}.
  • content_hash — the SHA-256 of the image bytes. Assets are content-addressed, so identical content shares a hash (and a stored object) across templates and branches.
  • url — the public CDN URL, or "" until your Edge stack is active (see the callout above).

The list is ordered by source_path and cursor-paginated — follow pagination.next_cursor until it’s null.

What the list omits vs. the dashboard

The dashboard’s library view also shows storage quota and, per image, the templates that reference it. The API intentionally leaves both out: it returns one flat, paginated list of image metadata. Use GET /v1/templates if you need to reason about which templates exist.

Asset detail

GET /v1/assets/{id} returns the same fields plus the git branch the image was promoted on (your default branch). A 404 means the id isn’t an asset in your org.

{
"id": "0192f1a3-1c2b-7e44-9a01-7d2f6b5e4c3a",
"source_path": "static/logo.png",
"url": "https://cdn.acme.example/0192.../assets/3f9a...c1.png",
"content_hash": "3f9a...c1",
"content_type": "image/png",
"size_bytes": 20480,
"width": 280,
"height": 80,
"last_synced_at": "2026-06-17T22:00:00Z",
"created_at": "2026-05-01T09:00:00Z",
"branch": "main"
}