> ## 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, resume or rotate a subscription

> `paused: false` resumes and answers `409 integration_disabled` while the integration is disabled.



## OpenAPI

````yaml /api-reference/endpoint/accounts/openapi.json patch /accounts/integrations/{id}/subscriptions/{sid}
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}/subscriptions/{sid}:
    patch:
      tags:
        - Task Subscriptions
      summary: Update, resume or rotate a subscription
      description: >-
        `paused: false` resumes and answers `409 integration_disabled` while the
        integration is disabled.
      parameters:
        - name: id
          in: path
          required: true
          description: Integration id (`I` + 12 hex).
          schema:
            type: string
        - name: sid
          in: path
          required: true
          description: Subscription id.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateSubscriptionRequest'
      responses:
        '200':
          description: Updated.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/SubscriptionUpdated'
                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'
        '409':
          description: Conflict. `code` names the cause.
          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:
    UpdateSubscriptionRequest:
      type: object
      properties:
        url:
          type: string
          format: uri
          maxLength: 2048
          description: https only. Private, loopback and link-local hosts are refused.
        spaces:
          type: array
          items:
            type: string
          minItems: 1
          description: Each space needs `tasks:read` on the integration.
        event_kinds:
          type: array
          items:
            type: string
            enum:
              - task-created
              - task-updated
              - task-status-changed
              - task-moved
              - task-deleted
              - task-action-added
              - task-action-completed
              - task-action-deleted
              - comment-created
              - comment-updated
              - comment-deleted
        paused:
          type: boolean
          enum:
            - false
          description: >-
            Only `false` is accepted: it resumes and clears the failure
            counters. The delivery worker does the pausing.
        rotate_secret:
          type: boolean
          description: >-
            Issues a new secret, returned once. The previous secret keeps
            signing for 24 hours.
    SubscriptionUpdated:
      type: object
      properties:
        subscription:
          $ref: '#/components/schemas/TaskSubscription'
        secret:
          type: string
          description: Present only when `rotate_secret` was true.
      required:
        - subscription
    IntegrationError:
      type: object
      properties:
        error:
          type: string
        code:
          type: string
          description: Stable machine code. Branch on this, not on `error`.
      required:
        - error
    TaskSubscription:
      type: object
      properties:
        id:
          type: string
        account_id:
          type: string
        integration_id:
          type: string
        spaces:
          type: array
          items:
            type: string
        event_kinds:
          type: array
          items:
            type: string
            enum:
              - task-created
              - task-updated
              - task-status-changed
              - task-moved
              - task-deleted
              - task-action-added
              - task-action-completed
              - task-action-deleted
              - comment-created
              - comment-updated
              - comment-deleted
          description: Empty means all kinds.
        url:
          type: string
          format: uri
          maxLength: 2048
        previous_secret_until:
          type: string
          format: date-time
          description: >-
            While in the future, deliveries carry a second signature from the
            previous secret.
        environment:
          type: string
        paused:
          type: boolean
        paused_reason:
          type: string
          enum:
            - ''
            - endpoint_gone
            - consecutive_failures
            - failing_for_24h
            - integration_disabled
            - scope_removed
        paused_at:
          type: string
        consecutive_failures:
          type: integer
        failing_since:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - id
        - account_id
        - integration_id
        - spaces
        - event_kinds
        - url
        - paused
  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.