> ## Documentation Index
> Fetch the complete documentation index at: https://docs.connectly.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Assets Overview

> Upload media files to Connectly's CDN and retrieve stable CDN URLs for use in templates, campaigns, and messages 🌁

The Assets API lets you upload media files to Connectly's CDN and retrieve their stable CDN URLs. Instead of hosting media yourself and worrying about availability, you provide a source URL and Connectly fetches and stores the file — returning a CDN URL you can use reliably in templates, campaigns, and messages.

## How it works

<Steps>
  <Step title="Upload your asset">
    Call [Create asset](https://docs.connectly.ai/api-reference/create-asset) with a publicly accessible URL of your file. Connectly fetches the file and stores it on the CDN.
  </Step>

  <Step title="Save the CDN URL">
    The response includes `asset.uri` — a stable CDN URL hosted by Connectly. Store this alongside your asset records.
  </Step>

  <Step title="Use it in templates or messages">
    Pass `asset.uri` as the `value` for `header_image`, `header_document`, or any attachment URL in your template and session message requests.
  </Step>

  <Step title="Retrieve it later">
    If you only saved the asset ID, use [Get asset](https://docs.connectly.ai/api-reference/get-asset) to look up the CDN URL at any time.
  </Step>
</Steps>

<Note>
  The source URL you provide must be publicly accessible from Connectly's servers. Private, authenticated, or localhost URLs will fail with a `400` error.
</Note>

## Endpoints

<CardGroup cols={2}>
  <Card title="Create asset" icon="upload" href="https://docs.connectly.ai/api-reference/create-asset">
    `POST /v1/businesses/{businessId}/assets` — upload a file by source URL and get a CDN URL back.
  </Card>

  <Card title="Get asset" icon="magnifying-glass" href="https://docs.connectly.ai/api-reference/get-asset">
    `GET /v1/businesses/{businessId}/assets/{assetId}` — retrieve the CDN URL for an existing asset by ID.
  </Card>
</CardGroup>
