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.
Get your credentials
Your client ID and client secret are provided by Tesouro during onboarding. To request access, have your designated team lead submit an access request. Get an access token
Exchange your credentials for a short-lived JWT:curl --location 'https://api.sandbox.tesouro.com/openid/connect/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'client_id=YOUR_CLIENT_ID' \
--data-urlencode 'client_secret=YOUR_CLIENT_SECRET'
Make your first API call
Use the token to call the GraphQL endpoint. For example, create an underwriting application:curl --request POST \
--url https://api.sandbox.tesouro.com/graphql \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--data '{
"query": "mutation CreateApp($input: UnderwritingApplicationCreateInput!) { createUnderwritingApplication(input: $input) { underwritingApplication { id status } errors { __typename } } }",
"variables": {
"input": {
"processingActivity": {
"currency": "USD",
"averageMonthlySalesAmount": 50000,
"averageTicketAmount": 120,
"cardPresentMix": 0.6,
"cardNotPresentMix": 0.4
}
}
}
}'
Next steps