> ## 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.

# Function Update



## OpenAPI

````yaml https://api.notte.cc/openapi.json post /functions/{function_id}
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.4.40
  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: functions
    description: Functions management (create, delete, list, etc.)
paths:
  /functions/{function_id}:
    post:
      tags:
        - functions
      summary: Function Update
      operationId: function_update
      parameters:
        - name: function_id
          in: path
          required: true
          schema:
            type: string
            title: Function Id
        - name: version
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: The version of the function to upload
            title: Version
          description: The version of the function to upload
        - name: restricted
          in: query
          required: false
          schema:
            type: boolean
            description: Whether to restrict the function code
            default: true
            title: Restricted
          description: Whether to restrict the function code
        - 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:
          multipart/form-data:
            schema:
              $ref: >-
                #/components/schemas/Body_function_update_functions__function_id__post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetFunctionResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    Body_function_update_functions__function_id__post:
      properties:
        file:
          type: string
          contentMediaType: application/octet-stream
          title: File
      type: object
      required:
        - file
      title: Body_function_update_functions__function_id__post
    GetFunctionResponse:
      properties:
        function_id:
          type: string
          title: Function Id
          description: The ID of the function
        variables:
          anyOf:
            - items:
                $ref: '#/components/schemas/ParameterInfo'
              type: array
            - type: 'null'
          title: Variables
          description: The variables to run the workflow with
        created_at:
          type: string
          format: date-time
          title: Created At
          description: The creation time of the workflow
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: The last update time of the workflow
        latest_version:
          type: string
          title: Latest Version
          description: The version of the workflow
        versions:
          items:
            type: string
          type: array
          title: Versions
          description: The versions of the workflow
        status:
          type: string
          title: Status
          description: The status of the workflow
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: The name of the workflow
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: The description of the workflow
        shared:
          type: boolean
          title: Shared
          description: Whether the workflow is public and can beshared with other users
          default: false
        reference_workflow_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Reference Workflow Id
          description: >-
            The ID of the reference workflow (i.e wether the workflow was forked
            from another workflow or not)
        workflow_id:
          type: string
          title: Workflow Id
          readOnly: true
      type: object
      required:
        - function_id
        - created_at
        - updated_at
        - latest_version
        - versions
        - status
        - workflow_id
      title: GetFunctionResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ParameterInfo:
      properties:
        name:
          type: string
          title: Name
        type:
          anyOf:
            - type: string
            - type: 'null'
          title: Type
        default:
          anyOf:
            - type: string
            - type: 'null'
          title: Default
      type: object
      required:
        - name
      title: ParameterInfo
    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

````