---
title: "Uploads a new team-scoped attachment."
method: POST
path: "/api/attachments"
tags: ["Attachments"]
---

# Uploads a new team-scoped attachment.

`POST /api/attachments`

## Request

- Base URL: `https://app.airfocus.com`
- URL: `https://app.airfocus.com/api/attachments`
- Auth: HTTP bearer

Stores a binary payload as a private attachment owned by the authenticated team. The file name is taken from the `fileName` query parameter and the media type from the request Content-Type. The ID can be used where an attachment URI is required (such as in /workspaces/{workspaceId}/attachments) by using the string "attachment:{Response ID}".

## Query parameters

- `fileName` string, required

## Headers

- `Content-Type` string

## Response `200`

- Attachment
  - `contentType` string, required
  - `createdAt` string, date-time, required
  - `fileName` string, required
  - `id` string, uuid, required
  - `isPublic` boolean, required
  - `lastUsedAt` string, date-time, required
  - `size` integer, required
  - `teamId` string, uuid, required

## Other responses

- `default`: If any other error happens.

---

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