API reference · Webhooks
Create a webhook
POST/v1/webhooks
No description in the spec yet.
Requires a Bearer access token.
Body
CreateWebhookDto1 of 8 fields has no description in the spec.
target#stringrequiredURLFull url including protocol of the endpoint which will receive the webhooks.
events#string[]requiredone of donation_create, donation_update, vote_create, vote_update, recurringdonation_create, recurringdonation_update, campaign_create, campaign_update, charitiesselection_create, charitiesselection_update, paymentmethod_create, charity_publish, charityprofile_update, fiscalreceipt_generated, charity_profile_update, file_generatedList of events to subscribe to.
donation_createdonation_updatevote_createvote_updaterecurringdonation_createrecurringdonation_updatecampaign_createcampaign_updatecharitiesselection_createcharitiesselection_updatepaymentmethod_createcharity_publishcharityprofile_updatefiscalreceipt_generatedcharity_profile_updatefile_generatedauthenticationStrategy#stringrequiredAuthentication scheme to be used when sending the webhooks to the provided endpoint.
BASICBEARERusername#stringRequired for Basic authentication.
password#stringRequired for Basic authentication.
accessToken#stringRequired for Bearer authentication.
accountId#stringUUIDOnly required to create the webhook on a child account instead of the current one. Webhooks of a parent account already receive the events of its child accounts.
name#stringrequired2 to 100 characters
Response
201 · WebhookNo field is described in the spec.
webhookId#stringalways returnedname#stringalways returnedtarget#stringalways returnedevents#string[]always returnedauthenticationStrategy#WebhookAuthenticationStrategyalways returnedBASICBEARERaccessToken#stringalways returnedsigningKey#stringaccountId#stringalways returnedcreatedAt#string (date-time)always returnedupdatedAt#string (date-time)always returned
Errors
400Both username and password are required for Basic authentication
{ "statusCode": 400, "message": "Both username and password are required for Basic authentication", "error": "Bad Request" }400accessToken is required for Bearer authentication
{ "statusCode": 400, "message": "accessToken is required for Bearer authentication", "error": "Bad Request" }400Invalid authenticationStrategy
{ "statusCode": 400, "message": "Invalid authenticationStrategy", "error": "Bad Request" }400A field is missing, has the wrong type, or is not part of the request schema.
Every request with a body or query is validated.
{ "statusCode": 400, "message": [ "amount must not be less than 1", "property foo should not exist" ], "error": "Bad Request" }401Unauthorized
Missing, expired or invalid access token.
{ "statusCode": 401, "message": "Unauthorized" }402Plan upgrade required
{ "statusCode": 402, "message": "Plan upgrade required" }403Account closed
{ "message": "Account closed", "code": "ACCOUNT_CLOSED" }
curl -X POST https://api.sandbox.charitips.com/v1/webhooks \ -H "Authorization: Bearer $CHARITIPS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "target": "https://example.com/charitips/webhooks", "events": [ "donation_update" ], "authenticationStrategy": "BEARER", "name": "Donations", "accessToken": "<endpointToken>" }'Request bodies are written for this docs and checked against the API's validation; ids in angle brackets are placeholders. Response values are placeholders built from the schema.