> ## Documentation Index
> Fetch the complete documentation index at: https://docs.light.inc/llms.txt
> Use this file to discover all available pages before exploring further.

# Create attachment

> Creates a new attachment record



## OpenAPI

````yaml /openapi-public.json post /v1/attachments
openapi: 3.0.1
info:
  title: Light API
  version: 1.0.0
servers: []
security:
  - apiKeyAuth: []
  - bearerAuth: []
paths:
  /v1/attachments:
    post:
      tags:
        - v1 - Attachments
      summary: Create attachment
      description: Creates a new attachment record
      operationId: createAttachment
      requestBody:
        content:
          application/json;charset=UTF-8:
            schema:
              $ref: '#/components/schemas/ExternalCreateAttachmentRequestV1Model'
      responses:
        default:
          description: default response
          content:
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/ExternalAttachmentV1Model'
components:
  schemas:
    ExternalCreateAttachmentRequestV1Model:
      type: object
      properties:
        resourceId:
          type: string
          format: uuid
        documentKey:
          type: string
        fileName:
          type: string
        contentType:
          type: string
        metadata:
          $ref: '#/components/schemas/ExternalAttachmentMetadataV1Model'
    ExternalAttachmentV1Model:
      type: object
      properties:
        id:
          type: string
          format: uuid
        companyId:
          type: string
          format: uuid
        resourceId:
          type: string
          format: uuid
        documentKey:
          type: string
        fileName:
          type: string
        contentType:
          type: string
        createdBy:
          type: string
          format: uuid
        metadata:
          $ref: '#/components/schemas/ExternalAttachmentMetadataV1Model'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    ExternalAttachmentMetadataV1Model:
      type: object
      properties:
        type:
          type: string
          description: >-
            ⚠️ This enum is not exhaustive; new values may be added in the
            future.
          enum:
            - AR
      discriminator:
        propertyName: type
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      description: >-
        Basic authentication header of the form **Basic** **<api_key>**, where
        **<api_key>** is your api key.
      name: Authorization
      in: header
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````