For the complete documentation index, see llms.txt. This page is also available as Markdown.

Users

User authentication and profile management

Request an authentication nonce

post

Returns a nonce for the given address. The caller must sign this nonce and submit it to POST /users/authenticate to obtain a JWT.

Body
addressstringRequired

A valid EVM (0x-prefixed hex) address.

Example: 0x1234567890abcdef1234567890abcdef12345678
Responses
200

Nonce generated

application/json
addressstringRequired

A valid EVM (0x-prefixed hex) address.

Example: 0x1234567890abcdef1234567890abcdef12345678
noncestringRequired

An arbitrary 0x-prefixed hex string.

Example: 0xdeadbeef
post/users/nonce
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"
}

Authenticate with a signed nonce

post

Verifies the EIP-191 signature of the nonce returned by POST /users/nonce and returns a JWT token.

Body
addressstringRequired

A valid EVM (0x-prefixed hex) address.

Example: 0x1234567890abcdef1234567890abcdef12345678
signaturestringRequired

A 65-byte hex-encoded ECDSA signature (130 hex chars + 0x prefix).

Example: 0xabc...def
Responses
200

Authentication successful

application/json
addressstringRequired

A valid EVM (0x-prefixed hex) address.

Example: 0x1234567890abcdef1234567890abcdef12345678
tokenstringRequired

JWT to pass in x-auth-token on subsequent requests

emailstring · emailOptional
post/users/authenticate
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]"
}

Get the authenticated user's API key

get
Authorizations
x-auth-tokenstringRequired

JWT token obtained from POST /users/authenticate

Responses
200

API key

application/json
addressstringRequired

A valid EVM (0x-prefixed hex) address.

Example: 0x1234567890abcdef1234567890abcdef12345678
apiKeystringRequired
get/users/api-key
GET /users/api-key HTTP/1.1
Host: api-protocol.mimic.fi
x-auth-token: YOUR_API_KEY
Accept: */*
{
  "address": "0x1234567890abcdef1234567890abcdef12345678",
  "apiKey": "text"
}

Get token balances for the authenticated user

get
Authorizations
x-auth-tokenstringRequired

JWT token obtained from POST /users/authenticate

Responses
200

List of token balances across chains

application/json
chainIdintegerRequired

A supported chain ID.

Example: 1
addressstringRequired

A valid EVM (0x-prefixed hex) address.

Example: 0x1234567890abcdef1234567890abcdef12345678
symbolstringRequired
decimalsintegerRequired
balancestringRequired

A non-negative integer represented as a decimal string.

Example: 1000000000000000000
allowancestringRequired

A non-negative integer represented as a decimal string.

Example: 1000000000000000000
pricenumberRequired
logostring · uriRequired
get/users/tokens
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"
  }
]

Get user profile data

get

Only the authenticated user may read their own profile.

Authorizations
x-auth-tokenstringRequired

JWT token obtained from POST /users/authenticate

Path parameters
addressstringRequired

A valid EVM (0x-prefixed hex) address.

Example: 0x1234567890abcdef1234567890abcdef12345678
Responses
200

User profile data

application/json
userAddressstringRequired

A valid EVM address (0x-prefixed, 20 bytes).

Example: 0x1234567890abcdef1234567890abcdef12345678
namestringRequired
intendedUsestring · max: 255Required
emailstring · email · nullableOptional
get/users/{address}/data
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]"
}

Update user profile data

post

Only the authenticated user may update their own profile.

Authorizations
x-auth-tokenstringRequired

JWT token obtained from POST /users/authenticate

Path parameters
addressstringRequired

A valid EVM (0x-prefixed hex) address.

Example: 0x1234567890abcdef1234567890abcdef12345678
Body
namestringOptional
intendedUsestring · max: 255Optional
Responses
200

Updated user profile data

application/json
userAddressstringRequired

A valid EVM address (0x-prefixed, 20 bytes).

Example: 0x1234567890abcdef1234567890abcdef12345678
namestringRequired
intendedUsestring · max: 255Required
emailstring · email · nullableOptional
post/users/{address}/data
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