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

# Create vault upload session

> Create upload sessions for 1 to 10 files that should be saved to Vault as one group. OFAuth uses each required file `etag` to check for existing Vault media before upload URLs are created.

**Required scope:** `vault:write`



## OpenAPI

````yaml /openapi/v3.json post /v3/access/vault/uploads
openapi: 3.1.0
info:
  title: OFAuth API
  version: 1.0.0
  description: >-
    OFAuth V3 API for linking accounts, making OnlyFans API requests, and
    receiving events.
  contact:
    email: support@ofauth.com
    url: https://ofauth.com/
servers:
  - url: https://api.ofauth.com
security:
  - ExternalOAuth: []
tags:
  - name: Link
    description: Link accounts, get and refresh tokens, and end access.
  - name: Linked accounts
    description: The linked accounts of one authorization, and their settings.
  - name: Access
    description: Make OnlyFans API requests for a linked account.
  - name: Analytics
    description: 'Access: charts, rankings, and performance data.'
  - name: Earnings
    description: 'Access: earnings charts, transactions, and chargebacks.'
  - name: Messages
    description: 'Access: messaging, chats, queue, and mass messaging.'
  - name: Posts
    description: 'Access: create, edit, list, and manage posts.'
  - name: Promotions
    description: 'Access: promotions, trials, and bundles.'
  - name: Users
    description: 'Access: user profiles, subscriptions, and actions.'
  - name: Vault
    description: 'Access: vault folders, media, and management.'
  - name: Upload
    description: 'Access: media upload and processing.'
  - name: Self
    description: 'Access: linked account profile and settings.'
  - name: Stories
    description: 'Access: stories listing and management.'
  - name: Subscriptions
    description: 'Access: subscription offers, discounts, and management.'
  - name: Realtime
    description: Webhook event formats, including OnlyFans activity events.
externalDocs:
  description: OFAuth Developer Documentation
  url: https://docs.ofauth.com
