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

# Prepare Run Payload Upload



## OpenAPI

````yaml https://api.notte.cc/openapi.json post /functions/{function_id}/runs/{run_id}/payloads/{field}/upload
openapi: 3.1.0
info:
  title: Notte API
  description: >-
    Notte API is a REST API that allows you to interact with Notte. It is used
    to create cloud browser sessions, scrape webpages, and run web ai agents to
    act on your behalf on the internet.
  version: 1.10.10
  x-logo:
    url: https://www.notte.cc/images/logo/logo-white.png
servers: []
security: []
tags:
  - name: agents
    description: Web AI agents (start, stop, status, replay, etc.)
  - name: sessions
    description: Session management (start, stop, status, etc.)
  - name: debug
    description: Session debugging tools (replay,logs, recording, etc.)
  - name: page
    description: Page operations withing a session (observe, step, scrape, etc.)
  - name: storage
    description: File storage interface (upload, download, list, etc.)
  - name: network
    description: Network requests/responses withing a session (intercept, etc.)
  - name: vaults
    description: >-
      Vault & Credentials management (create/delete vaults, create/delete
      credentials, etc.)
  - name: personas
    description: Persona management (create, delete, list emails, list sms, etc.)
  - name: scrape
    description: >-
      Webpage scraping (scrape, screenshot, etc.) with automatic session
      management.
  - name: health
    description: Health check endpoint.
  - name: usage
    description: Usage logs (usage, logs, etc.)
  - name: audit
    description: Audit trail of account and workspace changes.
  - name: functions
    description: Functions management (create, delete, list, etc.)
paths:
  /functions/{function_id}/runs/{run_id}/payloads/{field}/upload:
    post:
      tags:
        - functions
      summary: Prepare Run Payload Upload
      operationId: prepare_run_payload_upload
      parameters:
        - name: run_id
          in: path
          required: true
          schema:
            type: string
            title: Run Id
        - name: function_id
          in: path
          required: true
          schema:
            type: string
            title: Function Id
        - name: field
          in: path
          required: true
          schema:
            enum:
              - result
              - logs
              - variables
            type: string
            title: Field
        - name: x-notte-request-origin
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Notte-Request-Origin
        - name: x-notte-sdk-version
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Notte-Sdk-Version
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RunPayloadUploadRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunPayloadUploadResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    RunPayloadUploadRequest:
      properties:
        size_bytes:
          type: integer
          maximum: 268435456
          exclusiveMinimum: 0
          title: Size Bytes
        sha256:
          type: string
          pattern: ^[A-Za-z0-9+/]{43}=$
          title: Sha256
      type: object
      required:
        - size_bytes
        - sha256
      title: RunPayloadUploadRequest
    RunPayloadUploadResponse:
      properties:
        reference:
          $ref: '#/components/schemas/RunPayloadReference'
        url:
          type: string
          title: Url
        headers:
          additionalProperties:
            type: string
          type: object
          title: Headers
      type: object
      required:
        - reference
        - url
        - headers
      title: RunPayloadUploadResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    RunPayloadReference:
      properties:
        size_bytes:
          type: integer
          maximum: 268435456
          exclusiveMinimum: 0
          title: Size Bytes
        sha256:
          type: string
          pattern: ^[A-Za-z0-9+/]{43}=$
          title: Sha256
        upload_id:
          type: string
          format: uuid
          title: Upload Id
      type: object
      required:
        - size_bytes
        - sha256
        - upload_id
      title: RunPayloadReference
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: token

````

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