---
title: "Create attachment"
method: POST
path: "/v1/attachments"
tags: ["v1 - Attachments"]
---

# Create attachment

`POST /v1/attachments`

## Request

- Base URL: `https://light.inc` (the document declares no server; this is the origin it was published from)
- URL: `https://light.inc/v1/attachments`
- Auth: one of:
  - API key in header `Authorization`
  - HTTP bearer

Creates a new attachment record

## Request body

- ExternalCreateAttachmentRequestV1Model
  - `resourceId` string, uuid
  - `documentKey` string
  - `fileName` string
  - `contentType` string
  - `metadata` ExternalAttachmentMetadataV1Model
    - `type` 'AP' | 'AR': ⚠️ This enum is not exhaustive; new values may be added in the future.

## Response `default`

default response

- ExternalAttachmentV1Model
  - `id` string, uuid
  - `companyId` string, uuid
  - `resourceId` string, uuid
  - `documentKey` string
  - `fileName` string
  - `contentType` string
  - `createdBy` string, uuid
  - `metadata` ExternalAttachmentMetadataV1Model
    - `type` 'AP' | 'AR': ⚠️ This enum is not exhaustive; new values may be added in the future.
  - `createdAt` string, date-time
  - `updatedAt` string, date-time
  - `status` 'ACTIVE' | 'ARCHIVED': ARCHIVED once the attachment was archived. Who archived it and when is on the record's activity log. ⚠️ This enum is not exhaustive; new values may be added in the future.

---

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