# Duplicate a batch

`POST https://api.parasend.com/v1/batches/{id}/duplicate`

Source: https://parasend.com/docs/api/batches/duplicate

Authentication: `Authorization: Bearer <API key>` (a `ps_test_` key in test mode, `ps_live_` in live mode).
Send an `Idempotency-Key` header: a retry with the same key returns the first answer.

Makes a new draft batch with the same settings and no deliveries.

## Path parameters

- `id` (string, required): The batch's ID, starting `bat_`.

## Example: Duplicate a batch

```bash
curl -X POST "https://api.parasend.com/v1/batches/bat_01M6R27T8SXWNM911FS53W4S9F/duplicate" \
  -H "Authorization: Bearer $PARASEND_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
```

```js
const res = await fetch('https://api.parasend.com/v1/batches/bat_01M6R27T8SXWNM911FS53W4S9F/duplicate', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.PARASEND_KEY}`,
    'Idempotency-Key': crypto.randomUUID(),
  },
});
const data = await res.json();
```

## Response 201

The new draft.

```json
{
  "id": "bat_01M6R27TAZJQCTVN3NPC630T21",
  "object": "batch",
  "name": "November notices, first run (copy)",
  "status": "draft",
  "sending_mode": "on_finalize",
  "follow_up_policy_id": null,
  "allow_policy_override": true,
  "follow_ups_paused": false,
  "scheduled_at": null,
  "send_window": {
    "tz": "Atlantic/Reykjavik",
    "end": "21:00",
    "start": "09:00"
  },
  "defaults": {},
  "files": [],
  "accepting_deliveries": true,
  "counts": {
    "total": 0,
    "delivered": 0,
    "in_progress": 0,
    "ended": 0
  },
  "created_by": {
    "user_id": "usr_01M6R27SYD4B50414S0BZ4KBKR",
    "via": "api_key"
  },
  "livemode": false,
  "created": "2026-11-06T09:15:05.951Z",
  "sent_out_at": null,
  "following_up_at": null,
  "completed_at": null,
  "cancelled_at": null
}
```

Errors: one shape, `{"error": {type, code, message, param, request_id}}`; every code is listed at https://parasend.com/docs/errors.
