# Quick Start

Get started with PocketAlert in minutes. This guide walks you through sending your first push notification.

## Prerequisites

- A PocketAlert account — [Sign up](https://pocketalert.app/signup) or [Sign in](https://pocketalert.app/signin)
- The PocketAlert mobile app installed on your device

---

## Step 1: Get Your API Key

1. Log in to [PocketAlert](https://pocketalert.app/signin)
2. Navigate to [API Keys](https://pocketalert.app/account/apikeys)
3. Click **Create New Key**
4. Copy and save your API key securely

> **Warning: Important**
>
> Your API key is shown only once. Store it in a safe place.

---

## Step 2: Send Your First Notification

Choose your preferred method:

**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)
}
```

---

## Step 3: Check the Response

A successful request returns:

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

| Field | Description |
|-------|-------------|
| `tid` | Unique message identifier |
| `title` | Your notification title |
| `message` | Your notification body |
| `created_at` | Timestamp when message was sent |

---

## What's Next?

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

**Explore more features:**

- [Create Applications](https://info.pocketalert.app/api/applications/create.md) — Organize messages by project
- [Manage Devices](https://info.pocketalert.app/api/devices/get-devices.md) — Send to specific devices
- [Set up Webhooks](https://info.pocketalert.app/api/webhooks/create.md) — Receive alerts from external services
- [Use the CLI](https://info.pocketalert.app/cli.md) — Send notifications from your terminal

</div>

---

## Need Help?

For further assistance or to share your use cases:

| Resource | Link |
|----------|------|
| Email Support | [support@pocketalert.app](mailto:support@pocketalert.app) |
| API Reference | [Full Documentation](https://info.pocketalert.app/intro.md) |
| CLI Tool | [Download & Install](https://info.pocketalert.app/cli.md) |
