> ## 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 an existing action

> Update an existing action



## OpenAPI

````yaml /api-reference/bundled.yaml put /v0/action
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/action:
    put:
      tags:
        - action
      summary: Update an existing action
      description: Update an existing action
      operationId: putAction
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PutActionRequest'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PutActionResponse'
        '500':
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    PutActionRequest:
      type: object
      required:
        - actionId
        - name
        - triggers
        - destinations
        - isActive
      properties:
        actionId:
          type: string
          description: The unique identifier of the action
        name:
          type: string
          description: The name of the action
          example: email on pricing asset change
        triggers:
          type: array
          minItems: 1
          items:
            oneOf:
              - $ref: '#/components/schemas/ActionTriggerSource'
              - $ref: '#/components/schemas/ActionTriggerSourceType'
              - $ref: '#/components/schemas/ActionTriggerEventName'
              - $ref: '#/components/schemas/ActionTriggerNamespace'
            discriminator:
              propertyName: triggerType
            mapping:
              source: ./ActionTriggerSource.yaml
              sourceType: ./ActionTriggerSourceType.yaml
              eventName: ./ActionTriggerEventName.yaml
              namespace: ./ActionTriggerNamespace.yaml
        destinations:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/ActionDestinationSlack'
              - $ref: '#/components/schemas/ActionDestinationEmail'
              - $ref: '#/components/schemas/ActionDestinationWebhook'
            discriminator:
              propertyName: destinationType
            mapping:
              slack: ./ActionDestinationSlack.yaml
              email: ./ActionDestinationEmail.yaml
              webhook: ./ActionDestinationWebhook.yaml
        isActive:
          type: boolean
          description: Whether the action is active or not
          example: true
    PutActionResponse:
      type: object
      required:
        - actionId
      properties:
        actionId:
          type: string
          description: The unique identifier of the updated action
    ErrorResponse:
      type: object
      required:
        - message
      properties:
        id:
          type: number
        title:
          type: string
        message:
          type: string
    ActionTriggerSource:
      type: object
      required:
        - triggerType
        - triggerValues
      properties:
        triggerType:
          type: string
          description: The type of trigger
          enum:
            - source
        triggerValues:
          description: >-
            List of data asset sources, any of which need to match an event to
            trigger an action
          type: array
          items:
            type: string
    ActionTriggerSourceType:
      type: object
      required:
        - triggerType
        - triggerValues
      properties:
        triggerType:
          type: string
          description: The type of trigger
          enum:
            - sourceType
        triggerValues:
          description: >-
            List of data asset sourceTypes, any of which need to match an event
            to trigger an action
          type: array
          items:
            $ref: '#/components/schemas/SourceType'
    ActionTriggerEventName:
      type: object
      required:
        - triggerType
        - triggerValues
      properties:
        triggerType:
          type: string
          description: The type of trigger
          enum:
            - eventName
        triggerValues:
          description: >-
            List of data asset event names, any of which need to match an event
            to trigger an action
          type: array
          items:
            type: string
            enum:
              - data_asset_created
              - data_asset_modified_field_added
              - data_asset_modified_field_changed
              - data_asset_modified_field_removed
              - data_asset_deleted
              - data_contract_created
              - data_contract_modified
              - data_contract_violation
              - data_contract_deleted
              - data_action_created
              - data_action_deleted
              - data_action_enabled
              - data_action_disabled
              - data_action_modified
              - data_asset_pii_detected
    ActionTriggerNamespace:
      type: object
      required:
        - triggerType
        - triggerValues
      properties:
        triggerType:
          type: string
          description: The type of trigger
          enum:
            - namespace
        triggerValues:
          description: >-
            List of contract namespaces, any of which need to match an event to
            trigger an action
          type: array
          items:
            type: string
    ActionDestinationSlack:
      type: object
      required:
        - destinationType
        - slackChannelIds
      properties:
        destinationType:
          type: string
          description: The type of destination
          enum:
            - slack
        slackChannelIds:
          description: List of slack channels IDs to notify when the action is triggered
          type: array
          items:
            type: string
    ActionDestinationEmail:
      type: object
      required:
        - destinationType
        - emailAddresses
      properties:
        destinationType:
          type: string
          description: The type of destination
          enum:
            - email
        emailAddresses:
          description: List of email addresses to notify when the action is triggered
          type: array
          items:
            type: string
            format: email
    ActionDestinationWebhook:
      type: object
      required:
        - destinationType
        - webhookIds
      properties:
        destinationType:
          type: string
          description: The type of destination
          enum:
            - webhook
        webhookIds:
          description: List of webhook identifiers to notify when the action is triggered
          type: array
          items:
            type: string
    SourceType:
      type: string
      description: >-
        The type of the source data asset, indicating its source or format
        (e.g., postgres, protobuf).
      enum:
        - postgres
        - mysql
        - mssql
        - json_schema
        - avro
        - protobuf
        - python
        - pyspark
        - typescript
        - java
        - s3
        - dataframe
        - kotlin
        - swift
        - php
        - golang
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````