> For the complete documentation index, see [llms.txt](https://docs.nexus.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nexus.xyz/api-reference/authentication/delete-api-key.md).

# DELETE /keys/{key\_id}

Delete an API key

Delete an API key.

`operationId`: `deleteApiKey`

> **Declared server:** `https://api.testnet.nexus.xyz/v1`. See [Networks](/api-reference/guides/networks.md).

> **Not reachable through CCXT.** Session/credential lifecycle. CCXT takes credentials as constructor config; it never mints them.

**Authentication:** `bearerAuth`.

## Delete an API key

> Delete a key you own. Cannot delete keys owned by other wallets. Deletion is scoped to the network serving this request. A key minted on another network is invisible here and cannot be revoked here, and the \`404\` below does not distinguish “no such key” from “not yours” from “live on another network” — so it is never proof that a key has been retired. Revoke a key on the host that minted it, and confirm the revocation there.

```json
{"openapi":"3.1.0","info":{"title":"Nexus Exchange API","version":"0.9.101"},"tags":[{"name":"Authentication","description":"EVM wallet sign-in and API key management"}],"servers":[{"url":"https://api.testnet.nexus.xyz/v1","description":"Public testnet (play funds) — the default server and /v1 transport base for unversioned paths."},{"url":"https://api.nexus.xyz/v1","description":"Mainnet — **REAL FUNDS**. Collateral is USDX bridged from Ethereum Mainnet; orders placed here move real money, and there is no faucet. The durable per-network base. Listed after testnet on purpose, so nothing that reaches for \"the first https server\" lands on the real-funds target. Not resolvable yet: DNS/TLS is a separate infra change."},{"url":"http://localhost:9090","description":"Local development — the indexer served directly. Not a public network; whatever your local instance holds."}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Session token from POST /auth/login. Used only for API key management (/keys endpoints). Session tokens are network-scoped exactly like API keys: a token from one network's `POST /auth/login` is not valid on another, so sign in and manage keys on the same host you intend to trade against."}}},"paths":{"/keys/{key_id}":{"delete":{"operationId":"deleteApiKey","tags":["Authentication"],"summary":"Delete an API key","description":"Delete a key you own. Cannot delete keys owned by other wallets. Deletion is scoped to the network serving this request. A key minted on another network is invisible here and cannot be revoked here, and the `404` below does not distinguish “no such key” from “not yours” from “live on another network” — so it is never proof that a key has been retired. Revoke a key on the host that minted it, and confirm the revocation there.","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Key deleted"},"401":{"description":"Valid session token required"},"404":{"description":"Key not found on this network, or not owned by you. Not proof the key is gone: a key minted on another network is invisible here and is unaffected by this call."}}}}}}
```

***

<sub>API version</sub> <sub></sub><sub>`0.9.131`</sub>


---

# 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://docs.nexus.xyz/api-reference/authentication/delete-api-key.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.
