Webhook subscriptions are managed through the Tesouro Notifications API. Each subscription maps an event type to your webhook endpoint. Base URL:Documentation Index
Fetch the complete documentation index at: https://docs.tesouro.com/llms.txt
Use this file to discover all available pages before exploring further.
https://api.tesouro.com/api/v1/notifications/subscriptions
Prerequisites
Before creating a subscription:- A valid authentication token (see Authentication)
- A publicly accessible HTTPS endpoint that accepts POST requests and returns a
2xxstatus code - The following authorization scopes:
notification:subscription:read: list and view subscriptionsnotification:subscription:write: create and update subscriptions
Quick start
Set up your webhook endpoint
Your endpoint must:
- Accept HTTP POST requests
- Return a
2xxstatus code to acknowledge receipt - Be publicly accessible over HTTPS
200 OK immediately and queue the work.Managing subscriptions
List subscriptions
Get a subscription
Update a subscription
UsePATCH to update the webhook URL:
Deactivate a subscription
Inactive subscriptions can’t be updated. To reactivate, set
"isActive": true first, then
apply further changes.API reference
Endpoints
| Method | Endpoint | Description | Scope |
|---|---|---|---|
GET | /api/v1/notifications/subscriptions | List subscriptions | notification:subscription:read |
POST | /api/v1/notifications/subscriptions | Create a subscription | notification:subscription:write |
GET | /api/v1/notifications/subscriptions/{id} | Get a subscription | notification:subscription:read |
PATCH | /api/v1/notifications/subscriptions/{id} | Update a subscription | notification:subscription:write |
Create subscription request
| Field | Type | Required | Description |
|---|---|---|---|
eventType | string | Yes | Event type to subscribe to (see Event types) |
channelType | string | Yes | Delivery channel. Currently: WEBHOOK |
channelConfig | object | Yes | Channel configuration |
channelConfig.type | string | Yes | Must be "webhook" |
channelConfig.url | string | Yes | Your webhook endpoint URL |
Update subscription request
At least one field must be provided.| Field | Type | Required | Description |
|---|---|---|---|
channelType | string | No | New channel type (requires channelConfig if provided) |
channelConfig | object | No | New channel configuration |
isActive | boolean | No | Activate or deactivate the subscription |
Subscription object
| Field | Type | Description |
|---|---|---|
id | UUID | Unique subscription identifier |
organizationId | UUID | Your organization ID |
eventType | string | Subscribed event type |
channelType | string | Delivery channel |
channelConfig.url | string | Your webhook endpoint |
channelConfig.mtlsEnabled | boolean | Whether mTLS is enabled |
isActive | boolean | Subscription status |
createdAt | datetime | Creation timestamp (UTC) |
updatedAt | datetime | Last update timestamp (UTC) |
Error responses
Errors follow the RFC 7807 Problem Details format:| Status | Meaning |
|---|---|
400 | Invalid request: missing fields, invalid URL, or validation failure |
401 | Missing or invalid authentication token |
403 | Valid token but insufficient scopes |
404 | Subscription not found or not owned by your organization |
409 | Duplicate: a subscription with the same event type, channel, and URL already exists. Response body contains the existing subscription. |