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

# Update a contract subscription

> Update a contract subscription



## OpenAPI

````yaml /api-reference/bundled.yaml put /v0/contract-subscription/{id}
openapi: 3.1.0
info:
  title: Gable API
  description: >
    API to interact with the Gable platform

    ## Authorization

    All API requests require an API key to be passed in the `X-API-KEY` header.
    For instructions on finding your API key and api endpoint check out the [API
    Key documentation](../docs/api-keys.md).

    Example: `curl -H "X-API-KEY: <your-api-key>"
    https://api-{organization}.gable.ai/v0/ping`
  contact:
    name: Gable Engineering
    url: https://gable.ai
    email: engineers@gable.ai
  version: 1.28.0
servers:
  - url: https://{hostname}.gable.ai
    description: Gable API
    variables:
      hostname:
        default: demo-api
        description: Customer environment assigned by Gable
security:
  - ApiKeyAuth: []
tags:
  - name: action
  - name: api-keys
  - name: auth
  - name: changelog
  - name: config
  - name: contract
  - name: data-asset
  - name: debug
  - name: s3
  - name: settings
  - name: slack
  - name: sso
  - name: webhook
  - name: notifications
  - name: constraints
  - name: telemetry
  - name: component
  - name: components
  - name: sca
  - name: cross-service-components
  - name: lineage
  - name: events
  - name: measurements
  - name: defect-report
  - name: experimental
paths:
  /v0/contract-subscription/{id}:
    put:
      tags:
        - contract
      summary: Update a contract subscription
      description: Update a contract subscription
      operationId: updateContractSubscription
      parameters:
        - in: path
          name: id
          schema:
            type: string
            format: uuid
          required: true
          description: The UUID of the contract
      requestBody:
        description: Contract subscription to update
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateContractSubscriptionRequest'
      responses:
        '200':
          description: Contract subscription was successfully updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractSubscription'
        '404':
          description: Contract subscription, contract, or user not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    UpdateContractSubscriptionRequest:
      type: object
      required:
        - dataContractId
      properties:
        dataContractId:
          description: Unique identifier of the contract
          type: string
          format: uuid
        userId:
          type: string
          format: uuid
          description: The unique identifier of the user
        email:
          type: string
          description: The email address of the subscriber if provided
          pattern: ^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$
        githubHandle:
          type: string
          description: The GitHub handle for the subscriber if provided
        slackChannel:
          type: string
          description: The Slack channel where contract violations will be sent
    ContractSubscription:
      type: object
      required:
        - id
        - dataContractId
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the subscription
        dataContractId:
          description: Unique identifier of the contract
          type: string
          format: uuid
        userId:
          type: string
          format: uuid
          description: The unique identifier of the user
        email:
          type: string
          description: The email address of the subscriber if provided
          pattern: ^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$
        githubHandle:
          type: string
          description: The GitHub handle of the subscriber if provided
        slackChannel:
          type: string
          description: The Slack channel where contract violations will be sent
    ErrorResponse:
      type: object
      required:
        - message
      properties:
        id:
          type: number
        title:
          type: string
        message:
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````