---
title: "Store an immutable image for managed email content."
method: POST
path: "/v1/workspaces/{workspaceId}/assets"
---

# Store an immutable image for managed email content.

`POST /v1/workspaces/{workspaceId}/assets`

## Request

- Base URL: `https://api.bangermail.com`
- URL: `https://api.bangermail.com/v1/workspaces/{workspaceId}/assets`
- Auth: HTTP bearer

Send raw PNG, JPEG, GIF or WebP bytes with the matching Content-Type and optional X-File-Name, or JSON with base64, mime_type and filename. Both forms allow up to 2 MiB decoded image bytes. The response URL can be used directly in HTML; no localized destination registry is created.

## Request body

- object
  - `base64` string, byte, required: Image bytes
  - `mime_type` 'image/png' | 'image/jpeg' | 'image/gif' | 'image/webp', required
  - `filename` string

## Response `201`

Registered image with immutable public URL.

- object
  - `data` ManagedEmailAsset, required
    - `id` string, uuid, required
    - `product_id` string, uuid, required
    - `filename` string, required
    - `mime_type` 'image/png' | 'image/jpeg' | 'image/gif' | 'image/webp', required
    - `size_bytes` integer, required
    - `sha256` string, required
    - `created_at` string, date-time, required
    - `public_url` string, uri, required

## Other responses

- `413`: Image exceeds 2 MiB.
- `415`: Unsupported image or mismatched declared MIME type.

---

[API](https://skmtc.dev/bangermail/apis/banger-api.md) · [All operations](https://skmtc.dev/bangermail/apis/banger-api/llms.txt) · [OpenAPI document](https://skmtc.dev/bangermail/apis/banger-api/revisions/a149909267f9?raw)
