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

# Confirm an uploaded file

> Confirm a file after posting it to its `upload_url`. Returns the file with the SHA-256 storage computed. Confirm is idempotent: confirming again returns the same file and never creates a second one. A large file can take longer to confirm than the gateway waits, so retry a confirm that answered a 5xx (including a 504 timeout) or got no answer.



## OpenAPI

````yaml post /v1/files/{id}/confirm
openapi: 3.0.0
info:
  title: Creem API
  description: >-
    Creem is an all-in-one platform for managing subscriptions and recurring
    revenue, tailored specifically for today's SaaS companies. It enables you to
    boost revenue, enhance customer retention, and scale your operations
    seamlessly.
  version: v1
  contact:
    name: Creem Support
    url: https://creem.io
    email: support@creem.io
  license:
    name: Commercial
    url: https://creem.io/terms
  termsOfService: https://creem.io/terms
servers:
  - url: https://api.creem.io
    description: Production — live API for processing real transactions and data.
    x-speakeasy-server-id: prod
  - url: https://test-api.creem.io
    description: Test — sandbox API for development and testing with no real charges.
    x-speakeasy-server-id: test
security: []
tags: []
externalDocs:
  description: Creem Documentation
  url: https://docs.creem.io
paths:
  /v1/files/{id}/confirm:
    post:
      tags:
        - Files
      summary: Confirm an uploaded file
      description: >-
        Confirm a file after posting it to its `upload_url`. Returns the file
        with the SHA-256 storage computed. Confirm is idempotent: confirming
        again returns the same file and never creates a second one. A large file
        can take longer to confirm than the gateway waits, so retry a confirm
        that answered a 5xx (including a 504 timeout) or got no answer.
      operationId: confirmFileUpload
      parameters:
        - name: id
          required: true
          in: path
          description: The id `POST /v1/files` returned
          schema:
            type: string
      responses:
        '200':
          description: The confirmed file
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileEntity'
        '400':
          description: >-
            The upload expired before it was confirmed (code `upload_expired`),
            the uploaded bytes do not match `sha256` (code
            `upload_checksum_mismatch`), the uploaded file is not the declared
            `size` (code `upload_size_mismatch`), it does not match the upload
            in another way such as its content type (code `upload_rejected`), or
            `dry_run` was sent (code `dry_run_not_supported`). No file is
            created; after a mismatch the bytes are deleted, and the file can be
            uploaded to `upload_url` again until the upload expires.
        '401':
          description: Unauthorized - Invalid or missing API key
        '404':
          description: >-
            No upload with this id exists for the store, or nothing has been
            uploaded to it yet (code `upload_not_found`). No file is created.
        '503':
          description: >-
            The file changed in storage while it was being confirmed (code
            `upload_confirm_conflict`). Confirm again after `Retry-After`
            seconds; nothing was created by this call.
      security:
        - ApiKey: []
components:
  schemas:
    FileEntity:
      type: object
      properties:
        id:
          type: string
          description: The id of the file.
          example: file_4dGTkmBdnTnU9vV3KZ2Hcz
        object:
          type: string
          description: Always `file`.
          enum:
            - file
          example: file
        purpose:
          type: string
          description: What the file is for.
          enum:
            - product_file
          example: product_file
        filename:
          type: string
          description: The name buyers download the file under.
          example: ebook.epub
        content_type:
          type: string
          description: The media type of the file.
          example: application/epub+zip
        size:
          type: integer
          description: The size of the stored file in bytes.
          example: 52000
          format: int64
        sha256:
          type: string
          description: >-
            The SHA-256 of the stored bytes, base64-encoded, as storage computed
            it. Compare it before uploading a file again.
          example: n4bQgYhMfWWaL+qgxVrQFaO/TxsrC4Is0V1sFbDwCgg=
          nullable: true
        created_at:
          type: string
          description: When the file was confirmed (ISO 8601).
          example: '2026-11-17T10:05:00.000Z'
          format: date-time
      required:
        - id
        - object
        - purpose
        - filename
        - content_type
        - size
        - sha256
        - created_at
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key for authentication. You can find your API key in the Creem
        dashboard under Settings > API Keys.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.