curl -X POST "https://app.talkover.ai/api/v1/portfolio/debts" \
-H "Authorization: Bearer talq_your_environment_token_here" \
-H "Content-Type: application/json" \
-d '{
"debts": [
{
"cpf": "529.982.247-25",
"name": "Maria Souza",
"phone_1": "+5511999990001",
"phone_2": "11999990002",
"external_debt_id": "C-1",
"creditor": "Loja Centro",
"delinquent_since": "2026-08-10",
"installments": [
{ "number": 1, "due_date": "2026-07-10", "amount": "175.00", "outstanding_amount": "0.00" },
{ "number": 2, "due_date": "2026-08-10", "amount": "175.00", "outstanding_amount": "175.00" }
],
"whatsapp_opt_in": "sim",
"whatsapp_opt_in_source": "contract",
"store_code": "SP-04"
}
]
}'
{
"success": true,
"message": "3 of 4 debts written.",
"data": {
"received": 4,
"written": 3,
"without_phone": 1,
"rejected": [
{
"row": 3,
"external_debt_id": null,
"reason": "external_debt_id_missing",
"message": "Missing required column: external_debt_id"
}
]
}
}
For debt collection
Send portfolio
Sends up to 500 open contracts: person, phones and debt
POST
/
api
/
v1
/
portfolio
/
debts
curl -X POST "https://app.talkover.ai/api/v1/portfolio/debts" \
-H "Authorization: Bearer talq_your_environment_token_here" \
-H "Content-Type: application/json" \
-d '{
"debts": [
{
"cpf": "529.982.247-25",
"name": "Maria Souza",
"phone_1": "+5511999990001",
"phone_2": "11999990002",
"external_debt_id": "C-1",
"creditor": "Loja Centro",
"delinquent_since": "2026-08-10",
"installments": [
{ "number": 1, "due_date": "2026-07-10", "amount": "175.00", "outstanding_amount": "0.00" },
{ "number": 2, "due_date": "2026-08-10", "amount": "175.00", "outstanding_amount": "175.00" }
],
"whatsapp_opt_in": "sim",
"whatsapp_opt_in_source": "contract",
"store_code": "SP-04"
}
]
}'
{
"success": true,
"message": "3 of 4 debts written.",
"data": {
"received": 4,
"written": 3,
"without_phone": 1,
"rejected": [
{
"row": 3,
"external_debt_id": null,
"reason": "external_debt_id_missing",
"message": "Missing required column: external_debt_id"
}
]
}
}
Send portfolio
Writes one page of your portfolio: for each contract, the person (by CPF/CNPJ), their phones and the debt. No call is created. Available only to debt-collection workspaces in Brazil (see Debt collection portfolio).Endpoint
POST /api/v1/portfolio/debts
Request headers
Request body
Contract fields
Contract field names are lowercase and case-sensitive:Installments or Due_Date are not recognized and go to the free fields. Only the document (cpf, CPF…) and the phones accept any case.
| Field | Required | Format | Notes |
|---|---|---|---|
cpf (or cnpj, cpf_cnpj, cpfcnpj, document, documento, doc) | yes | CPF or CNPJ, with or without mask | A leading zero lost by a spreadsheet is restored (1234567890 = 01234567890). Repeated sequences (111.111.111-11) are refused |
external_debt_id | yes | text, up to 191 characters | The contract id in your system |
due_date | yes, without installments | YYYY-MM-DD or DD/MM/YYYY | Contract due date |
overdue_amount | yes, without installments or installment_amount | money | Overdue amount |
installment_amount | no | money | Used as the overdue amount only when overdue_amount is absent |
name (or nome, nome_cliente, nome_completo, customer_name, full_name) | no | text | Person’s name |
to, phone, phone_1 … phone_N | no | phone, with or without +55 | Each phone becomes a channel of the person. An international number not starting with 55 gets 55 prepended: send Brazilian phones only |
delinquent_since | no | YYYY-MM-DD or DD/MM/YYYY | Since when the contract is delinquent. Does not change the due date |
installments | no | list of installments | See Installments |
payment_deadline | no | date | Payment deadline |
days_overdue | no | integer ≥ 0 | Days overdue |
overdue_installments, installments_total | no | integer from 0 to 65535 | Overdue installments and total installments |
credit_limit | no | money | Credit limit |
creditor | no | text, up to 191 | Creditor |
collection_phase, risk_class, payment_slip | no | text, up to 64 | Collection phase, risk class, boleto line |
whatsapp_opt_in | no | sim/não, true/false, 1/0 | Did the person agree to receive WhatsApp? See WhatsApp opt-in |
whatsapp_opt_in_at | no | YYYY-MM-DD or DD/MM/YYYY, not in the future | When the person gave or withdrew consent |
whatsapp_opt_in_source | no | text, up to 191 | Where consent was collected (contract, app, site) |
whatsapp_opt_in_category | no | reminder or payment | What the person agreed to receive |
| any other field | no | any value | Stored on the contract and available to the agent during the call |
1234.56, 1234,56, 1.234,56, 1,234.56, 1234, with or without R$. 1.234 (one separator followed by exactly 3 digits) is ambiguous and refused: send 1234 or 1.234,00. Negative values are refused.
Installments
installments is optional. Each installment:
| Field | Format |
|---|---|
number | integer from 1 to 65535, unique within the contract |
due_date | YYYY-MM-DD or DD/MM/YYYY |
amount | money: the installment amount |
outstanding_amount | money: the open balance, from 0 to amount |
- the contract’s due date becomes the oldest installment with a balance;
- the overdue amount becomes the sum of the open balances;
- if all are paid, the contract is written with overdue amount
0.00. This is not a payment record: to take the contract out of collection, use Record payment.
installments has no installments: installments from an earlier send are removed. To keep them, always send them. The same installment written another way (175 and 175.00, 10/07/2026 and 2026-07-10) does not count as a change.
WhatsApp opt-in
WhatsApp is only sent to people who agreed to receive it, and you, the creditor, report that consent.- Consent applies to every phone on the row. If only one phone has consent, send that phone on a row with
whatsapp_opt_inand the others on a row without the field. - The latest send wins:
simafternãogrants again;nãoaftersimrevokes. Every change is kept in the history. - An empty or absent field does not change what was already recorded.
- An empty category with
simmeansreminder(due-date reminders). An empty category withnãorevokes all categories. - If the person replied “parar” (stop) to a message, nothing you send later resumes messages to that number.
Examples
curl -X POST "https://app.talkover.ai/api/v1/portfolio/debts" \
-H "Authorization: Bearer talq_your_environment_token_here" \
-H "Content-Type: application/json" \
-d '{
"debts": [
{
"cpf": "529.982.247-25",
"name": "Maria Souza",
"phone_1": "+5511999990001",
"phone_2": "11999990002",
"external_debt_id": "C-1",
"creditor": "Loja Centro",
"delinquent_since": "2026-08-10",
"installments": [
{ "number": 1, "due_date": "2026-07-10", "amount": "175.00", "outstanding_amount": "0.00" },
{ "number": 2, "due_date": "2026-08-10", "amount": "175.00", "outstanding_amount": "175.00" }
],
"whatsapp_opt_in": "sim",
"whatsapp_opt_in_source": "contract",
"store_code": "SP-04"
}
]
}'
Portfolios over 500 contracts
Split into pages of up to 500 and send them one at a time. There is no batch to open or close: each page stands alone. Add upwritten from the responses and collect the rejected lists. row is the position inside the page: row 3 of page 2 is contract 503.
Response
200 OK whenever the page was processed, even with refused rows.
{
"success": true,
"message": "3 of 4 debts written.",
"data": {
"received": 4,
"written": 3,
"without_phone": 1,
"rejected": [
{
"row": 3,
"external_debt_id": null,
"reason": "external_debt_id_missing",
"message": "Missing required column: external_debt_id"
}
]
}
}
Contracts written. The same
external_debt_id twice in a page, with the same CPF, counts twice and the last one wins.Contracts written without any usable phone. The contract links to the person who already has that CPF; if none exists, it stays without a person until a send with a phone.
Refused rows, in page order. Each has
row (position in debts, from 1), external_debt_id (as sent, or null), reason (stable code, use it for automation) and message (human text, may change).Why a row is refused
A refused row is not written; the rest of the page goes on. Reasons, in the order they are checked:reason | When |
|---|---|
document_missing | the row has no CPF/CNPJ |
document_invalid | the CPF/CNPJ is invalid |
installments_invalid | installments is not a list; an installment lacks number, due_date, amount or outstanding_amount; number outside 1–65535 or repeated; invalid format; balance greater than amount |
delinquent_since_invalid | delinquent_since is not a valid date |
due_date_missing | no due date and no installments |
amount_missing | no overdue_amount or installment_amount, and no installments |
<field>_invalid | the field has an invalid format (due_date_invalid, overdue_amount_invalid, days_overdue_invalid) |
external_debt_id_missing | no external_debt_id |
whatsapp_opt_in_invalid, whatsapp_opt_in_at_invalid, whatsapp_opt_in_source_invalid, whatsapp_opt_in_category_invalid | a value that is not yes/no, an invalid or future date, a source over 191 characters, a category other than reminder/payment |
external_debt_id_conflict | this external_debt_id already belongs, in your workspace, to another CPF/CNPJ, or an earlier row of the page used the same id with another CPF/CNPJ. The existing contract is not changed |
Error responses
Nothing from the request is written in these cases, except on500.
| Status | When |
|---|---|
401 | missing or invalid token |
403 | the API is not enabled for the workspace ("The portfolio API is not enabled for this workspace."), or the subscription is inactive |
422 | debts missing, empty, over 500 items, not a list, or with an item that is not an object |
429 | over the request limit; wait Retry-After and resend |
500 | unexpected failure. Part of the page may already be written: resend the same page |
{
"success": false,
"message": "The portfolio page could not be written. Resend the same page.",
"error": "Internal error"
}
Was this page helpful?