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

# Create presigned uploads for files

> Generates presigned URLs to upload files (Presigned PUT). Validates extension, contentType, and type-specific limits. Checksum required: send SHA-256 digest in checksumBase64 (Base64). Upload must include header x-amz-checksum-sha256 with the same value.

---
To upload your files, you MUST use the returned presigned URL with the HTTP PUT method. Ensure that you upload the file exactly to the URL indicated, without modifications (as required by AWS S3 Presigned URL PUT usage). Refer to the official AWS S3 documentation on Presigned PUT URLs for details: [AWS S3 Presigned PUT Documentation](https://docs.aws.amazon.com/AmazonS3/latest/userguide/PresignedUrlUploadObject.html).
Be sure to include all required headers as specified in the response (e.g., 'x-amz-checksum-sha256' with the correct SHA-256 value). If you fail to use the correct HTTP method or headers, AWS will reject the upload request.

<table><tr><th>Type</th><th>Extension</th><th>Content Type</th><th>Max Size</th></tr><tr><td rowspan="4">Image</td><td>.jpeg</td><td>image/jpeg</td><td rowspan="4">16 MB</td></tr><tr><td>.jpg</td><td>image/jpeg</td></tr><tr><td>.png</td><td>image/png</td></tr><tr><td>.webp</td><td>image/webp</td></tr><tr><td rowspan="2">GIF</td><td>.gif</td><td>image/gif</td><td rowspan="2">3 MB</td></tr><tr><td>.mp4</td><td>video/mp4</td></tr><tr><td rowspan="3">Video</td><td>.avi</td><td>video/x-msvideo</td><td rowspan="3">64 MB</td></tr><tr><td>.mov</td><td>video/quicktime</td></tr><tr><td>.mp4</td><td>video/mp4</td></tr><tr><td rowspan="4">Audio</td><td>.m4a</td><td>audio/mp4</td><td rowspan="4">16 MB</td></tr><tr><td>.mp3</td><td>audio/mpeg</td></tr><tr><td>.ogg</td><td>audio/ogg</td></tr><tr><td>.wav</td><td>audio/wav</td></tr><tr><td rowspan="8">Document</td><td>.doc</td><td>application/msword</td><td rowspan="8">100 MB</td></tr><tr><td>.docx</td><td>application/vnd.openxmlformats-officedocument.wordprocessingml.document</td></tr><tr><td>.pdf</td><td>application/pdf</td></tr><tr><td>.ppt</td><td>application/vnd.ms-powerpoint</td></tr><tr><td>.pptx</td><td>application/vnd.openxmlformats-officedocument.presentationml.presentation</td></tr><tr><td>.txt</td><td>text/plain</td></tr><tr><td>.xls</td><td>application/vnd.ms-excel</td></tr><tr><td>.xlsx</td><td>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</td></tr></table>



## OpenAPI

````yaml /api-reference/openapi.yaml post /bridge/api/v1/workspaces/{workspaceId}/files
openapi: 3.1.0
info:
  title: Bridge API
  summary: Bridge API specification for chat system management.
  description: >-
    Bridge API specification including webhook receiver endpoints, Contact CRUD
    operations, and comprehensive chat system.

                        This API includes:
                        1. Webhook Receiver API - for CRM clients to receive event notifications from Bridge
                        2. Contact CRUD API - for clients to manage contacts in Bridge
                        3. Conversations API - for managing conversations with flexible user identification and participant management
                        4. Messages API - for sending messages and files to a conversation
                        5. Files API - for managing files in a message
                        6. Custom attributes API - for consult custom attributes of an specific workspace
                    
                        **Multi-Tenant Architecture**: All operations are scoped to a specific workspace using workspaceId.
  termsOfService: https://www.sainapsis.com/legal/terms-of-service
  contact:
    name: Bridge Support
    url: https://app.bridge.new/
    email: support@sainapsis.com
  license:
    name: MIT License
    url: https://spdx.org/licenses/MIT.html
  version: 1.0.0
servers:
  - url: https://api-connect-us.bridge.new
    description: Production server
security: []
paths:
  /bridge/api/v1/workspaces/{workspaceId}/files:
    post:
      tags:
        - Files API
      summary: Create presigned uploads for files
      description: >-
        Generates presigned URLs to upload files (Presigned PUT). Validates
        extension, contentType, and type-specific limits. Checksum required:
        send SHA-256 digest in checksumBase64 (Base64). Upload must include
        header x-amz-checksum-sha256 with the same value.


        ---

        To upload your files, you MUST use the returned presigned URL with the
        HTTP PUT method. Ensure that you upload the file exactly to the URL
        indicated, without modifications (as required by AWS S3 Presigned URL
        PUT usage). Refer to the official AWS S3 documentation on Presigned PUT
        URLs for details: [AWS S3 Presigned PUT
        Documentation](https://docs.aws.amazon.com/AmazonS3/latest/userguide/PresignedUrlUploadObject.html).

        Be sure to include all required headers as specified in the response
        (e.g., 'x-amz-checksum-sha256' with the correct SHA-256 value). If you
        fail to use the correct HTTP method or headers, AWS will reject the
        upload request.


        <table><tr><th>Type</th><th>Extension</th><th>Content Type</th><th>Max
        Size</th></tr><tr><td
        rowspan="4">Image</td><td>.jpeg</td><td>image/jpeg</td><td
        rowspan="4">16
        MB</td></tr><tr><td>.jpg</td><td>image/jpeg</td></tr><tr><td>.png</td><td>image/png</td></tr><tr><td>.webp</td><td>image/webp</td></tr><tr><td
        rowspan="2">GIF</td><td>.gif</td><td>image/gif</td><td rowspan="2">3
        MB</td></tr><tr><td>.mp4</td><td>video/mp4</td></tr><tr><td
        rowspan="3">Video</td><td>.avi</td><td>video/x-msvideo</td><td
        rowspan="3">64
        MB</td></tr><tr><td>.mov</td><td>video/quicktime</td></tr><tr><td>.mp4</td><td>video/mp4</td></tr><tr><td
        rowspan="4">Audio</td><td>.m4a</td><td>audio/mp4</td><td rowspan="4">16
        MB</td></tr><tr><td>.mp3</td><td>audio/mpeg</td></tr><tr><td>.ogg</td><td>audio/ogg</td></tr><tr><td>.wav</td><td>audio/wav</td></tr><tr><td
        rowspan="8">Document</td><td>.doc</td><td>application/msword</td><td
        rowspan="8">100
        MB</td></tr><tr><td>.docx</td><td>application/vnd.openxmlformats-officedocument.wordprocessingml.document</td></tr><tr><td>.pdf</td><td>application/pdf</td></tr><tr><td>.ppt</td><td>application/vnd.ms-powerpoint</td></tr><tr><td>.pptx</td><td>application/vnd.openxmlformats-officedocument.presentationml.presentation</td></tr><tr><td>.txt</td><td>text/plain</td></tr><tr><td>.xls</td><td>application/vnd.ms-excel</td></tr><tr><td>.xlsx</td><td>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</td></tr></table>
      operationId: create_preloaded_files_bridge_api_v1_workspaces__workspaceId__files_post
      parameters:
        - name: workspaceId
          in: path
          required: true
          schema:
            type: string
            format: uuid
            description: Unique identifier of the workspace (UUID v4).
            examples:
              - b6cf1c4a-2b1e-4e63-8f3e-0f9d1a2a1234
            title: Workspaceid
          description: Unique identifier of the workspace (UUID v4).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/PreloadedFileRequest'
              description: Request for a file to be preloaded with a presigned URL.
              title: Preloaded Files
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PreloadedFileResponse'
                title: >-
                  Response Create Preloaded Files Bridge Api V1 Workspaces 
                  Workspaceid  Files Post
        '403':
          description: Forbidden
          content:
            application/json:
              examples:
                FORBIDDEN:
                  value:
                    title: Forbidden
                    status: 403
                    code: BRIDGE_CORE_0301
              schema:
                $ref: '#/components/schemas/Problem'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - x-api-key: []
components:
  schemas:
    PreloadedFileRequest:
      properties:
        name:
          type: string
          title: Name
          description: Original file name including extension.
          examples:
            - prueba.jpg
        fileType:
          $ref: '#/components/schemas/FileType'
          title: File Type
          description: Logical file type category.
          examples:
            - IMAGE
            - VIDEO
            - AUDIO
            - DOCUMENT
        contentType:
          anyOf:
            - type: string
            - type: 'null'
          title: Content Type
          description: MIME type of the file.
          examples:
            - image/jpeg
            - application/pdf
            - null
        checksumBase64:
          type: string
          title: Checksum Base64
          description: >-
            Base64-encoded SHA-256 digest of the entire file. This value will be
            used to sign the presigned PUT and must be sent back in the header
            x-amz-checksum-sha256 during upload.
          examples:
            - OaZ+I0yqf3u3u5w8h0Y2v4e7W9vHh3zbn2mA2m1yPVo=
      additionalProperties: false
      type: object
      required:
        - name
        - fileType
        - checksumBase64
      title: PreloadedFileRequest
      description: Request for a file to be preloaded with a presigned URL.
    PreloadedFileResponse:
      properties:
        mediaId:
          type: string
          title: Media Identifier
          description: Unique media identifier.
          examples:
            - 4a2c1f7e-2f84-4a5f-bd2d-6b6b2f0c1234
        presignUrl:
          $ref: '#/components/schemas/PresignPut'
          title: Presign Url
          description: Presigned PUT data to upload the media (url, method and headers).
      additionalProperties: false
      type: object
      required:
        - mediaId
        - presignUrl
      title: PreloadedFileResponse
      description: Response for a preloaded file with presigned URL for upload.
    Problem:
      properties:
        title:
          type: string
          title: Title
          description: Short, summary of the problem type.
        status:
          type: integer
          title: Status
          description: >-
            HTTP status code generated by the origin server for this occurrence
            of the problem.
        detail:
          anyOf:
            - type: string
            - type: 'null'
          title: Detail
          description: Explanation specific to this occurrence of the problem.
        instance:
          anyOf:
            - type: string
            - type: 'null'
          title: Instance
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem.
        traceId:
          anyOf:
            - type: string
            - type: 'null'
          title: Traceid
          description: Trace ID for debugging purposes.
        code:
          anyOf:
            - type: string
            - type: 'null'
          title: Code
          description: >-
            Error code for identification, view the error codes page for more
            details.
        errors:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Errors
          description: List of error details.
        extra:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Extra
          description: Extra information about the problem.
      type: object
      required:
        - title
        - status
      title: Problem
      description: Object representing a Problem response body.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    FileType:
      type: string
      enum:
        - IMAGE
        - VIDEO
        - AUDIO
        - DOCUMENT
        - STICKER
        - GIF
      title: FileType
    PresignPut:
      properties:
        url:
          type: string
          title: Url
          description: Presigned PUT URL.
          examples:
            - https://s3.amazonaws.com/bucket/path/to/object
        method:
          type: string
          const: PUT
          title: Method
          description: HTTP method to use for the upload.
          default: PUT
          examples:
            - PUT
        headers:
          additionalProperties:
            type: string
          type: object
          title: Headers
          description: >-
            Headers required for the presigned PUT (e.g., Content-Type,
            x-amz-checksum-sha256).
          examples:
            - Content-Type: image/jpeg
              x-amz-checksum-sha256: OaZ+I0yqf3u3u5w8h0Y2v4e7W9vHh3zbn2mA2m1yPVo=
      type: object
      required:
        - url
      title: PresignPut
      description: Presigned PUT data for uploading a media file.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    x-api-key:
      type: apiKey
      description: Copy the API key as provided by the Bridge Console.
      in: header
      name: x-api-key

````