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

# Confirm a file upload

> Step 3 of 3-step file upload: Confirm the upload by creating the actual file.

After uploading the file to the direct upload URL (Step 2), call this endpoint with
the `blob_signed_id` from the create response to create the file record.

If the signed URL has expired, a 410 Gone response will be returned and you must
initiate a new upload.

Please see the [File Uploads guide](/file-uploads) for an overview of the whole process.



## OpenAPI

````yaml /openapi.json post /api/v1/file_upload_requests/{id}/confirm
openapi: 3.1.0
info:
  title: Scholarly API V1
  version: v1
  description: API for accessing Scholarly data
  license:
    name: Proprietary
    identifier: Proprietary
servers:
  - url: https://api.scholarlysoftware.com
    description: Production server
security: []
paths:
  /api/v1/file_upload_requests/{id}/confirm:
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
    post:
      tags:
        - File Upload Requests
      summary: Confirm a file upload
      description: >-
        Step 3 of 3-step file upload: Confirm the upload by creating the actual
        file.


        After uploading the file to the direct upload URL (Step 2), call this
        endpoint with

        the `blob_signed_id` from the create response to create the file record.


        If the signed URL has expired, a 410 Gone response will be returned and
        you must

        initiate a new upload.


        Please see the [File Uploads guide](/file-uploads) for an overview of
        the whole process.
      operationId: confirmFileUploadRequestConfirm
      parameters:
        - name: Authorization
          in: header
          required: true
          description: Bearer token
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                blob_signed_id:
                  type: string
                  description: Signed ID returned from the create step
              additionalProperties: false
              required:
                - blob_signed_id
      responses:
        '200':
          description: File created
          content:
            application/vnd.api+json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    $ref: '#/components/schemas/File'
        '400':
          description: error
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: forbidden
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Error'
        '410':
          description: gone
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: validation error
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ValidationError'
      security:
        - bearer_auth: []
components:
  schemas:
    File:
      type: object
      properties:
        id:
          type: string
          format: uuid
        type:
          type: string
          const: file
          example: file
        attributes:
          type: object
          properties:
            created_at:
              type: string
              format: datetime
            updated_at:
              type: string
              format: datetime
            name:
              type: string
              example: annual_report.pdf
            content_type:
              type:
                - string
                - 'null'
              example: application/pdf
            byte_size:
              type:
                - integer
                - 'null'
              example: 1024000
            checksum_md5:
              type:
                - string
                - 'null'
            url:
              type:
                - string
                - 'null'
            locked:
              type:
                - boolean
                - 'null'
            state:
              type: string
        relationships:
          type: object
          properties:
            folder:
              type: object
              properties:
                links:
                  type: object
                  properties:
                    related:
                      type:
                        - string
                        - 'null'
                      format: uri
                  required:
                    - related
                meta:
                  type: object
              anyOf:
                - required:
                    - links
                - required:
                    - meta
            created_by:
              type: object
              properties:
                links:
                  type: object
                  properties:
                    related:
                      type:
                        - string
                        - 'null'
                      format: uri
                  required:
                    - related
                meta:
                  type: object
              anyOf:
                - required:
                    - links
                - required:
                    - meta
      required:
        - id
        - type
        - attributes
    Error:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              status:
                type: string
              title:
                type: string
              detail:
                type: string
            required:
              - status
              - title
      required:
        - errors
    ValidationError:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              status:
                type: string
                example: '422'
              title:
                type: string
                example: Validation Error
              detail:
                type: string
                example: Label can't be blank
            required:
              - status
              - title
              - detail
      required:
        - errors
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer
      bearerFormat: API Key

````