Subscribe to receive notifications about an event.
POST
https://www.prayerletters.com/api/v1/hooks
When a webhook subscription is created, we will immediately trigger an
asynchronous
ping
event at the target URL, so that you
can be sure the subscription is working. See
the Ping a Webhook API call
for details. Unlike normal notifications, this event will not be
retried if there's an error.
Required Parameters
- event
- The name of the webhook.
- target
- The URL that should be notified when the event occurs. The URL may contain query parameters. These will be overwritten if the webhook uses the same parameters.
Expected Response
HTTP/1.1 201 Created
Content-Type: application/json
{
"event": "contact.address_update.v1",
"href": "https://www.prayerletters.com/api/v1/hooks/h-21w-qe71",
"id": "h-21w-qe71",
"target": "https://integrated.app/incoming/prayerletters.com"
}
Error Responses
- 400 hooks.missing_event
- The request didn't include an event.
- 400 hooks.missing_target
- The request didn't include a target.
- 400 hooks.invalid_target
- The target must be an HTTP or HTTPS URL.
- 403 hooks.missing_scope
- You don't have the required scope (permission) to subscribe to the requested webhook. The error body will include the scope that you need.
- 403 hooks.unauthorized
- You don't have access to the requested webhook for a reason other than scope. Contact us for more details.
- 404 hooks.not_found
- The webhook you requested doesn't exist.
API Basics
Contacts API
Files API
Fonts API
Lists API
Logos API
Payment API
Stock API
Webhooks API