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

# Deactivate an app

> Sets the app inactive. Requires apps:publish.



## OpenAPI

````yaml /swagger/5.16/ai-studio-swagger.yml post /apps/{id}/deactivate
openapi: 3.0.1
info:
  title: Midsommar API
  description: This is the API for the Midsommar user and group management system.
  termsOfService: http://swagger.io/terms/
  contact:
    name: API Support
    url: http://www.swagger.io/support
    email: support@swagger.io
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: '1.0'
servers:
  - url: //localhost:8080/api/v1
security: []
paths:
  /apps/{id}/deactivate:
    post:
      tags:
        - apps
      summary: Deactivate an app
      description: Sets the app inactive. Requires apps:publish.
      parameters:
        - name: id
          in: path
          description: App ID
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/api.AppResponse'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/api.ErrorResponse'
        '404':
          description: Not Found
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/api.ErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    api.AppResponse:
      type: object
      properties:
        attributes:
          type: object
          properties:
            budget_start_date:
              type: string
            credential_active:
              type: boolean
              description: >-
                CredentialActive is the state of the app's credential, null when
                the

                app has none, so the apps list can show it without a credentials
                fetch.
            credential_id:
              type: integer
            datasource_ids:
              type: array
              items:
                type: integer
            description:
              type: string
            guardrail_capability:
              type: string
              description: >-
                GuardrailCapability is the attested capability ("" = unattested,

                treated as acting); set with PUT
                /apps/{id}/guardrail-capability.
            guardrail_capability_reset:
              type: boolean
              description: >-
                GuardrailCapabilityReset is true on the response to a change
                that

                cleared the attested capability (a resource change by someone
                who

                is not a full administrator, on an App whose LLMs run
                guardrails).
            is_active:
              type: boolean
              description: live switch (apps:publish)
            is_orphaned:
              type: boolean
            llm_ids:
              type: array
              items:
                type: integer
            mcp_server_ids:
              type: array
              description: Tyk-managed MCP servers bound to the app (Enterprise).
              items:
                type: integer
            mcp_servers:
              type: array
              items:
                $ref: '#/components/schemas/api.AppMCPServerOutput'
            metadata:
              type: object
              additionalProperties: true
            model_router_ids:
              type: array
              description: Model Routers the app is granted (Enterprise).
              items:
                type: integer
            model_routers:
              type: array
              items:
                $ref: '#/components/schemas/api.AppModelRouterOutput'
            monthly_budget:
              type: number
            name:
              type: string
            namespace:
              type: string
            plugin_resources:
              type: array
              items:
                $ref: '#/components/schemas/api.PluginResourceOutput'
            semantic_router_ids:
              type: array
              description: Semantic Routers the app is granted (Enterprise).
              items:
                type: integer
            semantic_routers:
              type: array
              items:
                $ref: '#/components/schemas/api.AppSemanticRouterOutput'
            team_id:
              type: integer
            tool_ids:
              type: array
              items:
                type: integer
            tracing:
              type: object
              description: Agent tracing overrides (Enterprise).
              allOf:
                - $ref: '#/components/schemas/models.AppTracingSettings'
            user_id:
              type: integer
            workspace_id:
              type: integer
              description: |-
                WorkspaceID is the Workspace that owns the App (Enterprise
                Workspaces); a stored 0 reads as the Default.
        id:
          type: string
        type:
          type: string
      description: App response model
    api.ErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              detail:
                type: string
              title:
                type: string
      description: Error response model
    api.AppMCPServerOutput:
      type: object
      properties:
        auth_mode:
          type: string
        brokerable:
          type: boolean
        connection_id:
          type: integer
        endpoint_url:
          type: string
        id:
          type: integer
        name:
          type: string
        slug:
          type: string
    api.AppModelRouterOutput:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        slug:
          type: string
    api.PluginResourceOutput:
      type: object
      properties:
        instance_ids:
          type: array
          items:
            type: string
        plugin_id:
          type: integer
        resource_type_name:
          type: string
        resource_type_slug:
          type: string
    api.AppSemanticRouterOutput:
      type: object
      properties:
        id:
          type: integer
        models:
          type: array
          items:
            type: string
        name:
          type: string
        slug:
          type: string
    models.AppTracingSettings:
      type: object
      properties:
        content_mode:
          type: string
          description: >-
            ContentMode is the App's capture mode
            (off|metadata|hashed|redacted|full).
        enabled:
          type: boolean
          description: Enabled turns tracing on or off for the App; nil inherits.
        max_request_override:
          type: string
          description: |-
            MaxRequestOverride is the highest mode a request header may raise
            capture to for this App.
        owner_may_view_content:
          type: boolean
          description: >-
            OwnerMayViewContent will let the App's Portal owner read captured

            content (Q4) once the Portal trace views exist (jyx.42). Until then
            it

            is always false: Validate refuses true and Scan reads a stored true
            as

            false (jyx.175). Hub-only: never synced to edges.
        payload_days:
          type: integer
          description: PayloadDays is how long captured content is kept; nil inherits.
        session_idle_timeout:
          type: string
          description: |-
            SessionIdleTimeout closes a session after this long without activity
            (a Go duration, e.g. "2h").
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````