# 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](https://help.sendops.dev/edge/asset-library) in the product help for how promotion works.


  An asset's `url` is its public CloudFront address. It is only populated once your [Edge stack](https://help.sendops.dev/edge/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

| Dashboard | API |
|---|---|
| **Edge / CDN → Asset Library** | [`GET /v1/assets`](/api-reference/endpoints/assets/list-assets) |
| A single image's detail page | [`GET /v1/assets/{id}`](/api-reference/endpoints/assets/get-asset) |

## Scope

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

| Scope | Grants | PII |
|---|---|---|
| `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).



- **`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](/api-reference/pagination) — follow `pagination.next_cursor` until it's `null`.


  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`](/api-reference/endpoints/templates/list-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.