# Upload Debtors

> Add debtors to an Edesy Collect reminder campaign as phone,name,due_date,amount lines in the portal or as JSON through the API, with do-not-call screening.

Source: https://edesy.in/docs/collect/campaigns/upload-debtors-csv

Add debtors to a reminder campaign as comma-separated lines in the portal, one debtor per line in the order `phone,name,due_date,amount`, or as a JSON list through the API. Only the phone number is required. Each debtor is queued for a first call at the next calling-window open. Numbers on your do-not-call list are kept but never dialled.

Uploading needs an approved KYC. Without it the request returns `403 KYC_NOT_APPROVED`.

## Columns

| Column | Required | Format | Example |
|---|---|---|---|
| `phone` | Yes | Indian mobile number, E.164 recommended | `+919800000000` |
| `name` | No | Text | `Ravi Kumar` |
| `due_date` | No | `YYYY-MM-DD` | `2026-11-15` |
| `amount` | No | Number, rupees | `5000` |

`due_date` and `amount` are shown next to each debtor in the contacts table so your team can see what is owed. The call message itself is the same for every debtor in a campaign; see [Reminder Message and Voice](https://edesy.in/docs/collect/campaigns/reminder-message-and-voice).

## In the portal

1. Open the campaign from **Reminder Campaigns**.
2. Under **Upload debtors**, paste your lines. Do not include a header row. Leave a field empty to skip it, for example `+919800000000,,2026-11-15,`.
3. Click **Add N contacts**. The button shows how many lines it read.

To move a spreadsheet in, export it as CSV with the four columns in this order, remove the header row, and paste the rows.

## With the API

```bash
curl -X POST https://voice-api.edesy.in/v1/collect/campaigns/CAMPAIGN_ID/contacts \
  -H "Authorization: Bearer sk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "contacts": [
      {"phone_number": "+919800000000", "name": "Ravi Kumar", "due_date": "2026-11-15", "amount_due": 5000},
      {"phone_number": "+919800000001"}
    ]
  }'
```

```json
{ "data": { "added": 2 } }
```

`added` is the number of debtors that will be dialled. Debtors on your do-not-call list are stored with status `suppressed` and are not counted.

`due_date` also accepts an RFC 3339 timestamp. Any other format returns `400 invalid due_date (use YYYY-MM-DD)`. The campaign must be a reminder campaign created under `/v1/collect/campaigns`.

## After upload

- Every debtor starts with payment status `pending`.
- Their first call is scheduled at the next calling-window open. If you upload at 22:00, the first call is at the next morning's window open.
- To find a debtor's `id` (needed to mark them paid through the API), list the campaign's contacts with `GET /v1/campaigns/:id/contacts`. See [Contacts and Payments](https://edesy.in/docs/collect/api/contacts-and-payments).

## FAQ

**Is there a file upload button?**
The portal takes pasted lines. For large lists, send them through the API in batches.

**Do I need a header row?**
No. A header row would be read as a debtor, so leave it out.

**Can I add more debtors after starting?**
Yes, while the campaign is running. New debtors are scheduled from the next window open.

**What happens to DNC numbers?**
They are saved with status `suppressed` and never called.
