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

# Request file upload

> Request a signed URL for uploading a file directly to storage. **The returned `id` is needed to create a file from the signed upload.**



## OpenAPI

````yaml https://api.engine.usesophic.com/openapi.json post /signed-uploads
openapi: 3.1.0
info:
  title: Sophic Engine API
  version: 0.1.0
servers:
  - url: https://api.engine.usesophic.com/
security: []
paths:
  /signed-uploads:
    post:
      summary: Request file upload
      description: >-
        Request a signed URL for uploading a file directly to storage. **The
        returned `id` is needed to create a file from the signed upload.**
      operationId: request_signed_upload_signed_uploads_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSignedUploadRequest'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SignedUpload'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - HTTPBearer: []
components:
  schemas:
    CreateSignedUploadRequest:
      properties:
        filename:
          type: string
          title: Filename
          description: The name of the file to be uploaded.
        purpose:
          const: verification_evidence
          title: Purpose
          description: The purpose of the uploaded file.
        content_type:
          title: Content Type
          description: The content type of the file to be uploaded, e.g. application/pdf.
          x-remove-null-from-type-union: true
          type: string
      type: object
      required:
        - filename
        - purpose
      title: CreateSignedUploadRequest
    SignedUpload:
      properties:
        id:
          type: string
          title: Id
          description: Unique resource identifier.
        filename:
          type: string
          title: Filename
          description: The name of the file to be uploaded.
        expires_at:
          type: string
          format: date-time
          title: Expires At
          description: The timestamp when the signed upload expires.
        purpose:
          const: verification_evidence
          title: Purpose
          description: The purpose of the uploaded file.
        signed_upload_url:
          type: string
          title: Signed Upload Url
          description: The signed URL that you can use to upload directly to the bucket.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: >-
            The timestamp (in
            [ISO-8601](https://www.iso.org/iso-8601-date-and-time-format.html)
            format) of when the resource was created.
        modified_at:
          type: string
          format: date-time
          title: Modified At
          description: >-
            The timestamp (in
            [ISO-8601](https://www.iso.org/iso-8601-date-and-time-format.html)
            format) of when the resource was last modified.
      type: object
      required:
        - created_at
        - modified_at
        - id
        - filename
        - expires_at
        - purpose
        - signed_upload_url
      title: SignedUpload
      description: >-
        Signed upload resource, including the signed URL that you can use to
        upload directly to the bucket.
    Error:
      properties:
        detail:
          type: string
          title: Detail
          description: A human-readable description of the error.
        code:
          type: string
          title: Code
          description: A machine-readable error code.
        docs:
          title: Docs
          description: A URL to documentation about this error code.
          x-remove-null-from-type-union: true
          type: string
        context:
          title: Context
          description: An optional object for adding extra context to the error.
          x-remove-null-from-type-union: true
          additionalProperties:
            anyOf:
              - type: string
              - type: integer
          type: object
        params:
          title: Params
          description: An optional list of params that failed validation.
          x-remove-null-from-type-union: true
          items:
            $ref: '#/components/schemas/InvalidParam'
          type: array
      type: object
      required:
        - detail
        - code
      title: Error
    InvalidParam:
      properties:
        path:
          items:
            anyOf:
              - type: integer
              - type: string
          type: array
          title: Path
          description: Path to the field name (or index if a list) that errored.
        detail:
          type: string
          title: Detail
          description: Human-readable detail for error.
        code:
          type: string
          title: Code
          description: A machine-readable error code.
      type: object
      required:
        - path
        - detail
        - code
      title: InvalidParam
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````