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

# 웹훅 수정

> 웹훅 정보를 수정합니다. 테스트 API 키는 같은 owner의 테스트 엔드포인트만 수정할 수 있습니다. `isTest` 생략은 테스트 모드를 유지하고 true는 허용되며 false는 `AUTH_FORBIDDEN`을 반환합니다. live 또는 다른 owner ID는 `WEBHOOK_NOT_FOUND`를 반환합니다.



## OpenAPI

````yaml ko/api-reference/openapi.yaml PUT /api/v2/orders/webhooks/{webhookId}
openapi: 3.0.0
info:
  title: BIZ MORI API
  version: 2.0.0
  description: >
    BIZ MORI API는 디지털 콘텐츠 보호를 위한 네 가지 핵심 서비스를 제공합니다:

    - **Anti-AI**: 이미지를 AI 학습으로부터 보호

    - **Watermark Embed**: 이미지에 보이지 않는 디지털 워터마크 삽입

    - **Watermark Extract**: 이미지에서 워터마크 추출 및 검증

    - **AI Detection**: 이미지가 AI로 생성되었는지 감지

    - **테스트 API 키**: `sk_test_` 접두사의 키는 동일한 Bearer 인증을 사용하며, 실제 처리 서비스나 크레딧 사용
    없이 주문 흐름을 검증할 수 있습니다. 테스트 업로드는 파일 내용을 폐기하고 결과 파일을 만들지 않습니다
  contact:
    name: BIZ MORI 지원
    email: support@bizmori.com
servers:
  - url: https://api.bizmori.com
    description: 프로덕션
security: []
tags:
  - name: Anti-AI
    description: AI 학습 방지 이미지 보호 주문
  - name: Watermark Embed
    description: 워터마크 삽입 주문
  - name: Watermark Extract
    description: 워터마크 추출 주문
  - name: AI Detection
    description: AI 생성 이미지 감지 주문
  - name: Orders
    description: 주문 조회 및 관리
  - name: Webhooks
    description: 웹훅 설정 및 이벤트
paths:
  /api/v2/orders/webhooks/{webhookId}:
    put:
      tags:
        - Webhooks
      summary: 웹훅 수정
      description: >-
        웹훅 정보를 수정합니다. 테스트 API 키는 같은 owner의 테스트 엔드포인트만 수정할 수 있습니다. `isTest` 생략은
        테스트 모드를 유지하고 true는 허용되며 false는 `AUTH_FORBIDDEN`을 반환합니다. live 또는 다른 owner
        ID는 `WEBHOOK_NOT_FOUND`를 반환합니다.
      parameters:
        - in: path
          name: webhookId
          required: true
          schema:
            type: integer
          description: 웹훅 ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookUpdateRequest'
      responses:
        '200':
          description: 수정 성공
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                      name:
                        type: string
                      url:
                        type: string
                        format: uri
                      isActive:
                        type: boolean
                      isTest:
                        type: boolean
                        description: 테스트 엔드포인트 여부
                      updatedAt:
                        type: string
                        format: date-time
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/WebhookNotFound'
      security:
        - BearerAuth: []
      x-codeSamples:
        - lang: curl
          label: cURL
          source: >-
            curl -X PUT
            https://api.bizmori.com/api/v2/orders/webhooks/WEBHOOK_ID \
              -H "Authorization: Bearer YOUR_API_TOKEN" \
              -H "Content-Type: application/json" \
              -d '{
                "name": "Updated Webhook",
                "url": "https://example.com/webhook-v2"
              }'
        - lang: javascript
          label: JavaScript
          source: |-
            const webhookId = 'WEBHOOK_ID';
            const response = await fetch(
              `https://api.bizmori.com/api/v2/orders/webhooks/${webhookId}`,
              {
                method: 'PUT',
                headers: {
                  'Authorization': 'Bearer YOUR_API_TOKEN',
                  'Content-Type': 'application/json'
                },
                body: JSON.stringify({
                  name: 'Updated Webhook',
                  url: 'https://example.com/webhook-v2'
                })
              }
            );
            const data = await response.json();
        - lang: python
          label: Python
          source: |-
            import requests

            webhook_id = 'WEBHOOK_ID'
            response = requests.put(
                f'https://api.bizmori.com/api/v2/orders/webhooks/{webhook_id}',
                headers={'Authorization': 'YOUR_API_KEY'},
                json={
                    'name': 'Updated Webhook',
                    'url': 'https://example.com/webhook-v2'
                }
            )
            data = response.json()
components:
  schemas:
    WebhookUpdateRequest:
      type: object
      required:
        - url
      properties:
        name:
          type: string
          maxLength: 100
          description: 웹훅 이름
        url:
          type: string
          format: uri
          description: 웹훅 URL
          example: https://example.com/webhook
        isTest:
          type: boolean
          description: >-
            엔드포인트 모드. 테스트 API 키에서는 생략 시 테스트 모드를 유지하고 true는 허용되며 false는
            AUTH_FORBIDDEN을 반환합니다. live API 키는 두 모드를 선택할 수 있습니다.
    ErrorResponse:
      type: object
      properties:
        code:
          type: string
          description: 에러 코드
  responses:
    BadRequest:
      description: 잘못된 요청
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: VALIDATION_FAILED
    Unauthorized:
      description: 인증 실패
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: AUTH_NOT_AUTHENTICATED
    Forbidden:
      description: API 키가 요청한 모드를 사용할 권한이 없음
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: AUTH_FORBIDDEN
    WebhookNotFound:
      description: 웹훅 엔드포인트를 찾을 수 없거나 이 API 키로 접근할 수 없음
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: WEBHOOK_NOT_FOUND
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        외부 클라이언트 접근을 위한 Bearer API 키. 일반 키는 `sk_` 접두사를 사용하고, 테스트 키는 `sk_test_`
        접두사로 모의 응답을 사용해 실제 처리나 크레딧 사용 없이 주문 흐름을 검증합니다.

````