Zum Inhalt springen

Anwendung erstellen POST ​

Erstelle eine neue Anwendung, um deine Nachrichten zu organisieren und zu kategorisieren.

Endpunkt ​

POST https://api.pocketalert.app/v1/applications

Authentifizierung ​

Erforderlich

Füge einen dieser Header in deine Anfrage ein:

  • Token: <your-api-key> — Hol ihn dir unter API Keys
  • Authorization: Bearer <jwt-token> — Aus Login

Anfrage ​

HeaderErforderlichBeschreibung
Content-Type✅application/json
Token✅Dein API-Schlüssel
Authorization✅Bearer <jwt-token>

Body-Parameter ​

ParameterTypErforderlichBeschreibung
namestring✅Name der Anwendung
colorstring❌Farbe der Anwendung (Hex)

Beispielanfrage ​

bash
curl -X POST "https://api.pocketalert.app/v1/applications" \
  -H "Token: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Production Monitoring",
    "color": "#FF0000"
  }'
javascript
const response = await fetch('https://api.pocketalert.app/v1/applications', {
  method: 'POST',
  headers: {
    'Token': 'your-api-key',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    name: 'Production Monitoring',
    color: '#FF0000'
  })
});

const application = await response.json();
console.log(application);
python
import requests

response = requests.post(
    'https://api.pocketalert.app/v1/applications',
    headers={
        'Token': 'your-api-key',
        'Content-Type': 'application/json'
    },
    json={'name': 'Production Monitoring', 'color': '#FF0000'}
)

print(response.json())
php
$response = Http::withHeaders([
    'Token' => 'your-api-key',
])->post('https://api.pocketalert.app/v1/applications', [
    'name' => 'Production Monitoring',
    'color' => '#FF0000',
]);

return $response->json();

Antwort ​

Erfolgreiche Antwort ​

201 Created

Anwendung erfolgreich erstellt

FeldTypBeschreibung
tidstringEindeutige Kennung der Anwendung
namestringName der Anwendung
colorstringFarbe der Anwendung
is_activebooleanOb die Anwendung aktiv ist
created_atstringZeitstempel der Erstellung
json
{
  "tid": "iemkz2tlbakj4lgns961ohx0o",
  "name": "Production Monitoring",
  "color": "#FF0000",
  "is_active": true,
  "created_at": "18.01.2026 15:29:02"
}

Fehlerantworten ​

StatusBeschreibung
401Nicht autorisiert — Token ungültig oder fehlt
400Ungültige Anfrage — ungültiger Request-Body

Pocket Alert Dokumentation