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

# 알림 규칙 채널 수정

> 알림 규칙에서 사용할 알림 채널을 전체 교체합니다.



## OpenAPI

````yaml /api-reference/v3/openapi.json patch /alert-rules/{alert_rule_id}/channels
openapi: 3.1.0
info:
  title: vox.ai API
  description: >
    vox.ai API v3


    ### v3 공개 계약 규칙


    - 인증은 `Authorization: Bearer <token>` 헤더를 사용합니다. 조직 API 키를 Bearer 토큰으로
    전달합니다.

    - 요청과 응답 필드는 기본적으로 `snake_case`를 사용합니다.

    - `agent.data`는 에이전트 레지스트리와 호환되어야 하므로 `callSettings`, `toolIds`,
    `builtInTools`, `presetDynamicVariables` 같은 camelCase 필드를 유지합니다.

    - `_at`으로 끝나는 타임스탬프는 unix milliseconds입니다. 일부 입력값은 호환성을 위해 10~11자리 unix
    seconds도 허용하고 milliseconds로 정규화합니다.

    - 캠페인 통화 가능 시간은 분 단위 정수(`start_min` / `end_min`)를 사용합니다. 알림 스케줄은 `HH:MM`
    문자열(`start_time` / `end_time`)을 사용합니다.

    - 응답 객체 자신의 식별자는 `id`입니다. 다른 리소스를 참조하는 필드와 path parameter는 `agent_id`,
    `call_id`, `telephone_line_id`처럼 명시적인 이름을 사용합니다.

    - 실패 응답은 `{ "error": { "code", "message", "details" } }` 형태입니다. 가능한 경우
    `details.field`, `details.reason`, `details.allowed_values`를 함께 제공합니다.
  version: 3.0.0
servers:
  - url: https://client-api.tryvox.co/v3
    description: 운영
security: []
paths:
  /alert-rules/{alert_rule_id}/channels:
    patch:
      tags:
        - Alerts
      summary: 알림 규칙 채널 수정
      description: 알림 규칙에서 사용할 알림 채널을 전체 교체합니다.
      operationId: updateAlertRuleChannels
      parameters:
        - name: alert_rule_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Alert Rule Id
            description: 알림 규칙 ID입니다.
          description: 알림 규칙 ID입니다.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateChannelsRequest'
        description: 알림 채널 전체 교체 요청입니다.
      responses:
        '200':
          description: 성공 응답
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AlertRuleResponse'
        '400':
          description: 요청 검증 오류
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                validationError:
                  summary: 요청 검증 오류
                  value:
                    error:
                      code: VALIDATION_ERROR
                      message: Request validation failed.
                      details:
                        field: name
                        reason: must not be blank
        '401':
          description: 인증이 필요합니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                unauthorized:
                  summary: Bearer 토큰 누락 또는 오류
                  value:
                    error:
                      code: UNAUTHORIZED
                      message: Authentication is required.
                      details: {}
        '403':
          description: 권한이 없습니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                forbidden:
                  summary: 권한이 없습니다.
                  value:
                    error:
                      code: FORBIDDEN
                      message: Permission denied.
                      details: {}
        '404':
          description: 리소스를 찾을 수 없습니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                notFound:
                  summary: 리소스를 찾을 수 없습니다.
                  value:
                    error:
                      code: RESOURCE_NOT_FOUND
                      message: Resource not found.
                      details:
                        resource: agent
        '409':
          description: 충돌이 발생했습니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                conflict:
                  summary: 상태 충돌이 발생했습니다.
                  value:
                    error:
                      code: CONFLICT
                      message: The requested operation conflicts with current state.
                      details:
                        current_status: draft
        '429':
          description: 요청 한도를 초과했습니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                rateLimited:
                  summary: 요청 한도를 초과했습니다.
                  value:
                    error:
                      code: RATE_LIMIT_EXCEEDED
                      message: Too many requests.
                      details:
                        limit: 5
                        window_seconds: 1
        '500':
          description: 서버 내부 오류가 발생했습니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                internalError:
                  summary: 서버 내부 오류가 발생했습니다.
                  value:
                    error:
                      code: INTERNAL_ERROR
                      message: Internal server error.
                      details: {}
        '503':
          description: 서비스를 일시적으로 사용할 수 없습니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                serviceUnavailable:
                  summary: 서비스를 일시적으로 사용할 수 없습니다.
                  value:
                    error:
                      code: SERVICE_UNAVAILABLE
                      message: Service temporarily unavailable.
                      details: {}
      security:
        - BearerAuth: []
