Learn how to create a webhook configuration to receive updates from Truv platform.
Overview
Webhooks provide a way for Truv to communicate to your servers when specific events happen. For example, when an account link connects successfully or new pay statements were added, you can receive notifications in realtime.
To start receiving webhooks, your web application needs to expose a publicly accessible URL. Use that URL to create a webhook configuration.
After creating a webhook configuration, you will receive POST requests with the event payloads that contain information about the events that have been triggered.
Attributes
Attribute | Type | Description |
---|---|---|
id | string | Unique ID of webhook configuration |
name | string | Public name for webhook configuration |
webhook_url | string | Webhook URL to send event data |
events | string | List of events connected to webhook URL |
env_type | bool | Type of environment, production , development , or sandbox |
created_at | string | ISO 8601 value for when the webhook configuration was created |
updated_at | string | ISO 8601 value for when the webhook configuration was updated |
Endpoints
Available endpoints for Webhooks are in the list below.
- List all webhooks - GET /webhooks/
- Create a webhook - POST /webhooks/
- Retrieve a webhook - GET webhooks/{id}/
- Update a webhook - PATCH webhooks/{id}/
- Delete a webhook - DELETE webhooks/{id}/
Example response
View the response for the Webhooks endpoints below.
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"webhook_url": "http://example.com/",
"events": [
"task-status-updated",
"order-status-updated"
],
"env_type": "dev",
"created_at": "2022-05-04T11:30:00Z",
"updated_at": "2022-05-04T12:00:00Z"
}