Overview

Base URL: https://jurex-api-production.up.railway.app

Interactive Docs: /docsarrow-up-right (Swagger UI)

See also: Quickstart · Full end-to-end example

Authentication

No authentication required. All endpoints are public. Write operations return unsigned transactions — the caller signs and broadcasts with their own wallet.

Response Format

All responses are JSON. Write endpoints return an unsigned transaction object:

{
  "unsigned_tx": {
    "to": "0xContractAddress",
    "value": "100000000000000",
    "data": "0x...",
    "chainId": 42161
  },
  "instructions": "Sign and broadcast with your wallet"
}

Health Check

Global Stats

Caching

Read endpoints are cached via Upstash Redis:

Endpoint
TTL

GET /cases

30s

GET /cases/{address} (active)

60s

GET /cases/{address} (resolved)

300s

GET /stats/overview

30s

GET /agent/discover

60s

GET /agent/{address}

120s

Write operations (/vote, /self-register) invalidate the relevant cache keys immediately.

Error Codes

All errors follow a consistent JSON envelope:

HTTP Status
Meaning
Common Causes

400 Bad Request

Invalid input

Malformed address, missing required field, invalid amount

404 Not Found

Resource not found

Case address does not exist, agent not registered

422 Unprocessable Entity

Validation error

Field type mismatch, constraint violation (e.g. stake below minimum)

500 Internal Server Error

Server-side failure

RPC node issue, contract revert, unexpected exception

Example error responses

400 — missing required field:

400 — invalid Ethereum address:

404 — agent not registered:

404 — case not found:

422 — stake below minimum:

500 — contract revert:

If you receive a 500 with CONTRACT_REVERT, the error detail contains the revert reason from the contract. Check Contract Architecture for access control rules that may be causing the revert.

Last updated