Webhooks
Webhooks are event driven operations within the Pipevest system.
Whenever an event is triggered a JSON payload is sent to all urls that have subscribed to the event.
This document will guide you on how to create, update and get webhook details.
Creating a Webhook
Section titled “Creating a Webhook”To create a webhook:
curl --request POST \ --url https://api.pipevest.com/v1/webhooks\ --header 'Authorization: Bearer 123456' \ --header 'Content-Digest: sha-512=:RK/0qy18MlBSVnWgjwz6lZEWjP/lF5HF9bvEF8FabDg=:' \ --header 'Content-Length: 18' \ --header 'Content-Type: application/json' \ --header 'Signature: sig1=:OTEyMjY4...A5NTNDMEQ=:' \ --header 'Signature-Input: sig1=("authorization" "content-digest" "content-length" "content-type" "x-client-id" "x-idempotency-key" "@method" "@target-uri" "@path" "@query");keyid="staging-pipevest-ed25519";created=1732893484;expires=1732893584' \ --header 'X-Idempotency-Key: 123456' \ ... --data '{"url": "https://companyx.com/webhook2", "subscriptions": ["ALL"]}'Testing Webhook
Section titled “Testing Webhook”To test a webhook:
curl --request POST \ --url https://api.pipevest.com/v1/webhooks/test\ --header 'Authorization: Bearer 123456' \ --header 'Signature: sig1=:OTEyMjY4...A5NTNDMEQ=:' \ --header 'Signature-Input: sig1=("authorization" "x-client-id" "x-idempotency-key" "@method" "@target-uri" "@path" "@query");keyid="staging-pipevest-ed25519";created=1732893484;expires=1732893584' \ --header 'X-Idempotency-Key: 123456' \ ...Updating Webhooks
Section titled “Updating Webhooks”If you need to change a webhook’s details:
curl --request PUT \ --url https://api.pipevest.com/v1/webhooks\ ... --data '{"url": "https://companyx.com/webhook2", "subscriptions": ["ACCOUNT"]}'Retrieving Webhook Config
Section titled “Retrieving Webhook Config”To retrieve a webhook’s configuration:
curl --request GET \ --url https://api.pipevest.com/v1/webhooks\ --header 'Authorization: Bearer 123456' \ --header 'Signature: sig1=:OTEyMjY4...A5NTNDMEQ=:' \ --header 'Signature-Input: sig1=("authorization" "x-client-id" "@method" "@target-uri" "@path" "@query");keyid="staging-pipevest-ed25519";created=1732893484;expires=1732893584' \ --header 'X-Client-Id: 123456' \Retrieving Webhook Public Key
Section titled “Retrieving Webhook Public Key”To retrieve a webhook’s public key:
curl --request GET \ --url https://api.pipevest.com/v1/webhooks/key\ --header 'Authorization: Bearer 123456' \ --header 'Signature: sig1=:OTEyMjY4...A5NTNDMEQ=:' \ --header 'Signature-Input: sig1=("authorization" "x-client-id" "@method" "@target-uri" "@path" "@query");keyid="staging-pipevest-ed25519";created=1732893484;expires=1732893584' \ --header 'X-Client-Id: 123456' \Entity Reference
Section titled “Entity Reference”| Property | Definition |
|---|---|
webhookId |
Unique webhook identifier |
status |
The status of the webhook |
url |
A valid https url |
subscriptions |
List of webhook subscriptions |
createdAt |
Created at unix timestamp |
updatedAt |
Updated at unix timestamp |
Status
Section titled “Status”| Name | Definition |
|---|---|
ACTIVE |
Webhook is currenting live |
DEACTIVED |
Webhook has been deactived |
Webhook Subscriptions
Section titled “Webhook Subscriptions”| Subscription | Definition | Domain |
|---|---|---|
WEBHOOK |
Only events that deal with webhooks | Webhooks |
WEBHOOK.CREATED |
Triggered when a webhook is created. Subscription created automatically | Webhooks |
WEBHOOK.UPDATED |
Triggered when a webhook is updated | Webhooks |
Deep dive into webhooks on the Pipevest platforms