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

# Assets

> Upload files into a source in three steps, without sending the bytes through Occtoo.

The Assets API uploads files into an Occtoo source. You register the files, upload them straight to storage, then confirm them.

```text theme={null}
https://api.occtoo.com
```

## Upload flow

**1. Register the assets**

Call `POST /v1/assets/{dataSourceId}` with one item per file. Each item has an entry key. The response returns a signed upload link per entry key.

**2. Upload the files**

Send each file with `PUT` to its upload link. The file goes straight to Azure Blob Storage and does not pass through Occtoo.

**3. Confirm the uploads**

Call `POST /v1/assets/{dataSourceId}/complete` with the entry keys. Occtoo then creates the files.

Everything uses the entry key:

* `GET /v1/assets/{dataSourceId}` reads the state of assets.
* `PUT /v1/assets/{dataSourceId}` creates assets or replaces their files.
* `POST /v1/assets/{dataSourceId}/uploadLinks` gives you new links when a link expired before you uploaded.
* `DELETE /v1/assets/{dataSourceId}` removes assets and their files.

## Authentication

The tenant comes from the credential. Send an [Application access token](https://docs.occtoo.com/api-reference/authentication/application-token.md) as `Authorization: Bearer <token>`, or an organization API key as `x-api-key`. Every operation accepts any one of `write:media`, `write:sources`, or the `import-datasource` permission of a Data Provider.

## Limits

| Operation | Assets per call |
| - | - |
| Register (`POST`) | 100 |
| Create or replace (`PUT`) | 25 |
| `uploadLinks`, `complete`, `GET`, `DELETE` | 50 |

Entry keys must be unique in a request, ignoring case. They can contain letters, digits, `_`, and `-`.

## Responses and errors

Batch operations return `200` with the keys that worked and a `failed` map from entry key to reason. One bad asset does not fail the whole call. `DELETE` returns `204`.

Errors use [Problem Details](https://www.rfc-editor.org/rfc/rfc9457) (`application/problem+json`). A `400` lists the invalid fields under `errors`. Retry `429` and `5xx` responses with exponential backoff, and respect `Retry-After` when it is present.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.