Users
User authentication and profile management
Returns a nonce for the given address. The caller must sign this nonce and submit it to POST /users/authenticate to obtain a JWT.
A valid EVM (0x-prefixed hex) address.
0x1234567890abcdef1234567890abcdef12345678Nonce generated
A valid EVM (0x-prefixed hex) address.
0x1234567890abcdef1234567890abcdef12345678An arbitrary 0x-prefixed hex string.
0xdeadbeefBad request — invalid parameters or body
POST /users/nonce HTTP/1.1
Host: api-protocol.mimic.fi
Content-Type: application/json
Accept: */*
Content-Length: 56
{
"address": "0x1234567890abcdef1234567890abcdef12345678"
}{
"address": "0x1234567890abcdef1234567890abcdef12345678",
"nonce": "0xdeadbeef"
}Verifies the EIP-191 signature of the nonce returned by POST /users/nonce and returns a JWT token.
A valid EVM (0x-prefixed hex) address.
0x1234567890abcdef1234567890abcdef12345678A 65-byte hex-encoded ECDSA signature (130 hex chars + 0x prefix).
0xabc...defAuthentication successful
A valid EVM (0x-prefixed hex) address.
0x1234567890abcdef1234567890abcdef12345678JWT to pass in x-auth-token on subsequent requests
Unauthorized — missing or invalid credentials
Resource not found
POST /users/authenticate HTTP/1.1
Host: api-protocol.mimic.fi
Content-Type: application/json
Accept: */*
Content-Length: 82
{
"address": "0x1234567890abcdef1234567890abcdef12345678",
"signature": "0xabc...def"
}{
"address": "0x1234567890abcdef1234567890abcdef12345678",
"token": "text",
"email": "[email protected]"
}JWT token obtained from POST /users/authenticate
API key
A valid EVM (0x-prefixed hex) address.
0x1234567890abcdef1234567890abcdef12345678Unauthorized — missing or invalid credentials
GET /users/api-key HTTP/1.1
Host: api-protocol.mimic.fi
x-auth-token: YOUR_API_KEY
Accept: */*
{
"address": "0x1234567890abcdef1234567890abcdef12345678",
"apiKey": "text"
}JWT token obtained from POST /users/authenticate
List of token balances across chains
A supported chain ID.
1A valid EVM (0x-prefixed hex) address.
0x1234567890abcdef1234567890abcdef12345678A non-negative integer represented as a decimal string.
1000000000000000000A non-negative integer represented as a decimal string.
1000000000000000000Unauthorized — missing or invalid credentials
GET /users/tokens HTTP/1.1
Host: api-protocol.mimic.fi
x-auth-token: YOUR_API_KEY
Accept: */*
[
{
"chainId": 1,
"address": "0x1234567890abcdef1234567890abcdef12345678",
"symbol": "text",
"decimals": 1,
"balance": "1000000000000000000",
"allowance": "1000000000000000000",
"price": 1,
"logo": "https://example.com"
}
]Only the authenticated user may read their own profile.
JWT token obtained from POST /users/authenticate
A valid EVM (0x-prefixed hex) address.
0x1234567890abcdef1234567890abcdef12345678User profile data
A valid EVM address (0x-prefixed, 20 bytes).
0x1234567890abcdef1234567890abcdef12345678Unauthorized — missing or invalid credentials
Forbidden — caller is not allowed to access this resource
GET /users/{address}/data HTTP/1.1
Host: api-protocol.mimic.fi
x-auth-token: YOUR_API_KEY
Accept: */*
{
"userAddress": "0x1234567890abcdef1234567890abcdef12345678",
"name": "text",
"intendedUse": "text",
"email": "[email protected]"
}Only the authenticated user may update their own profile.
JWT token obtained from POST /users/authenticate
A valid EVM (0x-prefixed hex) address.
0x1234567890abcdef1234567890abcdef12345678Updated user profile data
A valid EVM address (0x-prefixed, 20 bytes).
0x1234567890abcdef1234567890abcdef12345678Unauthorized — missing or invalid credentials
Forbidden — caller is not allowed to access this resource
POST /users/{address}/data HTTP/1.1
Host: api-protocol.mimic.fi
x-auth-token: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 36
{
"name": "text",
"intendedUse": "text"
}{
"userAddress": "0x1234567890abcdef1234567890abcdef12345678",
"name": "text",
"intendedUse": "text",
"email": "[email protected]"
}Last updated