components:
  schemas:
    UpdateChannelsRequest:
      properties:
        notification_channels:
          items:
            oneOf:
              - $ref: '#/components/schemas/WebhookChannelRequest'
              - $ref: '#/components/schemas/EmailChannelRequest'
              - $ref: '#/components/schemas/SlackChannelRequest'
          type: array
          maxItems: 10
          title: Notification Channels
          description: 알림 채널 목록. 기존 채널을 완전히 교체합니다. 최대 10개.
      additionalProperties: false
      type: object
      minProperties: 1
      required:
        - notification_channels
      title: UpdateChannelsRequest
      description: 알림 채널 전체 교체.
    AlertRuleResponse:
      properties:
        id:
          type: string
          title: Id
          description: 알림 규칙의 고유 식별자입니다.
        name:
          type: string
          title: Name
          description: 알림 규칙의 이름입니다.
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: 알림 규칙에 대한 상세 설명입니다.
        metric_type:
          $ref: '#/components/schemas/MetricType'
          description: 모니터링 대상 메트릭 유형입니다.
        labels:
          additionalProperties: true
          type: object
          title: Labels
          description: 메트릭 필터링에 사용되는 레이블 조건입니다.
        threshold_type:
          $ref: '#/components/schemas/ThresholdType'
          description: 임계값 비교 방식입니다.
        comparison_op:
          $ref: '#/components/schemas/ComparisonOperator'
          description: 임계값 비교 연산자입니다.
        threshold_value:
          type: number
          title: Threshold Value
          description: 알림을 발생시키는 임계값입니다.
        time_window:
          $ref: '#/components/schemas/TimeWindow'
          description: 메트릭 집계 시간 범위입니다.
        evaluation_frequency:
          $ref: '#/components/schemas/EvaluationFrequency'
          description: 알림 규칙 평가 주기입니다.
        enabled:
          type: boolean
          title: Enabled
          description: 알림 규칙의 활성화 여부입니다.
        status:
          $ref: '#/components/schemas/AlertRuleStatus'
          description: >-
            파생된 단일 상태입니다. `enabled`/`paused`에서 도출합니다. 'disabled' =
            enabled=false, 'paused' = enabled=true AND paused=true, 'active' = 그
            외. `paused_until`·`active_schedule`은 별도 필드로 유지됩니다.
        notification_channels:
          items:
            oneOf:
              - $ref: '#/components/schemas/WebhookChannelResponse'
              - $ref: '#/components/schemas/EmailChannelResponse'
              - $ref: '#/components/schemas/SlackChannelResponse'
          type: array
          title: Notification Channels
          description: 알림을 전송할 채널 목록입니다. webhook, email, slack 타입을 지원합니다.
        active_schedule:
          anyOf:
            - $ref: '#/components/schemas/ActiveScheduleResponse'
            - type: 'null'
          description: 알림 규칙이 활성화되는 시간 스케줄입니다.
        paused:
          type: boolean
          title: Paused
          description: 알림 규칙의 일시정지 여부입니다.
        paused_until:
          anyOf:
            - type: integer
            - type: 'null'
          title: Paused Until
          description: 알림 일시정지 해제 예정 일시입니다. unix timestamp (ms).
        last_notified_at:
          anyOf:
            - type: integer
            - type: 'null'
          title: Last Notified At
          description: 마지막으로 알림이 전송된 일시입니다. unix timestamp (ms).
        created_at:
          type: integer
          title: Created At
          description: 리소스 생성 시각입니다. unix milliseconds 형식입니다.
        updated_at:
          type: integer
          title: Updated At
          description: 리소스 마지막 수정 시각입니다. unix milliseconds 형식입니다.
      type: object
      required:
        - id
        - name
        - metric_type
        - labels
        - threshold_type
        - comparison_op
        - threshold_value
        - time_window
        - evaluation_frequency
        - enabled
        - status
        - notification_channels
        - paused
        - created_at
        - updated_at
      title: AlertRuleResponse
      description: 알림 규칙 단건 응답입니다.
    ErrorResponse:
      type: object
      required:
        - error
      title: ErrorResponse
      description: 모든 실패 응답에서 사용하는 v3 error envelope입니다.
      examples:
        - error:
            code: VALIDATION_ERROR
            message: Request validation failed.
            details:
              field: name
              reason: must not be blank
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetail'
          description: 오류 payload입니다.
    WebhookChannelRequest:
      properties:
        type:
          type: string
          const: webhook
          title: Type
          default: webhook
          description: 리소스 또는 설정 유형입니다.
      type: object
      title: WebhookChannelRequest
      description: webhook 알림 채널 생성 요청입니다.
    EmailChannelRequest:
      properties:
        type:
          type: string
          const: email
          title: Type
          default: email
          description: 리소스 또는 설정 유형입니다.
        recipients:
          items:
            type: string
          type: array
          maxItems: 20
          minItems: 1
          title: Recipients
          description: 수신자 목록입니다. Email 채널은 email 주소를, Slack 채널은 webhook URL을 사용합니다.
      type: object
      required:
        - recipients
      title: EmailChannelRequest
      description: email 알림 채널 생성 요청입니다.
    SlackChannelRequest:
      properties:
        type:
          type: string
          const: slack
          title: Type
          default: slack
          description: 리소스 또는 설정 유형입니다.
        recipients:
          items:
            type: string
          type: array
          maxItems: 5
          minItems: 1
          title: Recipients
          description: 수신자 목록입니다. Email 채널은 email 주소를, Slack 채널은 webhook URL을 사용합니다.
      type: object
      required:
        - recipients
      title: SlackChannelRequest
      description: Slack 알림 채널 생성 요청입니다.
    MetricType:
      type: string
      enum:
        - call_count
        - concurrency
        - tool_call_count
        - api_call_count
      title: MetricType
      description: |-
        알림 규칙이 모니터링하는 메트릭 종류.

        - `call_count`      : 시간 창 내 통화 건수.
        - `concurrency`     : 동시 진행 통화 수 (peak).
        - `tool_call_count` : 시간 창 내 tool 호출 건수.
        - `api_call_count`  : 시간 창 내 API 호출 건수.
    ThresholdType:
      type: string
      enum:
        - absolute
        - relative
      title: ThresholdType
      description: |-
        `threshold_value` 의 해석 방식.

        - `absolute` : 메트릭 절대값과 직접 비교.
        - `relative` : 직전 같은 시간 창 대비 변화율(%) 과 비교.
    ComparisonOperator:
      type: string
      enum:
        - gt
        - gte
        - lt
        - lte
      title: ComparisonOperator
      description: |-
        임계값 비교 연산자.

        - `gt`  : 메트릭 > 임계값 일 때 알림.
        - `gte` : 메트릭 >= 임계값 일 때 알림.
        - `lt`  : 메트릭 < 임계값 일 때 알림.
        - `lte` : 메트릭 <= 임계값 일 때 알림.
    TimeWindow:
      type: string
      enum:
        - 1m
        - 5m
        - 15m
        - 30m
        - 1h
        - 4h
        - 8h
        - 1d
      title: TimeWindow
      description: 메트릭 집계 시간 창. 표시 형식은 `<숫자><단위>` (`m`=분, `h`=시, `d`=일).
    EvaluationFrequency:
      type: string
      enum:
        - 1m
        - 5m
        - 15m
        - 30m
        - 1h
        - 4h
        - 8h
        - 1d
      title: EvaluationFrequency
      description: |-
        알림 규칙 평가 주기. `time_window` 보다 짧으면 rolling window 로 더 자주 확인.

        표시 형식은 `<숫자><단위>` (`m`=분, `h`=시, `d`=일).
    AlertRuleStatus:
      type: string
      enum:
        - active
        - disabled
        - paused
      title: AlertRuleStatus
      description: >-
        알림 규칙의 단일 상태 값입니다.


        `enabled`와 `paused`에서 도출합니다. `active_schedule`과 `paused_until`은 전체 정보가
        필요한 클라이언트를 위해 별도 메타데이터 필드로 유지합니다.
    WebhookChannelResponse:
      properties:
        type:
          type: string
          const: webhook
          title: Type
          default: webhook
          description: 리소스 또는 설정 유형입니다.
      type: object
      title: WebhookChannelResponse
      description: webhook 알림 채널 응답입니다.
    EmailChannelResponse:
      properties:
        type:
          type: string
          const: email
          title: Type
          default: email
          description: 리소스 또는 설정 유형입니다.
        recipients:
          items:
            type: string
          type: array
          title: Recipients
          description: 이메일 수신자 목록입니다.
      type: object
      required:
        - recipients
      title: EmailChannelResponse
      description: email 알림 채널 응답입니다.
    SlackChannelResponse:
      properties:
        type:
          type: string
          const: slack
          title: Type
          default: slack
          description: 리소스 또는 설정 유형입니다.
        recipients:
          items:
            type: string
          type: array
          title: Recipients
          description: Slack 웹훅 URL 목록입니다.
      type: object
      required:
        - recipients
      title: SlackChannelResponse
      description: Slack 알림 채널 응답입니다.
    ActiveScheduleResponse:
      properties:
        enabled:
          type: boolean
          title: Enabled
          description: 스케줄 활성화 여부입니다.
        timezone:
          type: string
          title: Timezone
          description: 'IANA timezone 이름입니다. 예: `Asia/Seoul`.'
        windows:
          items:
            $ref: '#/components/schemas/ScheduleWindowResponse'
          type: array
          title: Windows
          description: 활성 시간 윈도우 목록입니다.
      type: object
      required:
        - enabled
        - timezone
        - windows
      title: ActiveScheduleResponse
      description: 알림 규칙의 활성 시간 스케줄 응답입니다.
    ErrorDetail:
      type: object
      required:
        - code
        - message
        - details
      title: ErrorDetail
      description: 기계가 읽을 수 있는 v3 오류 상세 정보입니다.
      examples:
        - code: VALIDATION_ERROR
          message: Request validation failed.
          details:
            field: name
            reason: must not be blank
      properties:
        code:
          type: string
          title: Code
          description: 기계가 읽을 수 있는 오류 code입니다. message parsing 대신 이 값을 사용합니다.
          examples:
            - VALIDATION_ERROR
        message:
          type: string
          title: Message
          description: 사용자에게 표시할 수 있는 오류 메시지입니다. 프로그램 처리는 `code`를 사용합니다.
          examples:
            - Request validation failed.
        details:
          type: object
          title: Details
          additionalProperties: true
          description: 구조화된 context입니다. 주로 `field`, `reason`, `allowed_values`를 포함합니다.
    ScheduleWindowResponse:
      properties:
        days:
          items:
            type: string
            enum:
              - Monday
              - Tuesday
              - Wednesday
              - Thursday
              - Friday
              - Saturday
              - Sunday
          type: array
          minItems: 1
          title: Days
          description: 요일 이름입니다. Monday부터 Sunday까지의 영문 값을 사용합니다.
        start_time:
          type: string
          title: Start Time
          description: 시작 시각입니다. `HH:MM` 형식입니다.
        end_time:
          type: string
          title: End Time
          description: 종료 시각입니다. `HH:MM` 형식입니다.
      type: object
      required:
        - days
        - start_time
        - end_time
      title: ScheduleWindowResponse
      description: 활성 시간 윈도우 응답입니다.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Organization API key
      description: '조직 API 키를 `Authorization: Bearer <token>` 형식으로 보냅니다.'

````