# Schnellstart

Leg in wenigen Minuten los mit PocketAlert. Diese Anleitung zeigt dir, wie du deine erste Push-Benachrichtigung verschickst.

## Voraussetzungen

- Ein PocketAlert-Konto — [Registrieren](https://pocketalert.app/signup) oder [Anmelden](https://pocketalert.app/signin)
- Die PocketAlert-App, installiert auf deinem Gerät

---

## Schritt 1: Hol dir deinen API-Schlüssel

1. Melde dich bei [PocketAlert](https://pocketalert.app/signin) an
2. Öffne [API-Schlüssel](https://pocketalert.app/account/apikeys)
3. Klicke auf **Neuen Schlüssel erstellen**
4. Kopiere deinen API-Schlüssel und speichere ihn sicher

> **Warning: Wichtig**
>
> Dein API-Schlüssel wird nur einmal angezeigt. Bewahre ihn an einem sicheren Ort auf.

---

## Schritt 2: Verschicke deine erste Benachrichtigung

Wähle deine bevorzugte Methode:

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

---

## Schritt 3: Prüfe die Antwort

Eine erfolgreiche Anfrage liefert:

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

| Feld | Beschreibung |
|-------|-------------|
| `tid` | Eindeutige Nachrichten-ID |
| `title` | Dein Titel der Benachrichtigung |
| `message` | Dein Inhalt der Benachrichtigung |
| `created_at` | Zeitstempel, wann die Nachricht gesendet wurde |

---

## Und jetzt?

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

**Entdecke mehr Funktionen:**

- [Anwendungen erstellen](https://info.pocketalert.app/api/applications/create.md) — Nachrichten nach Projekt organisieren
- [Geräte verwalten](https://info.pocketalert.app/api/devices/get-devices.md) — An bestimmte Geräte senden
- [Webhooks einrichten](https://info.pocketalert.app/api/webhooks/create.md) — Alarme von externen Diensten empfangen
- [CLI verwenden](https://info.pocketalert.app/cli.md) — Benachrichtigungen aus dem Terminal senden

</div>

---

## Brauchst du Hilfe?

Für weitere Unterstützung oder um deine Anwendungsfälle mit uns zu teilen:

| Ressource | Link |
|----------|------|
| E-Mail-Support | [support@pocketalert.app](mailto:support@pocketalert.app) |
| API-Referenz | [Vollständige Dokumentation](https://info.pocketalert.app/intro.md) |
| CLI-Tool | [Herunterladen & Installieren](https://info.pocketalert.app/cli.md) |
