KartaWeb.Sendgrid.WebhookController (Karta v1.0.0)

SendGrid's Event Webhook settings (/v3/user/webhooks/event/...): the server's webhooks in SendGrid's format (Karta.Webhooks.Sendgrid), however they were made, as SendGrid's API shows its event webhooks.

  • GET /settings/all - every one, with max_allowed (20, the most a server may have);
  • POST /settings - adds one (url, enabled, friendly_name, the events on or off: processed, dropped, delivered, deferred, bounce, open, click, unsubscribe); at least one event;
  • GET, PATCH, DELETE /settings/<id> - one; only the fields given change. Without an id, GET and PATCH /settings act on the oldest (SendGrid's single webhook of older accounts): GET shows empty settings when there is none, and PATCH then adds it;
  • GET /settings/signed[/<id>] - its public key (id empty without one); PATCH with {"enabled": true} answers the same: Karta signs every request, so signing cannot be switched off;
  • POST /test - a webhook.test event to the webhook with the id or url given (204).

A webhook's id is Karta's; its friendly_name its name ("SendGrid webhook" when none is given). spam_report, group_unsubscribe and group_resubscribe have no event in Karta: they are always off, and turning them on changes nothing. OAuth is not available (a user name and password in the URL authenticate Karta instead); account_status_change is ignored. A URL is used by one webhook only. Errors are in SendGrid's form; an unknown id is "Invalid id provided." (404). webhooks:read reads, webhooks:write changes and tests.

Summary

Functions

create(conn, params)

delete(conn, map)

index(conn, params)

show(conn, params)

sign(conn, params)

signed(conn, params)

test(conn, params)

update(conn, params)