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

# Update

> Issues a command instructing the ngrok agent to update itself to the latest version. After this call completes successfully, the ngrok agent will be in the update process. A caller should wait some amount of time to allow the update to complete (at least 10 seconds) before making a call to the Restart endpoint to request that the agent restart itself to start using the new code. This call will never update an ngrok agent to a new major version which could cause breaking compatibility issues. If you wish to update to a new major version, that must be done manually. Still, please be aware that updating your ngrok agent could break your integration. This call will fail in any of the following circumstances: there is no update available the ngrok agent's configuration disabled update checks the agent is currently in process of updating the agent has already successfully updated but has not yet been restarted




## OpenAPI

````yaml https://raw.githubusercontent.com/ngrok/ngrok-openapi/refs/heads/main/ngrok.yaml post /tunnel_sessions/{id}/update
openapi: 3.0.0
info:
  title: ngrok OpenAPI
  version: 1.0.0
servers:
  - url: https://api.ngrok.com
security:
  - authentication: []
paths:
  /tunnel_sessions/{id}/update:
    post:
      tags:
        - TunnelSessions
      summary: Update
      description: >
        Issues a command instructing the ngrok agent to update itself to the
        latest version. After this call completes successfully, the ngrok agent
        will be in the update process. A caller should wait some amount of time
        to allow the update to complete (at least 10 seconds) before making a
        call to the Restart endpoint to request that the agent restart itself to
        start using the new code. This call will never update an ngrok agent to
        a new major version which could cause breaking compatibility issues. If
        you wish to update to a new major version, that must be done manually.
        Still, please be aware that updating your ngrok agent could break your
        integration. This call will fail in any of the following circumstances:
        there is no update available the ngrok agent's configuration disabled
        update checks the agent is currently in process of updating the agent
        has already successfully updated but has not yet been restarted
      operationId: TunnelSessionsUpdate
      parameters:
        - $ref: '#/components/parameters/ngrokVersion'
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TunnelSessionsUpdate'
      responses:
        '204':
          description: >
            Issues a command instructing the ngrok agent to update itself to the
            latest version. After this call completes successfully, the ngrok
            agent will be in the update process. A caller should wait some
            amount of time to allow the update to complete (at least 10 seconds)
            before making a call to the Restart endpoint to request that the
            agent restart itself to start using the new code. This call will
            never update an ngrok agent to a new major version which could cause
            breaking compatibility issues. If you wish to update to a new major
            version, that must be done manually. Still, please be aware that
            updating your ngrok agent could break your integration. This call
            will fail in any of the following circumstances: there is no update
            available the ngrok agent's configuration disabled update checks the
            agent is currently in process of updating the agent has already
            successfully updated but has not yet been restarted
components:
  parameters:
    ngrokVersion:
      name: ngrok-version
      in: header
      required: true
      schema:
        type: integer
        default: 2
  schemas:
    TunnelSessionsUpdate:
      type: object
      properties:
        id:
          description: n/a
          type: string
  securitySchemes:
    authentication:
      type: http
      scheme: bearer

````