---
title: "Create Company Attachment and Upload File"
method: POST
path: "/v1/companies/{company_id}/attachments"
tags: ["Company Attachment"]
---

# Create Company Attachment and Upload File

`POST /v1/companies/{company_id}/attachments`

## Request

- Base URL: `https://api.gusto-demo.com`
- URL: `https://api.gusto-demo.com/v1/companies/{company_id}/attachments`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/gusto/apis/gusto-api/docs/v1/companies/:company_id/attachments/post.ts> (a function with typed inputs; its response is checked against the schema)

Upload a file and create a company attachment. We recommend uploading PDF files for optimal compatibility. However, the following file types are allowed: .qbb, .qbm, .gif, .jpg, .png, .pdf, .xls, .xlsx, .doc and .docx.

### Related guides
- [Manage company attachments](doc:manage-company-attachments)

scope: `company_attachments:write`

## Path parameters

- `company_id` string, required

## Headers

- `X-Gusto-API-Version` '2026-06-15'

## Request body `multipart/form-data`

- CompanyAttachmentCreateRequestBody: The binary payload of the file and the company attachment category.
  - `document` string, binary, required: The binary payload of the file to be uploaded. Supported file types are .qbb, .qbm, .gif, .jpg, .png, .pdf, .xls, .xlsx, .doc and .docx.
  - `category` 'gep_notice' | 'compliance', required: The category of a company attachment. - `gep_notice`: A tax notice attachment - `compliance`: A compliance attachment

## Response `201`

Created

- CompanyAttachment: The company attachment
  - `uuid` string, required: UUID of the company attachment
  - `name` string, required: name of the file uploaded
  - `category` 'gep_notice' | 'compliance' | 'other', required: The category of the company attachment. - `gep_notice`: A tax notice attachment - `compliance`: A compliance attachment - `other`: Any other attachment type
  - `upload_time` string, required: The ISO 8601 timestamp of when an attachment was uploaded

## Other responses

- `404`: Not Found The requested resource does not exist. Make sure the provided UUID is valid.
- `422`: Unprocessable Entity This may happen when the body of your request contains errors such as `invalid_attribute_value`, or the request fails due to an `invalid_operation`. See the [Errors Categories](https://docs.gusto.com/embedded-payroll/docs/error-categories) guide for more details.

---

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