---
title: "Upload an asset"
method: POST
path: "/v0/api/projects/{projectGroupId}/assets"
tags: ["Assets"]
---

# Upload an asset

`POST /v0/api/projects/{projectGroupId}/assets`

## Request

- Base URL: `https://api.anything.com`
- URL: `https://api.anything.com/v0/api/projects/{projectGroupId}/assets`
- Auth: HTTP basic
- TypeScript: <https://skmtc.dev/anything/apis/anything-api/docs/v0/api/projects/:projectGroupId/assets/post.ts> (a function with typed inputs; its response is checked against the schema)

Uploads an image asset to a project group. Send the file as multipart/form-data under the `file` field, with an optional display `name`.

## Path parameters

- `projectGroupId` string, uuid, required

## Request body `multipart/form-data`

- object
  - `file` string, binary, required: Image file to upload. Allowed types: image/png, image/jpeg, image/gif, image/svg+xml, image/webp.
  - `name` string

## Response `201`

Asset uploaded

- object
  - `id` string, uuid, required
  - `name` string, required
  - `url` string, required
  - `mimeType` string, required
  - `createdAt` string, date-time, required

## Other responses

- `400`: Invalid request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not found — the referenced resource does not exist (including malformed resource IDs)
- `413`: File too large

---

[API](https://skmtc.dev/anything/apis/anything-api.md) - [All operations](https://skmtc.dev/anything/apis/anything-api/llms.txt) - [OpenAPI document](https://skmtc.dev/anything/apis/anything-api/revisions/1475488f3446?raw)
