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

# Update or disable an integration

> A scope or `disabled` change bumps the token epoch and prunes subscriptions that cover spaces no longer readable.



## OpenAPI

````yaml /api-reference/endpoint/accounts/openapi.json patch /accounts/integrations/{id}
openapi: 3.0.3
info:
  title: quiva.ai Gateway
  description: >-
    API for managing accounts, users, authentication, and payments in the
    quiva.ai platform
  version: 1.0.0
  contact:
    name: quiva.ai Support
    url: https://app.quiva.ai
servers:
  - url: https://api.quiva.ai
    description: Production API server
security:
  - bearerAuth: []
  - apiKeyAuth: []
tags:
  - name: Account Management
    description: Operations related to account creation, updating, and deletion
  - name: User Management
    description: Operations related to user creation, updating, and deletion
  - name: Authentication
    description: Operations related to authentication and session management
  - name: API Keys
    description: Operations related to API key management
  - name: Multi-Factor Authentication
    description: Operations related to MFA setup and verification
  - name: Payment
    description: Operations related to subscription and payment management
  - name: Mesh Nodes
    description: Operations related to mesh node management
  - name: Integrations
    description: Machine identities and client credentials for task sync
  - name: Task Subscriptions
    description: Webhook subscriptions that push task events to your endpoint
paths:
  /accounts/integrations/{id}:
    patch:
      tags:
        - Integrations
      summary: Update or disable an integration
      description: >-
        A scope or `disabled` change bumps the token epoch and prunes
        subscriptions that cover spaces no longer readable.
      parameters:
        - name: id
          in: path
          required: true
          description: Integration id (`I` + 12 hex).
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateIntegrationRequest'
      responses:
        '200':
          description: Updated.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Integration'
                required:
                  - data
        '400':
          description: Bad request. `code` names the cause.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IntegrationError'
        '401':
          description: >-
            Not authenticated, the caller is not a root or admin user, or the
            integration token was revoked (`token_revoked`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IntegrationError'
        '403':
          description: >-
            Forbidden: `scope_denied`, or `integration_not_allowed` for an
            integration bearer outside workspaces.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IntegrationError'
        '404':
          description: Not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IntegrationError'
        '503':
          description: >-
            A backing store is unreachable. Retry. `code` is
            `storage_unavailable`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IntegrationError'
components:
  schemas:
    UpdateIntegrationRequest:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 100
        environment:
          type: string
          maxLength: 64
        scopes:
          $ref: '#/components/schemas/IntegrationScopes'
        disabled:
          type: boolean
      description: >-
        A scope or `disabled` change bumps the token epoch: outstanding tokens
        answer 401 within 30 seconds.
    Integration:
      type: object
      properties:
        id:
          type: string
          description: Also the OAuth `client_id`.
        account_id:
          type: string
        name:
          type: string
          maxLength: 100
        user_id:
          type: string
          description: The principal user that writes are attributed to.
        environment:
          type: string
          maxLength: 64
          description: Label only in this release.
        scopes:
          $ref: '#/components/schemas/IntegrationScopes'
        secrets:
          type: array
          items:
            $ref: '#/components/schemas/IntegrationSecretView'
        token_epoch:
          type: integer
        disabled:
          type: boolean
        deleted_at:
          type: string
          format: date-time
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        created_by:
          type: string
      required:
        - id
        - account_id
        - name
        - user_id
        - environment
        - scopes
        - secrets
        - token_epoch
        - disabled
    IntegrationError:
      type: object
      properties:
        error:
          type: string
        code:
          type: string
          description: Stable machine code. Branch on this, not on `error`.
      required:
        - error
    IntegrationScopes:
      type: object
      description: >-
        Space id to scopes. Space ids are upper-cased on write and match
        `^\w{1,64}$`. At most 500 spaces.
      additionalProperties:
        type: array
        items:
          type: string
          enum:
            - tasks:read
            - tasks:write
            - comments:write
            - space:configure
    IntegrationSecretView:
      type: object
      properties:
        secret_id:
          type: string
        last_4:
          type: string
        created_at:
          type: string
          format: date-time
        created_by:
          type: string
        retires_at:
          type: string
          format: date-time
        revoked_at:
          type: string
          format: date-time
        last_used_at:
          type: string
          format: date-time
      required:
        - secret_id
        - last_4
        - created_at
        - created_by
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key

````

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