Localisé par IA

Créer un webhook

const response = await fetch('https://api.emailit.com/v2/webhooks', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer em_test_51RxCWJ...vS00p61e0qRE',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    name: 'Webhook Production',
    url: 'https://example.com/webhook',
    all_events: false,
    enabled: true,
    events: ['email.accepted', 'email.delivered', 'email.bounced']
  })
});

const result = await response.json();

Réponses

{
  "object": "webhook",
  "id": "wh_2BxFg7KNqr5M...",
  "name": "Webhook Production",
  "url": "https://example.com/webhook",
  "all_events": false,
  "enabled": true,
  "events": ["email.accepted", "email.delivered", "email.bounced"],
  "last_used_at": null,
  "created_at": "2026-02-10T10:00:00.000000+00:00",
  "updated_at": "2026-02-10T10:00:00.000000+00:00"
}