Create a Webhook Subscription
POST/v1/webhook-subscriptions
Create a Webhook Subscription. Specify the event types to subscribe to and the URL where the notifications will be sent, the URL must be https.
Request​
- application/json
Body
required
Events to subscribe to
Possible values: [validation_request.approved
, validation_request.rejected
, agent_verification.pending_review
, agent_verification.pending_user_verification
, agent_verification.approved
, agent_verification.rejected
, monitoring_subscription.updated
, eligibility_subscription.updated
, validation_submission.created
, validation_submission.succeeded
, validation_submission.failed
, validation_submission.updated
, donation.hosted.payment_received
, donation.created
, donation.settled
, donation.disbursed
, donation.payment_successful
, donation.cancelled
, donation.reassigned
]
URL to which notifications should be sent (https only)
https://example.com/webhooks
Responses​
- 200
- 400
- 401
- 403
Successfully created a Webhook Subscription
- application/json
- Schema
- Example (from schema)
Schema
data
object
webhooksubscription_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Possible values: [validation_request.approved
, validation_request.rejected
, agent_verification.pending_review
, agent_verification.pending_user_verification
, agent_verification.approved
, agent_verification.rejected
, monitoring_subscription.updated
, eligibility_subscription.updated
, validation_submission.created
, validation_submission.succeeded
, validation_submission.failed
, validation_submission.updated
, donation.hosted.payment_received
, donation.created
, donation.settled
, donation.disbursed
, donation.payment_successful
, donation.cancelled
, donation.reassigned
]
https://example.com/my-webhook-handler
webhook_subscription
{
"data": {
"id": "webhooksubscription_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"events": [
"validation_request.approved"
],
"url": "https://example.com/my-webhook-handler",
"secret": "string",
"createdAt": "2024-07-29T15:51:28.071Z",
"updatedAt": "2024-07-29T15:51:28.071Z",
"deletedAt": "2024-07-29T15:51:28.071Z"
},
"object": "webhook_subscription"
}
Bad request
- application/json
- Schema
- Example (from schema)
- IncorrectParams
Schema
error
object
{
"error": {
"code": "string",
"title": "string",
"message": "string",
"reasons": [
"string"
]
}
}
400 Incorrect Parameters
{
"error": {
"code": "bad_request",
"title": "Bad request",
"message": "One or more of the inputs were invalid",
"reasons": [
"pageSize must be greater than or equal to 0"
]
}
}
Unauthorized
Forbidden (scope)
- application/json
- Schema
- Example (from schema)
Schema
error
object
forbidden
Forbidden
Access is denied due to missing scope permissions
{
"error": {
"code": "forbidden",
"title": "Forbidden",
"message": "Access is denied due to missing scope permissions"
}
}