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, withmax_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,GETandPATCH /settingsact on the oldest (SendGrid's single webhook of older accounts):GETshows empty settings when there is none, andPATCHthen adds it;GET /settings/signed[/<id>]- its public key (idempty without one);PATCHwith{"enabled": true}answers the same: Karta signs every request, so signing cannot be switched off;POST /test- awebhook.testevent to the webhook with theidorurlgiven (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.