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

# create file



## OpenAPI

````yaml api-reference/openapi.json post /api/v1/files
openapi: 3.0.1
info:
  title: API V1
  version: v1
servers:
  - url: https://{defaultHost}
    variables:
      defaultHost:
        default: api.betterstacks.com
  - url: https://betterstacks.com/
    description: Production server
  - url: https://qa.betterstacks.com/
    description: Qa server
security:
  - bearerAuth: []
paths:
  /api/v1/files:
    post:
      tags:
        - Files
      summary: create file
      parameters: []
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                user_id:
                  type: integer
                link_id:
                  type: integer
                category:
                  type: string
                repository_link_id:
                  type: integer
                file:
                  type: string
                  format: binary
              required:
                - file
      responses:
        '201':
          description: created
        '422':
          description: unprocessable entity
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: apiKey
      name: X-Authorization
      in: header

````