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
1
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.2
Create a subscription
201 Created:3
Verify your subscription
"isActive": true.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.