Docs
Account, keys and webhooks ›

Get webhook

GET/v1/webhooks/{id}

One webhook, and its tries of the last 30 days.

RequestTypeScript
  1. import { Agental } from "agental-sdk";
  2. const agental = new Agental();
  3. const webhook = await agental.getWebhook("wh_3e8b0c5a9d2f7146");
Answer200 OK
  1. {
  2. "id": string,
  3. "url": string,
  4. "events": string[],
  5. "description": string,
  6. "createdAt": string,
  7. "updatedAt": string,
  8. "signingSecret": string,
  9. "deliveries": [{
  10. "id": string,
  11. "event": string,
  12. "status": string,
  13. "httpStatus": integer | null,
  14. "error": string | null,
  15. "createdAt": string,
  16. … 2 more
  17. }],
  18. }

Webhook and recorded deliveries.

Path

idrequired
string

Headers

Authorizationrequired
Bearer key
An API key that may make this call.

Returns

200 Webhook and recorded deliveries. No signing secret.

JSON8 fields
id
string
url
string
events
string[]
description
string
createdAt
string
updatedAt
string
signingSecret
string
Returned only on create and rotate.
deliveries
object[]8 fields
id
string
event
string
status
string
httpStatus
integernull
error
stringnull
createdAt
string
eventId
stringnull
The id of the event this was a try of: the id in what was sent.
More An event that is not taken is tried again, eight times over about a day, under the same id.
attempt
integernull
Which try of that event this was, counted from 1.

Errors and other answers

404 Not found.

Every error answers { "error": { "code", "message" } }; a key without the action a call needs answers 403 key_action_forbidden, naming it.