Skip to main content

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.

The values you reach for repeatedly while integrating, in one place. Each section links to the full guide for request shapes and detail.

Base URLs

EnvironmentBase URL
Sandboxhttps://api.sandbox.tesouro.com
Productionhttps://api.tesouro.com
Sandbox and production are fully isolated — data and credentials never cross between them. See Environments.

Authentication

Tokens are issued from the OIDC token endpoint and sent on every request as Authorization: Bearer <token>.
OperationRequestGrant type
App token (server-to-server)POST /openid/connect/tokenclient_credentials
User token (impersonation / widgets)POST /openid/connect/tokenurn:ietf:params:oauth:grant-type:token-exchange
Revoke a tokenPOST /v1/auth/revoke
App tokens are short-lived — refresh before expires_in elapses. See Client credentials and User token.

Rate limits

The API allows 30 requests per second. Exceeding it returns 429 Too Many Requests with a Retry-After header.
HeaderMeaning
RateLimit-LimitRequests allowed per second. Alias: X-RateLimit-Limit-Second.
RateLimit-RemainingRequests remaining in the current second. Alias: X-RateLimit-Remaining-Second.
RateLimit-ResetSeconds until the quota resets.
Retry-AfterOn a 429, seconds to wait before retrying.
Watch RateLimit-Remaining to stay under the ceiling, and back off with exponential delays on a 429, starting from the Retry-After value. See Rate limiting.

Pagination

List endpoints use cursor-based pagination with the same contract everywhere.
ParameterDefaultNotes
limit25Records per page. Maximum 100.
pagination_tokennullOpaque cursor from the previous response. Round-trip it unchanged — never parse or construct one.
Each response carries nextPaginationToken (and prevPaginationToken). Keep requesting with the returned token until nextPaginationToken is null — that is the only stop condition. See Pagination, sorting, and filtering.