> For the complete documentation index, see [llms.txt](https://documentation.dnanexus.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.dnanexus.com/developer/api/nonces.md).

# Nonces

In DNAnexus, a **nonce** is a string that uniquely identifies a request against the DNAnexus API. Using a nonce ensures that regardless of how many times a request is made, the result remains the same as a single successful request. This is particularly useful for handling network failures. If a response is dropped on its way back to the client, the client can reissue the request with the nonce, and the DNAnexus API recognizes it as a previous request and returns an exact replica of the dropped response.

The nonce field is used primarily in API methods for project, data object, and job creation. Using a nonce with these API methods prevents a client from creating duplicate items when only one is intended. The API methods are as follows:

* [`/app/new`](/developer/api/running-analyses/apps.md#api-method-app-new)
* [`/app-xxxx/run`](/developer/api/running-analyses/apps.md#api-method-app-xxxx-yyyy-run)
* [`/applet/new`](/developer/api/running-analyses/applets-and-entry-points.md#api-method-applet-new)
* [`/applet-xxxx/run`](/developer/api/running-analyses/applets-and-entry-points.md#api-method-applet-xxxx-run)
* [`/file/new`](/developer/api/introduction-to-data-object-classes/files.md#api-method-file-new)
* [`/job/new`](/developer/api/running-analyses/applets-and-entry-points.md#api-method-job-new)
* [`/org/new`](/developer/api/organizations.md#api-method-org-new)
* [`/record/new`](/developer/api/introduction-to-data-object-classes/records.md#api-method-record-new)
* [`/workflow/new`](/developer/api/running-analyses/workflows-and-analyses.md#api-method-workflow-new)
* [`/workflow-xxxx/run`](/developer/api/running-analyses/workflows-and-analyses.md#api-method-workflow-xxxx-run)

As a nonce is a unique identifier of a request, the input used in a request must remain unchanged when retrying with a nonce. If any change is made to the input, the API considers it a separate and different request and throws an InvalidInput error. The nonce field must not exceed 128 bytes in a UTF-8 encoded string.

Nonces are designed for recovery and retry of dropped requests within a short time period. This behavior is guaranteed only for second requests made within one hour of the original request. After one hour, the second request may create a new object (as if no nonce was supplied).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://documentation.dnanexus.com/developer/api/nonces.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
