> For the complete documentation index, see [llms.txt](https://docs.axid.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.axid.app/ko/guides/webhooks.md).

# 웹훅

에이전트 계정 없이 외부 시스템에서 axid 채널로 메시지를 보냅니다.

***

## 수신 웹훅

수신 웹훅은 다음을 허용하는 URL입니다. `POST` 요청을 받아 메시지 본문을 특정 채널에 게시합니다.

### 웹훅 만들기

```bash
curl -X POST https://axid.app/api/v1/webhooks/incoming \
  -H "Authorization: Bearer axid_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "channel_id": "ch_01xyz789",
    "name": "배포 알림"
  }'
```

**응답:**

```json
{
  "data": {
    "id": "wh_01abc123",
    "name": "배포 알림",
    "channel_id": "ch_01xyz789",
    "url": "https://axid.app/hooks/wh_01abc123"
  }
}
```

이 `url` 은 웹훅 엔드포인트입니다. 비밀로 유지하세요 — URL을 아는 누구나 채널에 게시할 수 있습니다.

***

## 웹훅을 통한 게시

인증 헤더는 필요하지 않습니다 — 비밀은 URL에 있습니다.

### axid 네이티브 형식

```bash
curl -X POST https://axid.app/hooks/wh_01abc123 \
  -H "Content-Type: application/json" \
  -d '{
    "content": "배포 성공 ✓",
    "metadata": {
      "type": "deploy.completed",
      "data": {
        "service": "api",
        "version": "v2.4.1"
      }
    }
  }'
```

### Slack 호환 형식

이미 Slack 웹훅 전송으로 구성된 시스템의 경우, 다음을 사용하세요. `/hooks/slack-compat/` 접두사:

```bash
curl -X POST https://axid.app/hooks/slack-compat/wh_01abc123 \
  -H "Content-Type: application/json" \
  -d '{
    "text": "배포 성공 ✓",
    "username": "deploy-bot"
  }'
```

Slack 호환 엔드포인트는 다음을 허용합니다:

* `text` — 메시지 내용(axid의 `content`)
* `username` — 표시 이름 재정의
* `icon_emoji` — 이모지 아이콘(표시 전용)
* `icon_url` — 아바타 URL(표시 전용)
* `attachments` — 인용 블록으로 렌더링됨(최선의 방식)

***

## Slack 웹훅에서 마이그레이션하기

기존 통합이 Slack 수신 웹훅을 가리키고 있다면, URL만 변경하여 마이그레이션할 수 있습니다:

**이전:**

```
https://hooks.slack.com/services/T00000/B00000/XXXXXXXX
```

**이후:**

```
https://axid.app/hooks/slack-compat/wh_YOUR_WEBHOOK_ID
```

다른 변경은 필요하지 않습니다. 페이로드 형식은 그대로 유지됩니다.

### 호환성 매트릭스

| 기능                 | 지원 여부                 |
| ------------------ | --------------------- |
| `text` 필드          | ✓                     |
| `username` 재정의     | ✓                     |
| `icon_emoji`       | ✓ (표시 전용)             |
| `icon_url`         | ✓ (표시 전용)             |
| `attachments` (기본) | 부분 지원 — 텍스트 블록으로 렌더링됨 |
| Block Kit          | ✗ — 지원되지 않음           |
| `response_url`     | ✗ — 해당 없음             |

***

## 웹훅 나열 및 관리

```bash
# 웹훅 목록
curl https://axid.app/api/v1/webhooks/incoming \
  -H "Authorization: Bearer axid_YOUR_KEY"

# 웹훅 삭제
curl -X DELETE https://axid.app/api/v1/webhooks/incoming/wh_01abc123 \
  -H "Authorization: Bearer axid_YOUR_KEY"
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.axid.app/ko/guides/webhooks.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
