# API Idempotency

## Transfer / Transaction / Signature Idempotency

When using either one of these Wallet endpoints:

* [Transfer Asset](/d/api-docs/wallets/transfer-asset.md)
* [Broadcast Transaction](/d/api-docs/wallets/broadcast-transaction.md)

you can optionally specify an `externalId` in the request body. This can be helpful for you if you want to create an ID on your side before the request, and store it on the created entity (Transfer Request, Transaction Request, Signature Request), in the `externalId` field. It can also be helpful if you need to re-submit the same API call, in case a network error (or other) prevented you to get our server's response, even if your request has actually been processed by Dfns.&#x20;

The behaviour is as follow:

* If you re-submit the same request (same url, same body, including same `externalId`), then we will respond with a `200` response containing the entity which was already created when you submitted it for the first time.
* Otherwise, if you re-use the same `externalId` to make a new request to the API (same `externalId`, but different body, or using a different wallet), the request will fail with a `409` ("Conflict") response, containing a body such as:

```json
{
  "error": {
    "id": "...",
    "status": 409,
    "message": "Conflicting transfer with same externalId",
    "details": {
      "duplicate": { "id": "...", "externalId": "..." }
  }
}
```

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs-legacy.dfns.co/d/advanced-topics/api-idempotency.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
