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

# Repeated requests

> Send a request again safely after a timeout, without making a second dub.

Networks fail. If a request to start dubs times out, you can't tell whether the dubs started. Send an `Idempotency-Key` header with `POST /uploads` and `POST /dubs`, and you can simply send the request again:

```bash theme={null}
curl https://api.reedapt.com/v1/dubs \
  -H "Authorization: Bearer $REEDAPT_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 7c1f6a52-2d4e-4bb1-9e0a-5f3d8c2b1a90" \
  -d '{"upload_id": "job_3f9a2c7e1b4d", "source_language": "en", "target_languages": ["fr"]}'
```

* The same request sent again with the same key gets the first answer back, with the header `Idempotent-Replayed: true`, instead of doing the work twice.
* Use a value that is unique to the thing you're doing, such as a UUID or your own order id. Up to 255 characters.
* Keys are kept for 24 hours, per API key.
* A **different** request under a key already used is refused with `422 IDEMPOTENCY_MISMATCH`.
* If the first request is still running, a repeat gets `409 IDEMPOTENCY_IN_PROGRESS`. Wait a moment and send it again.
* A request that was refused keeps nothing, so you can fix it and send it again with the same key.
* If the first request was cut off after its dubs had started, a repeat gets `409 ALREADY_STARTED`. Find the dubs with `GET /dubs`.

`GET` and `DELETE` requests can always be repeated safely and don't need a key.


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