Aller au contenu

Supprimer un webhook DELETE ​

Supprime définitivement un webhook. Cette action est irréversible.

Point de terminaison ​

DELETE https://api.pocketalert.app/v1/webhooks/{tid}

Authentification ​

Obligatoire

Incluez l’un de ces en-têtes dans votre requête :

  • Token: <your-api-key> — Récupérez-la depuis Clés API
  • Authorization: Bearer <jwt-token> — Depuis Connexion

Requête ​

Paramètres de chemin ​

ParamètreTypeObligatoireDescription
tidstring✅Identifiant unique du webhook

En-têtes ​

En-têteObligatoireDescription
Token✅Votre clé API
Authorization✅Bearer <jwt-token>

Exemple de requête ​

bash
curl -X DELETE "https://api.pocketalert.app/v1/webhooks/kblf7mh9j8jjyeh4fx" \
  -H "Token: your-api-key"
javascript
const tid = 'kblf7mh9j8jjyeh4fx';
await fetch(`https://api.pocketalert.app/v1/webhooks/${tid}`, {
  method: 'DELETE',
  headers: { 'Token': 'your-api-key' }
});
python
import requests

tid = 'kblf7mh9j8jjyeh4fx'
response = requests.delete(
    f'https://api.pocketalert.app/v1/webhooks/{tid}',
    headers={'Token': 'your-api-key'}
)
php
$tid = 'kblf7mh9j8jjyeh4fx';
$response = Http::withHeaders([
    'Token' => 'your-api-key',
])->delete('https://api.pocketalert.app/v1/webhooks/'.$tid);

return $response->json();

Réponse ​

Réponse de succès ​

200 OK

Webhook supprimé avec succès

json
{
  "data": "success"
}

Réponses d’erreur ​

StatutDescription
401Non autorisé — Jeton invalide ou manquant
404Introuvable — Le webhook n’existe pas

Documentation de Pocket Alert