paths:
  /v3/access/vault/uploads:
    post:
      tags:
        - Vault
      summary: Create vault upload session
      description: >-
        Create upload sessions for 1 to 10 files that should be saved to Vault
        as one group. OFAuth uses each required file `etag` to check for
        existing Vault media before upload URLs are created.


        **Required scope:** `vault:write`
      operationId: access.vault.uploads.create
      parameters:
        - name: x-linked-account-id
          in: header
          required: true
          description: >-
            The linked account to use. The user must have shared it with your
            app. A missing account returns `linked_account_required`; an account
            outside your access returns `linked_account_not_granted`.
          schema:
            type: string
            example: conn_example123
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                files:
                  type: array
                  items:
                    type: object
                    properties:
                      filename:
                        type: string
                        minLength: 1
                        description: Name of the file to upload
                      etag:
                        type: string
                        minLength: 1
                        description: >-
                          Required file ETag/hash. OFAuth checks whether this
                          batch file already exists in Vault before creating
                          upload URLs.
                      size:
                        type: integer
                        minimum: 0
                        exclusiveMinimum: true
                        description: File size in bytes
                      contentType:
                        type: string
                        minLength: 1
                        description: MIME type of the file (e.g., image/jpeg, video/mp4)
                    required:
                      - filename
                      - etag
                      - size
                      - contentType
                  minItems: 1
                  maxItems: 10
                  description: >-
                    Files to upload together through one scheduled vault message
                    after all files finalize
                vaultUpload:
                  type: object
                  properties:
                    mode:
                      type: string
                      enum:
                        - message
                      default: message
                      description: Upload mode
                    userId:
                      type: string
                      nullable: true
                      minLength: 1
                      description: Target user ID for the upload
                    listId:
                      type: integer
                      minimum: 0
                      exclusiveMinimum: true
                      description: >-
                        Vault list ID to add the uploaded media to after vault
                        upload completes
                  description: Options for creating Vault media from the batch
              required:
                - files
                - vaultUpload
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  batchId:
                    type: string
                  status:
                    type: string
                    enum:
                      - pending
                      - completed
                  totalFiles:
                    type: integer
                    minimum: 0
                    exclusiveMinimum: true
                  expiresAt:
                    type: string
                  uploads:
                    type: array
                    items:
                      oneOf:
                        - type: object
                          properties:
                            status:
                              type: string
                              enum:
                                - needs_upload
                            uploadId:
                              type: string
                            uploadType:
                              type: string
                              enum:
                                - single
                                - multipart
                            totalParts:
                              type: integer
                              minimum: 0
                              exclusiveMinimum: true
                            partSize:
                              type: integer
                              minimum: 0
                              exclusiveMinimum: true
                            expiresAt:
                              type: string
                            parts:
                              type: array
                              items:
                                type: object
                                properties:
                                  partNumber:
                                    type: integer
                                    minimum: 0
                                    exclusiveMinimum: true
                                  uploadUrl:
                                    format: uri
                                    type: string
                                  byteRange:
                                    type: object
                                    properties:
                                      start:
                                        type: integer
                                        minimum: 0
                                      end:
                                        type: integer
                                        minimum: 0
                                    required:
                                      - start
                                      - end
                                required:
                                  - partNumber
                                  - uploadUrl
                                  - byteRange
                            completeUrl:
                              format: uri
                              type: string
                          required:
                            - status
                            - uploadId
                            - uploadType
                            - totalParts
                            - partSize
                            - expiresAt
                            - parts
                        - type: object
                          properties:
                            status:
                              type: string
                              enum:
                                - already_exists
                            media:
                              type: object
                              properties:
                                id:
                                  type: number
                                type:
                                  type: string
                                  enum:
                                    - photo
                                    - video
                                    - gif
                                    - audio
                                convertedToVideo:
                                  type: boolean
                                canView:
                                  type: boolean
                                hasError:
                                  type: boolean
                                createdAt:
                                  type: string
                                isReady:
                                  type: boolean
                                duration:
                                  type: number
                                releaseForms:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      id:
                                        type: number
                                      name:
                                        type: string
                                      partnerSource:
                                        type: string
                                      type:
                                        type: string
                                      user:
                                        type: object
                                        properties:
                                          id:
                                            type: number
                                          name:
                                            type: string
                                          username:
                                            type: string
                                          displayName:
                                            type: string
                                            nullable: true
                                          isVerified:
                                            type: boolean
                                          avatar:
                                            type: string
                                            nullable: true
                                          avatarThumbs:
                                            type: object
                                            nullable: true
                                            additionalProperties:
                                              type: string
                                          ivStatus:
                                            type: string
                                          isFromGuest:
                                            type: boolean
                                        required:
                                          - id
                                          - name
                                          - username
                                    required:
                                      - id
                                      - name
                                      - partnerSource
                                      - type
                                hasCustomPreview:
                                  type: boolean
                                videoSources:
                                  type: object
                                  properties:
                                    '240':
                                      type: string
                                      nullable: true
                                    '720':
                                      type: string
                                      nullable: true
                                files:
                                  type: object
                                  properties:
                                    full:
                                      type: object
                                      properties:
                                        url:
                                          type: string
                                        width:
                                          type: number
                                        height:
                                          type: number
                                        size:
                                          type: number
                                        sources:
                                          type: array
                                          items:
                                            type: object
                                            properties:
                                              url:
                                                type: string
                                              width:
                                                type: number
                                              height:
                                                type: number
                                              type:
                                                type: string
                                            required:
                                              - url
                                      required:
                                        - url
                                        - sources
                                    thumb:
                                      type: object
                                      nullable: true
                                      properties:
                                        url:
                                          type: string
                                        width:
                                          type: number
                                        height:
                                          type: number
                                        size:
                                          type: number
                                      required:
                                        - url
                                    preview:
                                      anyOf:
                                        - type: object
                                          properties:
                                            url:
                                              type: string
                                            width:
                                              type: number
                                            height:
                                              type: number
                                            size:
                                              type: number
                                            options:
                                              type: array
                                              items:
                                                type: object
                                                properties:
                                                  url:
                                                    type: string
                                                  width:
                                                    type: number
                                                  height:
                                                    type: number
                                                  type:
                                                    type: string
                                                required:
                                                  - url
                                          required:
                                            - url
                                            - options
                                        - type: object
                                          properties:
                                            url:
                                              type: string
                                            width:
                                              type: number
                                            height:
                                              type: number
                                            size:
                                              type: number
                                          required:
                                            - url
                                        - nullable: true
                                    squarePreview:
                                      type: object
                                      nullable: true
                                      properties:
                                        url:
                                          type: string
                                        width:
                                          type: number
                                        height:
                                          type: number
                                        size:
                                          type: number
                                      required:
                                        - url
                                  required:
                                    - full
                              required:
                                - id
                                - type
                                - convertedToVideo
                                - canView
                                - hasError
                                - createdAt
                                - isReady
                          required:
                            - status
                            - media
                  mediaIds:
                    type: array
                    items:
                      type: number
                  media:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: number
                        type:
                          type: string
                          enum:
                            - photo
                            - video
                            - gif
                            - audio
                        convertedToVideo:
                          type: boolean
                        canView:
                          type: boolean
                        hasError:
                          type: boolean
                        createdAt:
                          type: string
                        isReady:
                          type: boolean
                        duration:
                          type: number
                        releaseForms:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: number
                              name:
                                type: string
                              partnerSource:
                                type: string
                              type:
                                type: string
                              user:
                                type: object
                                properties:
                                  id:
                                    type: number
                                  name:
                                    type: string
                                  username:
                                    type: string
                                  displayName:
                                    type: string
                                    nullable: true
                                  isVerified:
                                    type: boolean
                                  avatar:
                                    type: string
                                    nullable: true
                                  avatarThumbs:
                                    type: object
                                    nullable: true
                                    additionalProperties:
                                      type: string
                                  ivStatus:
                                    type: string
                                  isFromGuest:
                                    type: boolean
                                required:
                                  - id
                                  - name
                                  - username
                            required:
                              - id
                              - name
                              - partnerSource
                              - type
                        hasCustomPreview:
                          type: boolean
                        videoSources:
                          type: object
                          properties:
                            '240':
                              type: string
                              nullable: true
                            '720':
                              type: string
                              nullable: true
                        files:
                          type: object
                          properties:
                            full:
                              type: object
                              properties:
                                url:
                                  type: string
                                width:
                                  type: number
                                height:
                                  type: number
                                size:
                                  type: number
                                sources:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      url:
                                        type: string
                                      width:
                                        type: number
                                      height:
                                        type: number
                                      type:
                                        type: string
                                    required:
                                      - url
                              required:
                                - url
                                - sources
                            thumb:
                              type: object
                              nullable: true
                              properties:
                                url:
                                  type: string
                                width:
                                  type: number
                                height:
                                  type: number
                                size:
                                  type: number
                              required:
                                - url
                            preview:
                              anyOf:
                                - type: object
                                  properties:
                                    url:
                                      type: string
                                    width:
                                      type: number
                                    height:
                                      type: number
                                    size:
                                      type: number
                                    options:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          url:
                                            type: string
                                          width:
                                            type: number
                                          height:
                                            type: number
                                          type:
                                            type: string
                                        required:
                                          - url
                                  required:
                                    - url
                                    - options
                                - type: object
                                  properties:
                                    url:
                                      type: string
                                    width:
                                      type: number
                                    height:
                                      type: number
                                    size:
                                      type: number
                                  required:
                                    - url
                                - nullable: true
                            squarePreview:
                              type: object
                              nullable: true
                              properties:
                                url:
                                  type: string
                                width:
                                  type: number
                                height:
                                  type: number
                                size:
                                  type: number
                              required:
                                - url
                          required:
                            - full
                      required:
                        - id
                        - type
                        - convertedToVideo
                        - canView
                        - hasError
                        - createdAt
                        - isReady
                required:
                  - batchId
                  - status
                  - totalFiles
                  - expiresAt
                  - uploads
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '429':
          description: Rate Limit Exceeded
        '500':
          description: Internal Server Error
        '502':
          description: Bad Gateway
      deprecated: false
      security:
        - ExternalOAuth: []
          LinkedAccountId: []
components:
  securitySchemes:
    ExternalOAuth:
      type: http
      scheme: bearer
      bearerFormat: opaque
      description: Link access token for one Sandbox, Test, or Live authorization.
    LinkedAccountId:
      type: apiKey
      name: x-linked-account-id
      in: header
      description: >-
        Selects one of the authorization's linked accounts via the
        x-linked-account-id header.

````

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