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

# Update Event Source

> Rename a source, change its feed, or take it online or offline.



## OpenAPI

````yaml https://platform.tracecat.com/api/openapi.json patch /workspaces/{workspace_id}/event-sources/{source_id}
openapi: 3.1.0
info:
  title: Tracecat API
  summary: Tracecat API
  description: The open source AI automation platform for security teams and agents.
  termsOfService: >-
    https://docs.google.com/document/d/e/2PACX-1vQvDe3SoVAPoQc51MgfGCP71IqFYX_rMVEde8zC4qmBCec5f8PLKQRdxa6tsUABT8gWAR9J-EVs2CrQ/pub
  contact:
    name: Tracecat Founders
    email: founders@tracecat.com
  license:
    name: AGPL-3.0
    url: https://www.gnu.org/licenses/agpl-3.0.html
  version: '1'
servers:
  - url: /api
security: []
tags:
  - name: public
    description: Public facing endpoints
  - name: workflows
    description: Workflow management
  - name: actions
    description: Action management
  - name: triggers
    description: Workflow triggers
  - name: secrets
    description: Secret management
  - name: variables
    description: Workspace variable management
paths:
  /workspaces/{workspace_id}/event-sources/{source_id}:
    patch:
      tags:
        - triggers
      summary: Update Event Source
      description: Rename a source, change its feed, or take it online or offline.
      operationId: triggers-update_event_source
      parameters:
        - name: source_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Source Id
        - name: workspace_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Workspace Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EventSourceUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventSourceRead'
        '400':
          description: See detail.code
        '404':
          description: See detail.code
        '409':
          description: See detail.code
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyCookie: []
        - ServiceAccountApiKeyBearer: []
components:
  schemas:
    EventSourceUpdate:
      properties:
        name:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: Name
        config:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/AwsSnsSourceConfig'
              discriminator:
                propertyName: kind
                mapping:
                  aws_sns: '#/components/schemas/AwsSnsSourceConfig'
            - type: 'null'
          title: Config
          description: >-
            Replaces the whole config. The kind cannot change. Changing where
            events come from resets the subscription to pending.
        status:
          anyOf:
            - $ref: '#/components/schemas/TriggerStatus'
            - type: 'null'
      type: object
      title: EventSourceUpdate
    EventSourceRead:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        kind:
          $ref: '#/components/schemas/EventSourceKind'
        name:
          type: string
          title: Name
        config:
          oneOf:
            - $ref: '#/components/schemas/AwsSnsSourceConfig'
          title: Config
          discriminator:
            propertyName: kind
            mapping:
              aws_sns: '#/components/schemas/AwsSnsSourceConfig'
        status:
          $ref: '#/components/schemas/TriggerStatus'
        subscription_status:
          $ref: '#/components/schemas/SubscriptionStatus'
        subscription_ref:
          anyOf:
            - type: string
            - type: 'null'
          title: Subscription Ref
          description: >-
            The provider's subscription ID, e.g. the SNS subscription ARN. Null
            for callers without trigger:update.
        endpoint_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Endpoint Url
          description: >-
            Point the feed (e.g. the SNS subscription) at this HTTPS URL. It
            does not change. Null for callers without trigger:update.
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - kind
        - name
        - config
        - status
        - subscription_status
        - subscription_ref
        - endpoint_url
        - created_at
        - updated_at
      title: EventSourceRead
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AwsSnsSourceConfig:
      properties:
        kind:
          type: string
          const: aws_sns
          title: Kind
        topic_arn:
          type: string
          pattern: >-
            ^arn:aws(-cn|-us-gov)?:sns:[a-z]{2}(-[a-z]+)+-\d:\d{12}:[A-Za-z0-9_-]{1,256}$
          title: Topic Arn
          description: ARN of the customer's SNS topic. The source accepts no other.
          examples:
            - arn:aws:sns:us-east-1:123456789012:bucket-events
        bucket:
          anyOf:
            - type: string
            - type: 'null'
          title: Bucket
          description: >-
            Accept events for this S3 bucket only. A bucket name or ARN (in the
            topic's partition), saved as the name. Null or omitted accepts every
            bucket that publishes to the topic. It checks the bucket named in
            each message, so it adds to the topic policy's `aws:SourceArn` and
            `aws:SourceAccount` conditions and does not replace them.
          examples:
            - my-bucket
      type: object
      required:
        - kind
        - topic_arn
      title: AwsSnsSourceConfig
      description: Events pushed by a customer-owned SNS topic, pinned by its ARN.
    TriggerStatus:
      type: string
      enum:
        - online
        - offline
      title: TriggerStatus
      description: Whether a source, trigger or binding takes part in dispatch.
    EventSourceKind:
      type: string
      enum:
        - aws_sns
      title: EventSourceKind
      description: How a source's events arrive and are verified.
    SubscriptionStatus:
      type: string
      enum:
        - pending
        - confirmed
      title: SubscriptionStatus
      description: State of the provider subscription that feeds an event source.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyCookie:
      type: apiKey
      in: cookie
      name: fastapiusersauth
    ServiceAccountApiKeyBearer:
      type: http
      description: Tracecat service account API key.
      scheme: bearer

````

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