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

# Upload a file to an attachment field

> Uploads the file to the given attachment field and returns the created attachment value.



## OpenAPI

````yaml POST /api/v1/attachments
openapi: 3.1.0
info:
  title: Risk Cloud API
  description: >-
    The Risk Cloud API is a collection of RESTful API endpoints that empower you
    and your team to directly integrate, automate, and build with the Risk
    Cloud. Risk Cloud API endpoint payloads are JSON based, with some endpoints
    supporting exports in CSV and XSLX formats for flexible integration.


    This API documentation showcases our Risk Cloud API v1, containing a variety
    of endpoints with continued support for enabling integrations with the Risk
    Cloud.


    Visit the [LogicGate Risk Cloud Developer
    Portal](https://www.logicgate.com/developer/) to get started with building
    your custom integration with quick start guides, usage guides, release
    notes, and more. Or download the [v1 OpenAPI
    specification](/legacy-openapi.json).


    Explore our [Risk Cloud API v2](https://docs.logicgate.com/v2/index.html)
    endpoints and documentation as well. [Risk Cloud API
    v2](https://docs.logicgate.com/v2/index.html) is our collection of API-First
    endpoints that are tailor made for our developer users, offer concise and
    highly documented details, are supported by a [Postman
    collection](https://www.postman.com/logicgate-postman/workspace/logicgate-risk-cloud-api/collection/29257227-de8d264b-6eeb-4177-bea6-2da0a8cabffc)
    and [v2 OpenAPI specification](https://github.com/LogicGateTech/openapi),
    and contain our latest API endpoint releases.
  contact:
    name: developer-relations@logicgate.com
    email: developer-relations@logicgate.com
  version: v2026.11.0
servers:
  - url: https://{subdomain}.logicgate.com
    description: Your Risk Cloud environment.
    variables:
      subdomain:
        description: Your Risk Cloud environment's subdomain (e.g. `qa`).
        default: your-instance
security:
  - ApiToken: []
  - basic: []
tags:
  - name: Authentication
    description: >-
      Getting Started: How to create an [API Access
      Token](https://www.logicgate.com/developer/risk-cloud-api-authentication/)
      to begin integrating with the Risk Cloud API
  - name: Attachment
    description: Endpoints for uploading, downloading, and retrieving record attachments.
  - name: Field
    description: Endpoints for creating, updating, and querying fields.
  - name: Principal
    description: >-
      Endpoints for the authenticated principal to view and manage their own
      details.
  - name: Record Audit
    description: Endpoints for retrieving record audit history and productivity data.
  - name: Step
    description: Endpoints for retrieving steps and the steps a user can access.
  - name: Table Report
    description: Endpoints for retrieving and managing table reports.
  - name: User Group
    description: Endpoints for managing user groups and their membership.
externalDocs:
  description: Developer Portal
  url: https://www.logicgate.com/developer/
paths:
  /api/v1/attachments:
    post:
      tags:
        - Attachment
      summary: Upload a file to an attachment field.
      description: >-
        Uploads the file to the given attachment field and returns the created
        attachment value.
      operationId: create_15
      parameters:
        - name: field
          in: query
          description: Optional ID of the attachment field to upload to.
          required: false
          schema:
            type: string
        - name: record
          in: query
          description: Optional ID of the record the attachment belongs to.
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                  description: The file to upload.
              required:
                - file
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/CurrentAttachmentValue_CurrentValueSummary
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppBadRequestResponse_CurrentValueSummary'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppStatusResponse_CurrentValueSummary'
components:
  schemas:
    CurrentAttachmentValue_CurrentValueSummary:
      type: object
      description: Entity storing attachment related information of a field's value.
      discriminator:
        propertyName: attachmentStatus
      oneOf:
        - $ref: '#/components/schemas/PendingAttachment_CurrentValueSummary'
        - description: >-
            And other types: CleanAttachment_CurrentValueSummary,
            DirtyAttachment_CurrentValueSummary
      properties:
        id:
          type: string
        valueType:
          type: string
        discriminator:
          type: string
        textValue:
          type: string
        numericValue:
          type: number
          format: double
        isDefault:
          type: boolean
        archived:
          type: boolean
        priority:
          type: integer
          format: int32
        userGroup:
          type: string
          description: usergroup
        attachmentStatus:
          type: string
        contentType:
          type: string
        fileSize:
          type: integer
          format: int64
        fileExtension:
          type: string
        originalFileExtension:
          type: string
        awsS3Key:
          type: string
        versionCount:
          type: integer
          format: int32
        updatedBy:
          type: string
        source:
          type: string
          enum:
            - USER
            - GOOGLE
            - SHAREPOINT
        office365Eligible:
          type: boolean
        wopiFileLockPresent:
          type: boolean
        fieldId:
          type: string
        idOrTransientId:
          type: string
        transientIdOrId:
          type: string
        textOrNumericValue:
          type: string
        empty:
          type: boolean
      required:
        - archived
        - attachmentStatus
        - awsS3Key
        - contentType
        - discriminator
        - fileExtension
        - fileSize
        - id
        - isDefault
        - numericValue
        - originalFileExtension
        - priority
        - source
        - textValue
        - updatedBy
        - userGroup
        - valueType
        - versionCount
    AppBadRequestResponse_CurrentValueSummary:
      type: object
      properties:
        type:
          type: string
          format: uri
        title:
          type: string
        status:
          type: integer
          format: int32
        detail:
          type: string
        instance:
          type: string
          format: uri
        properties:
          type: object
          additionalProperties: {}
    AppStatusResponse_CurrentValueSummary:
      type: object
      properties:
        type:
          type: string
          format: uri
        title:
          type: string
        status:
          type: integer
          format: int32
        detail:
          type: string
        instance:
          type: string
          format: uri
        properties:
          type: object
          additionalProperties: {}
    PendingAttachment_CurrentValueSummary:
      allOf:
        - $ref: >-
            #/components/schemas/CurrentValueCurrentValueObject_CurrentValueSummary
        - $ref: '#/components/schemas/CurrentValueObject_CurrentValueSummary'
        - $ref: '#/components/schemas/CurrentValue_CurrentValueSummary'
        - description: Circular reference to CurrentAttachmentValue_CurrentValueSummary
    CurrentValueCurrentValueObject_CurrentValueSummary:
      type: object
      description: Entity used to manage record's field data.
      discriminator:
        propertyName: discriminator
      oneOf:
        - $ref: '#/components/schemas/CurrentCommonValue_CurrentValueSummary'
        - description: >-
            And other types: CurrentDateValue_CurrentValueSummary,
            CurrentDateRangeValue_CurrentValueSummary,
            CurrentJobValue_CurrentValueSummary,
            CurrentCommonValue_CurrentValueSummary,
            CurrentDateValue_CurrentValueSummary,
            CurrentDateRangeValue_CurrentValueSummary,
            LabelValue_CurrentValueSummary, CleanAttachment_CurrentValueSummary,
            DirtyAttachment_CurrentValueSummary,
            PendingAttachment_CurrentValueSummary,
            CurrentGoogleAttachmentValue_CurrentValueSummary,
            CurrentSharepointAttachmentValue_CurrentValueSummary,
            Active_CurrentValueSummary, Automated_CurrentValueSummary,
            Disabled_CurrentValueSummary, External_CurrentValueSummary,
            Locked_CurrentValueSummary, Service_CurrentValueSummary,
            CurrentNumericRangeValue_CurrentValueSummary,
            CurrentJobValue_CurrentValueSummary
      properties:
        id:
          type: string
        valueType:
          type: string
        discriminator:
          type: string
        textValue:
          type: string
        numericValue:
          type: number
          format: double
        isDefault:
          type: boolean
        archived:
          type: boolean
        priority:
          type: integer
          format: int32
        userGroup:
          type: string
          description: usergroup
        fieldId:
          type: string
        idOrTransientId:
          type: string
        transientIdOrId:
          type: string
        textOrNumericValue:
          type: string
        empty:
          type: boolean
      required:
        - archived
        - discriminator
        - id
        - isDefault
        - numericValue
        - priority
        - textValue
        - userGroup
        - valueType
    CurrentValueObject_CurrentValueSummary:
      type: object
      description: Entity used to manage record's field data.
      discriminator:
        propertyName: discriminator
      oneOf:
        - description: Circular reference to CurrentCommonValue_CurrentValueSummary
        - description: >-
            And other types: CurrentDateValue_CurrentValueSummary,
            CurrentDateRangeValue_CurrentValueSummary,
            CurrentJobValue_CurrentValueSummary,
            CurrentCommonValue_CurrentValueSummary,
            CurrentDateValue_CurrentValueSummary,
            CurrentDateRangeValue_CurrentValueSummary,
            LabelValue_CurrentValueSummary, CleanAttachment_CurrentValueSummary,
            DirtyAttachment_CurrentValueSummary,
            PendingAttachment_CurrentValueSummary,
            CurrentGoogleAttachmentValue_CurrentValueSummary,
            CurrentSharepointAttachmentValue_CurrentValueSummary,
            Active_CurrentValueSummary, Automated_CurrentValueSummary,
            Disabled_CurrentValueSummary, External_CurrentValueSummary,
            Locked_CurrentValueSummary, Service_CurrentValueSummary,
            CurrentNumericRangeValue_CurrentValueSummary,
            CurrentJobValue_CurrentValueSummary
      properties:
        id:
          type: string
        valueType:
          type: string
        discriminator:
          type: string
        textValue:
          type: string
        numericValue:
          type: number
          format: double
        isDefault:
          type: boolean
        archived:
          type: boolean
        priority:
          type: integer
          format: int32
        userGroup:
          type: string
          description: usergroup
        fieldId:
          type: string
        idOrTransientId:
          type: string
        transientIdOrId:
          type: string
        textOrNumericValue:
          type: string
        empty:
          type: boolean
      required:
        - archived
        - discriminator
        - id
        - isDefault
        - numericValue
        - priority
        - textValue
        - userGroup
        - valueType
    CurrentValue_CurrentValueSummary:
      type: object
      description: Entity used to manage record's field data.
      discriminator:
        propertyName: discriminator
      oneOf:
        - description: Circular reference to CurrentCommonValue_CurrentValueSummary
        - description: >-
            And other types: CurrentDateValue_CurrentValueSummary,
            CurrentDateRangeValue_CurrentValueSummary,
            CurrentJobValue_CurrentValueSummary,
            CurrentCommonValue_CurrentValueSummary,
            CurrentDateValue_CurrentValueSummary,
            CurrentDateRangeValue_CurrentValueSummary,
            LabelValue_CurrentValueSummary, CleanAttachment_CurrentValueSummary,
            DirtyAttachment_CurrentValueSummary,
            PendingAttachment_CurrentValueSummary,
            CurrentGoogleAttachmentValue_CurrentValueSummary,
            CurrentSharepointAttachmentValue_CurrentValueSummary,
            Active_CurrentValueSummary, Automated_CurrentValueSummary,
            Disabled_CurrentValueSummary, External_CurrentValueSummary,
            Locked_CurrentValueSummary, Service_CurrentValueSummary,
            CurrentNumericRangeValue_CurrentValueSummary,
            CurrentJobValue_CurrentValueSummary
      properties:
        id:
          type: string
        valueType:
          type: string
        discriminator:
          type: string
        textValue:
          type: string
        numericValue:
          type: number
          format: double
        isDefault:
          type: boolean
        archived:
          type: boolean
        priority:
          type: integer
          format: int32
        userGroup:
          type: string
          description: usergroup
        fieldId:
          type: string
        idOrTransientId:
          type: string
        transientIdOrId:
          type: string
        textOrNumericValue:
          type: string
        empty:
          type: boolean
      required:
        - archived
        - discriminator
        - id
        - isDefault
        - numericValue
        - priority
        - textValue
        - userGroup
        - valueType
    CurrentCommonValue_CurrentValueSummary:
      allOf:
        - description: >-
            Circular reference to
            CurrentValueCurrentValueObject_CurrentValueSummary
        - $ref: '#/components/schemas/CurrentValueObject_CurrentValueSummary'
        - $ref: '#/components/schemas/CurrentValue_CurrentValueSummary'
      required:
        - description
        - guidance
  securitySchemes:
    ApiToken:
      type: http
      scheme: bearer
      bearerFormat: API Token
    basic:
      type: http
      scheme: basic

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.