# 빠른 시작

몇 분이면 PocketAlert를 시작할 수 있어요. 이 가이드에서는 첫 번째 푸시 알림을 보내는 방법을 안내해 드려요.

## 사전 준비

- PocketAlert 계정 — [회원가입](https://pocketalert.app/signup) 또는 [로그인](https://pocketalert.app/signin)
- 기기에 설치된 PocketAlert 모바일 앱

---

## 1단계: API 키 발급받기

1. [PocketAlert](https://pocketalert.app/signin)에 로그인해요
2. [API 키](https://pocketalert.app/account/apikeys) 메뉴로 이동해요
3. **새 키 만들기**를 클릭해요
4. API 키를 복사해서 안전한 곳에 저장해요

> **Warning: 중요**
>
> API 키는 한 번만 표시돼요. 안전한 곳에 보관해 주세요.

---

## 2단계: 첫 번째 알림 보내기

원하는 방법을 선택해 주세요:

**cURL**

```bash
curl -X POST "https://api.pocketalert.app/v1/messages" \
  -H "Token: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Hello from API",
    "message": "This is my first notification!"
  }'
```

**JavaScript**

```javascript
const response = await fetch('https://api.pocketalert.app/v1/messages', {
  method: 'POST',
  headers: {
    'Token': 'YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    title: 'Hello from API',
    message: 'This is my first notification!'
  })
});

const data = await response.json();
console.log('Message sent:', data.tid);
```

**Python**

```python
import requests

response = requests.post(
    'https://api.pocketalert.app/v1/messages',
    headers={
        'Token': 'YOUR_API_KEY',
        'Content-Type': 'application/json'
    },
    json={
        'title': 'Hello from API',
        'message': 'This is my first notification!'
    }
)

print('Message sent:', response.json()['tid'])
```

**PHP**

```php
$response = Http::withHeaders([
    'Token' => 'YOUR_API_KEY',
])->post('https://api.pocketalert.app/v1/messages', [
    'title' => 'Hello from API',
    'message' => 'This is my first notification!',
]);

echo 'Message sent: ' . $response['tid'];
```

**Go**

```go
package main

import (
    "bytes"
    "encoding/json"
    "net/http"
)

func main() {
    payload := map[string]string{
        "title":   "Hello from API",
        "message": "This is my first notification!",
    }
    body, _ := json.Marshal(payload)

    req, _ := http.NewRequest("POST", 
        "https://api.pocketalert.app/v1/messages", 
        bytes.NewBuffer(body))
    req.Header.Set("Token", "YOUR_API_KEY")
    req.Header.Set("Content-Type", "application/json")

    client := &http.Client{}
    client.Do(req)
}
```

---

## 3단계: 응답 확인하기

요청이 성공하면 다음과 같은 응답을 받아요:

```json
{
  "tid": "cq4k7rml9m2qqmuw44ypoos93",
  "title": "Hello from API",
  "message": "This is my first notification!",
  "application": "",
  "device": "",
  "created_at": "18.01.2026 15:30:00"
}
```

| 필드 | 설명 |
|-------|-------------|
| `tid` | 메시지의 고유 식별자 |
| `title` | 알림 제목 |
| `message` | 알림 본문 |
| `created_at` | 메시지가 발송된 시각 |

---

## 다음 단계는?

<div class="tip custom-block" style="padding-top: 8px">

**더 많은 기능 살펴보기:**

- [애플리케이션 만들기](https://info.pocketalert.app/api/applications/create.md) — 프로젝트별로 메시지 정리하기
- [기기 관리하기](https://info.pocketalert.app/api/devices/get-devices.md) — 특정 기기로 보내기
- [웹훅 설정하기](https://info.pocketalert.app/api/webhooks/create.md) — 외부 서비스에서 알림 받기
- [CLI 사용하기](https://info.pocketalert.app/cli.md) — 터미널에서 알림 보내기

</div>

---

## 도움이 필요하신가요?

추가 도움이 필요하거나 사용 사례를 공유하고 싶다면 아래를 참고해 주세요:

| 리소스 | 링크 |
|----------|------|
| 이메일 지원 | [support@pocketalert.app](mailto:support@pocketalert.app) |
| API 레퍼런스 | [전체 문서](https://info.pocketalert.app/intro.md) |
| CLI 도구 | [다운로드 및 설치](https://info.pocketalert.app/cli.md) |
