Below is the error structure returned by Dfns API.Documentation Index
Fetch the complete documentation index at: https://docs.dfns.co/llms.txt
Use this file to discover all available pages before exploring further.
| Field | Description | Type |
|---|---|---|
id | The error ID. You can share this with Dfns support to help troubleshoot your issue. | String |
status | HTTP status code. | Integer |
message | The error message. | String |
details | Structured data that provides additional error context. | Object |
Example
Common errors
400 Bad Request
The request body or parameters are invalid. Common causes:- Missing required fields
- Invalid field values or types (e.g., wrong address format, unsupported network)
- Malformed JSON body
message and details fields for specifics on which parameter failed validation.
401 Unauthorized
YourAuthorization header is missing, malformed, or the token is invalid/expired.
Solutions:
- Verify the token is included as
Authorization: Bearer <token> - Check the token hasn’t expired — decode it at jwt.io and check the
expfield - Ensure you’re using the correct region (
api.dfns.iovsapi.uae.dfns.io)
402 Payment Required
The requested feature is not available on your current plan. Solutions:- Contact your account manager or our to upgrade your plan
403 Forbidden
You’re calling a state-changing endpoint (POST, PUT, DELETE) without the requiredX-DFNS-USERACTION header, or the user lacks permission.
Solutions:
- Follow the User Action Signing flow to get the signature
- If using Postman, ensure the pre-request script is running — see Postman setup
- If using the SDK, ensure you’ve configured a signer — see SDKs
- Check the user has the required permissions
404 Not Found
The requested resource doesn’t exist. Common causes:- Incorrect wallet, user, or policy ID
- Resource was deleted
- Resource belongs to a different organization
409 Conflict
A resource with the same unique constraint already exists. Common causes:- Reusing an
externalIdwith a different request body or wallet — see idempotency - Assigning a permission that is already assigned to the user
- For idempotency conflicts: use a unique
externalIdfor each distinct request. Retrying the exact same request (same body, same wallet) with the sameexternalIdreturns the original response with status 200. - Check the
detailsfield in the error response to identify the existing entity
410 Gone
The resource was permanently deleted and can no longer be accessed.412 Precondition Failed
A business logic precondition was not met. For example, the resource is in a state that doesn’t allow the requested operation.422 Unprocessable Content
The request is well-formed but cannot be processed because the target resource is in an invalid state (e.g., archived or deactivated).429 Too Many Requests
You’ve exceeded the API rate limits. Solutions:- Implement exponential backoff and retry logic
- Reduce the frequency of API calls
- Contact our if you need higher limits
500 Internal Server Error
An unexpected error occurred on the server. Solutions:- Retry the request after a short delay
- If the error persists, contact our with the error
idfrom the response
Policy pending (202)
Not an error — this response means your request was accepted but a policy requires approval before it can be completed. The Dfns SDKs surface this as aPolicyPendingError.
Check the approval process for how to approve pending requests.