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.
Counterparts of type organization can have contact information associated with them. The contact information can be used to pay the invoices issued by those counterparts.
To add a contact to a counterpart, call POST /counterparts/{counterpart_id}/contacts :
curl -X POST 'https://api.sandbox.tesouro.com/v1/counterparts/{counterpart_id}/contacts' \
-H 'X-Finops-Version: 2025-06-23' \
-H 'X-Organization-Id: ORGANIZATION_ID' \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"first_name": "Mary",
"last_name": "O Brien",
"email": "contact@example.org",
"phone": "5551235476",
"address": {
"country": "US",
"city": "Austin",
"postal_code": "78701",
"state": "TX",
"line1": "123 Congress Ave",
"line2": "Additional information"
},
"title": "Ms."
}'
See all 20 lines
The successful response returns the information about the contact:
{
"first_name" : "Mary" ,
"last_name" : "O Brien" ,
"email" : "contact@example.org" ,
"phone" : "5551235476" ,
"address" : {
"country" : "US" ,
"city" : "Austin" ,
"postal_code" : "78701" ,
"state" : "TX" ,
"line1" : "123 Congress Ave" ,
"line2" : "Additional information"
},
"title" : "Ms." ,
"id" : "3fa85f64-5717-4562-b3fc-2c963f66afa6" ,
"counterpart_id" : "3fa85f64-5717-4562-b3fc-2c963f66afa6" ,
"is_default" : false
}
See all 18 lines
Once the contacts are added to the counterpart, select a default contact by calling POST /counterparts/{counterpart_id}/contacts/{contact_id}/make-default :
curl -X POST 'https://api.sandbox.tesouro.com/v1/counterparts/3fa8...f66afa6/contacts/9d2b4c8f...83c49a4/make-default' \
-H 'X-Finops-Version: 2025-06-23' \
-H 'X-Organization-Id: ORGANIZATION_ID' \
-H 'Authorization: Bearer ACCESS_TOKEN'
The successful response contains information about the contact marked as default:
{
"first_name" : "Mary" ,
"last_name" : "O Brien" ,
"email" : "contact@example.org" ,
"phone" : "5551235476" ,
"address" : {
"country" : "US" ,
"city" : "Austin" ,
"postal_code" : "78701" ,
"state" : "TX" ,
"line1" : "123 Congress Ave" ,
"line2" : "Additional information"
},
"title" : "Ms." ,
"id" : "3fa85f64-5717-4562-b3fc-2c963f66afa6" ,
"counterpart_id" : "3fa85f64-5717-4562-b3fc-2c963f66afa6" ,
"is_default" : true
}
See all 18 lines
To get information about all contacts associated with the specified counterpart, call
GET /counterparts/{counterpart_id}/contacts .
To get information about a specific contact associated with the specified counterpart, call
GET /counterparts/{counterpart_id}/contacts/{contact_id} .
To edit an existing contact of the specified counterpart, call
PATCH /counterparts/{counterpart_id}/contacts/{contact_id} .
To delete an existing contact from the list of contacts associated with the specified counterpart, call
DELETE /counterparts/{counterpart_id}/contacts/{contact_id} . Only non-default contacts can be deleted.