> ## 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.

# Create a file

> Create a file from a signed upload. **Please use the `id` that was returned when the signed upload was requested.**



## OpenAPI

````yaml https://api.engine.usesophic.com/openapi.json post /files
openapi: 3.1.0
info:
  title: Sophic Engine API
  version: 0.1.0
servers:
  - url: https://api.engine.usesophic.com/
security: []
paths:
  /files:
    post:
      summary: Create a file
      description: >-
        Create a file from a signed upload. **Please use the `id` that was
        returned when the signed upload was requested.**
      operationId: create_file_from_signed_upload_files_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateFileFromSignedUploadRequest'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/File'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - HTTPBearer: []
components:
  schemas:
    CreateFileFromSignedUploadRequest:
      properties:
        signed_upload:
          type: string
          title: Signed Upload
          description: The signed upload ID to create the file from.
      type: object
      required:
        - signed_upload
      title: CreateFileFromSignedUploadRequest
    File:
      properties:
        id:
          type: string
          title: Id
          description: Unique resource identifier.
        filename:
          type: string
          title: Filename
          description: The name of the file that was uploaded.
        content_type:
          type: string
          title: Content Type
          description: The content type of the file that was uploaded.
        purpose:
          type: string
          enum:
            - verification_evidence
            - legal_document
            - welcome_letter
            - trade_confirmation
            - fee_statement
            - account_statement
          title: Purpose
          description: The purpose of the file.
        signed_upload:
          anyOf:
            - type: string
            - type: 'null'
          title: Signed Upload
          description: The ID of the signed upload that created this file.
        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
        - content_type
        - purpose
        - signed_upload
      title: File
      description: Uploaded File resource.
    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

````