> ## Documentation Index
> Fetch the complete documentation index at: https://docs.talkover.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Record return

> Takes a contract, or some of its installments, out of collection

# Record return

Takes a whole contract, or only some installments, out of collection, with a reason. Use it when the creditor withdraws the debt without reporting an amount received: paid directly, agreement outside Talkover, disputed, or sent by mistake. The cadence stops collecting **immediately**. Available only to debt-collection workspaces in Brazil (see [Debt collection portfolio](https://docs.talkover.ai/en/api-reference/portfolio/overview.md)).

> [!NOTE]
>
> If you know the amount received, use [Record payment](https://docs.talkover.ai/en/api-reference/portfolio/record-payment.md) instead: payments are what count toward the amount recovered.

## Endpoint

```
POST /api/v1/portfolio/debts/{external_debt_id}/return
```

## Path parameters

**external\_debt\_id** `string` *required*

The contract id in your system. URL-encode special characters (`CT/2026/0001` → `CT%2F2026%2F0001`).

## Request headers

**Authorization** `string` *required*

Bearer token. Format: `Bearer talq_your_environment_token_here`

**Content-Type** `string` *required*

`application/json`

## Request body

**reason** `string` *required*

Reason. One of:

* `direct_payment`: the person paid the creditor directly, amount not reported
* `agreement_outside`: agreement closed outside Talkover
* `disputed`: debt disputed
* `sent_by_mistake`: contract sent by mistake
* `other`: another reason

**note** `string`

Note, up to 500 characters.

**installment\_numbers** `array`

List of returned installments, for example `[3]`. Without it, the whole contract is returned.

A contract returned as a whole stays out of collection even if a later portfolio send brings new installments. A new debt to collect must come with another `external_debt_id`.

## Examples

```bash theme={null}
curl -X POST "https://app.talkover.ai/api/v1/portfolio/debts/C-10/return" \
  -H "Authorization: Bearer talq_your_environment_token_here" \
  -H "Content-Type: application/json" \
  -d '{"reason": "disputed", "note": "Customer filed a complaint", "installment_numbers": [3]}'
```

## Response

`201 Created` when the return was just recorded. `200 OK` when **the same return had already arrived**: nothing is written again and `created` is `false`.

```json theme={null}
{
  "success": true,
  "message": "Return recorded.",
  "data": {
    "return": {
      "id": "019a…",
      "installment_numbers": [3],
      "reason": "disputed",
      "note": "Customer filed a complaint",
      "source": "api",
      "actor_name": null,
      "recorded_at": "2026-11-09T15:10:00+00:00"
    },
    "created": true,
    "debt": {
      "external_debt_id": "C-10",
      "status": "open",
      "effective_due_date": "2026-09-10",
      "open_amount": "175.00"
    }
  }
}
```

**return** `object`

The recorded return.

**created** `boolean`

`true` if it was just recorded; `false` if the same return already existed.

**debt** `object`

The contract after the return, in the [Get contract](https://docs.talkover.ai/en/api-reference/portfolio/get-debt.md) format (shortened in the example).

## Error responses

| Status | When |
| - | - |
| `401` | missing or invalid token |
| `403` | the API is not enabled for the workspace |
| `404` | no contract with this id in your workspace |
| `422` | `reason` missing or invalid, `note` too long, or an installment the contract does not have (`"reason": "installment_not_found"`). Nothing is written |
| `500` | unexpected failure: resend the same return (no duplicate) |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.