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

# Update a custom app

> Renames an app, changes its entrypoint, or publishes a new bundle. Sending files replaces the whole bundle: the new version goes live for every viewer at once, and the previous version is not kept. A request without files, such as a rename, does not publish. Files, when sent, must include the entrypoint. Without files, a changed entrypoint must name a file in the current bundle. A new name already used by another app in the same workspace, or by another organization-scoped app for an app shared with the organization, is refused with 409, as is an update that races another update of the same app. On a plan limited to one app, publishing files to an app that has never been deployed is refused with 403 and code custom_app_limit_reached when the organization already has a deployed app.



## OpenAPI

````yaml /langsmith/langsmith-platform-openapi.json patch /api/v2/custom-apps/{custom_app_id}
openapi: 3.1.0
info:
  title: LangSmith
  description: >+
    The LangSmith API is used to programmatically create and manage LangSmith
    resources.


    ## Host

    https://api.smith.langchain.com


    ## Authentication

    To authenticate with the LangSmith API, set the `X-Api-Key` header

    to a valid [LangSmith API
    key](https://docs.langchain.com/langsmith/create-account-api-key#create-an-api-key).

  version: 0.1.0
servers:
  - url: /
security: []
tags:
  - name: run
    x-group: Tracing
  - name: runs
    x-group: Tracing
  - name: sessions
    x-group: Tracing
  - name: tracer-sessions
    x-group: Tracing
  - name: threads
    x-group: Threads
  - name: datasets
    x-group: Datasets
  - name: examples
    x-group: Datasets
  - name: evaluators
    x-group: Evaluation
  - name: experiment-view-overrides
    x-group: Evaluation
  - name: experiments
    x-group: Evaluation
  - name: annotation-queues
    x-group: Feedback & Annotation
  - name: annotation_queues
    x-group: Feedback & Annotation
  - name: feedback
    x-group: Feedback & Annotation
  - name: feedback-configs
    x-group: Feedback & Annotation
  - name: alert_rules
    x-group: Monitoring
  - name: bulk-exports
    x-group: Monitoring
  - name: charts
    x-group: Monitoring
  - name: commits
    x-group: Prompts & Playground
  - name: directories
    x-group: Prompts & Playground
  - name: hub_environments
    x-group: Prompts & Playground
  - name: playground-settings
    x-group: Prompts & Playground
  - name: prompt-webhooks
    x-group: Prompts & Playground
  - name: prompts
    x-group: Prompts & Playground
  - name: tag-transitions
    x-group: Prompts & Playground
  - name: comments
    x-group: Prompt Hub
  - name: likes
    x-group: Prompt Hub
  - name: optimization-jobs
    x-group: Prompt Hub
  - name: ownerships
    x-group: Prompt Hub
  - name: repos
    x-group: Prompt Hub
  - name: settings
    x-group: Prompt Hub
  - name: tags
    x-group: Prompt Hub
  - name: integrations
    x-group: Integrations & Tools
  - name: mcp
    x-group: Integrations & Tools
  - name: mcp_vendors
    x-group: Integrations & Tools
  - name: oauth
    x-group: Integrations & Tools
  - name: tools
    x-group: Integrations & Tools
  - name: gateway-policies
    x-group: LLM Gateway
  - name: sandboxes
    x-group: Sandboxes
  - name: issues
    x-group: Issues
  - name: issues-agent
    x-group: Issues
  - name: Organizations
    x-group: Administration
  - name: SCIM Tokens
    x-group: Administration
  - name: TTL Settings
    x-group: Administration
  - name: access_policies
    x-group: Administration
  - name: api-key
    x-group: Administration
  - name: audit-logs
    x-group: Administration
  - name: auth
    x-group: Administration
  - name: aws_marketplace
    x-group: Administration
  - name: data_planes
    x-group: Administration
  - name: me
    x-group: Administration
  - name: orgs
    x-group: Administration
  - name: service-accounts
    x-group: Administration
  - name: tenant
    x-group: Administration
  - name: ttl-settings
    x-group: Administration
  - name: usage-limits
    x-group: Administration
  - name: workspaces
    x-group: Administration
  - name: ace
    x-group: System
  - name: backfills
    x-group: System
  - name: features
    x-group: System
  - name: info
    x-group: System
  - name: model-price-map
    x-group: System
  - name: public
    x-group: System
  - name: agents
    x-hidden: true
  - name: custom-apps
  - name: fleet orgs
  - name: fleet secrets
  - name: fleet tenants
  - name: fleet threads
    x-hidden: true
  - name: fleet users
  - name: productfeedback
    x-hidden: true
  - name: rules
  - name: runsanalytics
  - name: sql
  - name: usage
  - name: user-groups
  - name: users
paths:
  /api/v2/custom-apps/{custom_app_id}:
    patch:
      tags:
        - custom-apps
      summary: Update a custom app
      description: >-
        Renames an app, changes its entrypoint, or publishes a new bundle.
        Sending files replaces the whole bundle: the new version goes live for
        every viewer at once, and the previous version is not kept. A request
        without files, such as a rename, does not publish. Files, when sent,
        must include the entrypoint. Without files, a changed entrypoint must
        name a file in the current bundle. A new name already used by another
        app in the same workspace, or by another organization-scoped app for an
        app shared with the organization, is refused with 409, as is an update
        that races another update of the same app. On a plan limited to one app,
        publishing files to an app that has never been deployed is refused with
        403 and code custom_app_limit_reached when the organization already has
        a deployed app.
      parameters:
        - description: Custom app ID
          name: custom_app_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/customapps.UpdateCustomAppPayload'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/customapps.CustomApp'
        '400':
          description: Bad Request
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/customapps.CustomAppProblem'
        '403':
          description: Forbidden
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/customapps.CustomAppProblem'
        '404':
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/customapps.CustomAppProblem'
        '409':
          description: Conflict
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/customapps.CustomAppProblem'
      security:
        - API Key: []
          Tenant ID: []
        - Bearer Auth: []
          Tenant ID: []
components:
  schemas:
    customapps.UpdateCustomAppPayload:
      type: object
      properties:
        entrypoint:
          description: >-
            A new entrypoint. When files is sent, it must be one of them;
            otherwise

            it must name a file in the current bundle.
          type: string
        files:
          description: >-
            A new bundle, replacing the whole current one: file contents keyed
            by

            relative path. Publishes a new version to every viewer.
          type: object
          additionalProperties:
            type: string
        name:
          description: A new name for the app.
          type: string
        source_archive:
          description: >-
            New source code for the app, replacing the stored source: a
            base64-encoded

            gzip tarball of at most 50 MiB.
          type: string
    customapps.CustomApp:
      type: object
      required:
        - context_type
        - created_at
        - current_version
        - entrypoint
        - id
        - is_deployed
        - name
        - scope
        - tenant_id
        - updated_at
        - views_7d
      properties:
        context_type:
          description: >-
            Where the app is shown: none for a standalone app, annotation_queue
            or

            thread for an app shown alongside an annotation queue or a thread.
          allOf:
            - $ref: '#/components/schemas/customapps.ContextType'
        created_at:
          type: string
          format: date-time
        created_by:
          description: The name of the user who created the app.
          type: string
        current_version:
          description: The bundle's version, incremented each time new files are published.
          type: integer
        entrypoint:
          description: The path of the bundle file that renders the app.
          type: string
        files:
          description: >-
            The app's bundle: file contents keyed by relative path. Only create,
            get

            and update return it, and the v2 get returns it only when
            include_files is

            true.
          type: object
          additionalProperties:
            type: string
        id:
          type: string
          format: uuid
        is_deployed:
          description: |-
            Whether the app has been deployed. Lists hide undeployed apps unless
            include_undeployed is set.
          type: boolean
        name:
          type: string
        scope:
          description: |-
            Who can see the app: workspace for the workspace that owns it,
            organization for every workspace in the organization.
          allOf:
            - $ref: '#/components/schemas/customapps.Scope'
        tenant_id:
          description: >-
            The workspace that owns the app; null for an app shared with the
            whole

            organization.
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
        updated_at:
          type: string
          format: date-time
        updated_by:
          description: The name of the user who last updated the app.
          type: string
        views_7d:
          description: >-
            Views of the app over the last 7 days. Only list responses count
            views;

            other responses return 0.
          type: integer
    customapps.CustomAppProblem:
      type: object
      required:
        - detail
        - status
        - title
        - type
      properties:
        code:
          description: |-
            Identifies an error a client can act on, such as
            custom_app_limit_reached.
          type: string
        detail:
          type: string
        instance:
          type: string
        remedy:
          type: string
        status:
          type: integer
        title:
          type: string
        type:
          type: string
    customapps.ContextType:
      type: string
      enum:
        - none
        - annotation_queue
        - thread
      x-enum-varnames:
        - ContextTypeNone
        - ContextTypeAnnotationQueue
        - ContextTypeThread
    customapps.Scope:
      type: string
      enum:
        - workspace
        - organization
      x-enum-varnames:
        - ScopeWorkspace
        - ScopeOrganization
  securitySchemes:
    API Key:
      type: apiKey
      in: header
      name: X-API-Key
    Tenant ID:
      type: apiKey
      in: header
      name: X-Tenant-Id
    Bearer Auth:
      type: http
      description: >-
        Bearer tokens are used to authenticate from the UI. Must also specify
        x-tenant-id or x-organization-id (for org scoped apis).
      scheme: bearer

````