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

# Get a presigned URL for uploading a file to S3



## OpenAPI

````yaml /openapi.json post /s3/upload-url
openapi: 3.0.0
info:
  title: Trust Stack API
  description: Programmatic access to the Trust Stack API.
  version: '1.0'
  contact: {}
servers: []
security: []
tags: []
paths:
  /s3/upload-url:
    post:
      tags:
        - S3
      summary: Get a presigned URL for uploading a file to S3
      operationId: createUploadUrl
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/S3UploadObject'
      responses:
        '201':
          description: Returns a presigned URL and S3 object ID for uploading a file
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/S3UploadResponse'
components:
  schemas:
    S3UploadObject:
      type: object
      properties:
        mimeType:
          type: string
          description: The MIME type of the object
        size:
          type: number
          description: The size of the object
      required:
        - mimeType
        - size
    S3UploadResponse:
      type: object
      properties:
        url:
          type: string
          description: The presigned URL to upload the file to
          example: >-
            https://example-bucket.s3.amazonaws.com/path/to/file.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&...
        s3ObjectId:
          type: string
          description: The created S3 object record
          example: 123e4567-e89b-12d3-a456-426614174000
      required:
        - url
        - s3ObjectId

````