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

# Upload files to custom fields

> Post the necessary fields for the API to upload files. The files need to be a buffer with the key "< custom_field_id >_< file_id >". <br /> Here custom field id is the ID of your custom field and file id is a randomly generated id (or uuid) <br /> There is support for multiple file uploads as well. Have multiple fields in the format mentioned.<br />File size is limited to 50 MB.<br /><br /> The allowed file types are: <br/> <ul><li>PDF</li><li>DOCX</li><li>DOC</li><li>JPG</li><li>JPEG</li><li>PNG</li><li>GIF</li><li>CSV</li><li>XLSX</li><li>XLS</li><li>MP4</li><li>MPEG</li><li>ZIP</li><li>RAR</li><li>TXT</li><li>SVG</li></ul> <br /><br /> The API will return the updated contact object.



## OpenAPI

````yaml /api-reference/forms/openapi.json post /forms/upload-custom-files
openapi: 3.0.0
info:
  title: Forms API
  description: Documentation for forms API
  version: '1.0'
  contact: {}
servers:
  - url: https://services.leadconnectorhq.com
security: []
tags:
  - name: Forms
    description: Documentation for forms API
  - name: Categories
    description: Documentation for forms API
paths:
  /forms/upload-custom-files:
    post:
      tags:
        - Forms
      summary: Upload files to custom fields
      description: >-
        Post the necessary fields for the API to upload files. The files need to
        be a buffer with the key "< custom_field_id >_< file_id >". <br /> Here
        custom field id is the ID of your custom field and file id is a randomly
        generated id (or uuid) <br /> There is support for multiple file uploads
        as well. Have multiple fields in the format mentioned.<br />File size is
        limited to 50 MB.<br /><br /> The allowed file types are: <br/>
        <ul><li>PDF</li><li>DOCX</li><li>DOC</li><li>JPG</li><li>JPEG</li><li>PNG</li><li>GIF</li><li>CSV</li><li>XLSX</li><li>XLS</li><li>MP4</li><li>MPEG</li><li>ZIP</li><li>RAR</li><li>TXT</li><li>SVG</li></ul>
        <br /><br /> The API will return the updated contact object.
      operationId: upload-to-custom-fields
      parameters:
        - name: Version
          in: header
          description: API Version
          required: true
          schema:
            type: string
            enum:
              - '2021-07-28'
        - name: contactId
          required: true
          in: query
          description: Contact ID to upload the file to.
          schema:
            example: dtEv6KtI27yF92YPm3Zz
            type: string
        - name: locationId
          required: true
          in: query
          description: Location ID of the contact.
          schema:
            example: quXmPY59n1zgGBabY1bZ
            type: string
      responses:
        '200':
          description: Successful response
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedDTO'
      security:
        - bearer:
            - forms.write
        - Location-Access:
            - forms.write
components:
  schemas:
    BadRequestDTO:
      type: object
      properties:
        statusCode:
          type: number
          example: 400
        message:
          type: string
          example: Bad Request
      required:
        - statusCode
        - message
    UnauthorizedDTO:
      type: object
      properties:
        statusCode:
          type: number
          example: 401
        message:
          type: string
          example: 'Invalid token: access token is invalid'
        error:
          type: string
          example: Unauthorized
      required:
        - statusCode
        - message
        - error
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Use the Access Token generated with user type as Sub-Account (OR)
        Private Integration Token of Sub-Account.
      type: http

````