> For the complete documentation index, see [llms.txt](https://docs.ur.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ur.app/api-reference/api/account/external-wallet-access-mode/submit-token-permit.md).

# Submit token permit

Submits an EIP-2612 permit signature so UR contracts can spend tokens from the user's wallet without an on-chain approve transaction. Used for card spending against the user's UR fiat balance.

```json
{"openapi":"3.1.0","info":{"title":"UR API","version":"1.0.0"},"tags":[{"name":"External Wallet Access Mode","description":"APIs signed by the user's own wallet key. Base URL https://api.ur.app."}],"servers":[{"url":"https://api.ur.app","description":"Production (user API)"},{"url":"https://urapi3-qa.ur-inc.xyz","description":"Testnet (user API)"}],"security":[{"partnerAuth":[]},{"userWalletAuth":[]}],"components":{"securitySchemes":{"partnerAuth":{"type":"apiKey","in":"header","name":"X-Api-Signature","description":"Partner Auth: EIP-191 signature by the partner's registered backend key, with X-Api-Deadline and optional X-Api-PublicKey headers. See the Signature and verify guide."},"userWalletAuth":{"type":"apiKey","in":"header","name":"sign","description":"User wallet auth (External Wallet Access Mode): EIP-191 signature by the user's wallet key, with tokenId, network, hash, and deadline headers. See the Signature and verify guide."}},"schemas":{"EwaEnvelope":{"type":"object","properties":{"retCode":{"type":"integer","description":"0 on success; non-zero indicates failure.","format":"int64"},"retMsg":{"type":"string","description":"Human-readable message; error details when retCode is non-zero."},"result":{"description":"Business payload. Shape depends on the endpoint; some endpoints return it as a JSON-encoded string."},"timeNow":{"type":"integer","description":"Server timestamp in milliseconds.","format":"int64"}},"required":["retCode","retMsg"],"description":"Standard response envelope for the user API (api.ur.app)."}}},"paths":{"/api/v1/token-permit":{"post":{"tags":["External Wallet Access Mode"],"operationId":"ewaSubmitTokenPermit","summary":"Submit token permit","description":"Submits an EIP-2612 permit signature so UR contracts can spend tokens from the user's wallet without an on-chain approve transaction. Used for card spending against the user's UR fiat balance.","parameters":[{"name":"tokenId","in":"header","required":true,"schema":{"type":"string"},"description":"The user's URID (NFT token id)."},{"name":"network","in":"header","required":true,"schema":{"type":"string"},"description":"Network identifier: 5000 for mainnet, 5003 for testnet."},{"name":"sign","in":"header","required":true,"schema":{"type":"string"},"description":"Signature generated by the user's wallet key (EIP-191)."},{"name":"hash","in":"header","required":true,"schema":{"type":"string"},"description":"SHA3/Keccak256 hash of the original request payload."},{"name":"deadline","in":"header","required":true,"schema":{"type":"string"},"description":"Signature expiry: server timestamp plus a validity window (max 20 minutes)."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"string","description":"Contract address of the token being approved."},"amount":{"type":"string","description":"Amount to approve (decimal string)."},"permitAmount":{"type":"string","description":"Permit amount signed in the EIP-2612 permit (decimal string)."},"permitDeadline":{"type":"integer","description":"Unix seconds until which the permit is valid."},"permitV":{"type":"integer","description":"EIP-2612 signature component v."},"permitR":{"type":"string","description":"EIP-2612 signature component r (32-byte hex)."},"permitS":{"type":"string","description":"EIP-2612 signature component s (32-byte hex)."}},"required":["address","amount","permitAmount","permitDeadline","permitV","permitR","permitS"]}}}},"responses":{"200":{"description":"Response envelope. For the user API, retCode 0 means success; for the partner API, code 0 means success. Business rejections return HTTP 200 with a non-zero code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EwaEnvelope"}}}}}}}}}
```


---

# 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.ur.app/api-reference/api/account/external-wallet-access-mode/submit-token-permit.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.
