Skip to main content
Webhook subscriptions are managed through the Tesouro Notifications API. Each subscription maps an event type to your webhook endpoint. Base URL: 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 2xx status code
  • The following authorization scopes:
    • notification:subscription:read: list and view subscriptions
    • notification:subscription:write: create and update subscriptions

Quick start

1

Set up your webhook endpoint

Your endpoint must:
  • Accept HTTP POST requests
  • Return a 2xx status code to acknowledge receipt
  • Be publicly accessible over HTTPS
Process payloads asynchronously. Return 200 OK immediately and queue the work.
2

Create a subscription

A successful response returns 201 Created:
3

Verify your subscription

Confirm your subscription appears in the response with "isActive": true.

Managing subscriptions

List subscriptions

Get a subscription

Update a subscription

Use PATCH 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

Create subscription request

Update subscription request

At least one field must be provided.

Subscription object

Error responses

Errors follow the RFC 7807 Problem Details format: