Skip to main content

Errors

This page describes how the Token Custody API communicates errors.

Base URL

All API endpoints are relative to:

https://api.testmachine.ai

HTTP status codes

The API uses standard HTTP status codes. Common ones include:

  • 400 Bad Request — invalid input (malformed address, unsupported network id, etc.)
  • 401 Unauthorized — missing/invalid API key
  • 403 Forbidden — authenticated, but not permitted for this resource
  • 404 Not Found — resource not found
  • 409 Conflict — request conflicts with current state (when applicable)
  • 422 Unprocessable Entity — well-formed request, but fails validation (when applicable)
  • 429 Too Many Requests — rate limited
  • 5xx — server-side error

Error body

Error responses are returned as JSON.

Because the exact error schema can vary by API version, you should:

  • Key off HTTP status codes for high-level handling
  • Treat the JSON body as human-readable context (message/details)

Troubleshooting

  • Re-check authentication in Authentication (the API key must be passed via X-API-Key).
  • Confirm the chain ID exists in Supported networks.
  • Ensure the address is a contract address on the target network.