Numis TrustNumis Trust Docs

Authorization

Authenticate API requests using API key credentials

Every request to the Relay API must be authenticated. Authentication uses a static key/secret pair that you generate once and include on every request — there are no sessions or tokens to refresh.

Credentials

When you create an API user in the platform, you receive two values:

Credential Fields
key_id
string

Starts with numis_. Use this as the x-api-key header value. Safe to log — it identifies but does not authenticate.

secret
string

Shown only once at creation time. Use this as the x-api-secret header value. Treat it like a password — never log or expose it.

Sending a Request

Include both headers on every API call.

curl -X GET https://api.numis-trust.com/relay/v1/accounts \
  -H "x-api-key: numis_abc123xyz789" \
  -H "x-api-secret: your-api-secret" \
  -H "Content-Type: application/json"
const response = await fetch('https://api.numis-trust.com/relay/v1/accounts', {
  method: 'GET',
  headers: {
    'x-api-key': process.env.NUMIS_API_KEY,
    'x-api-secret': process.env.NUMIS_API_SECRET,
    'Content-Type': 'application/json',
  },
});

const data = await response.json();

Keep your secret safe

Store your secret in environment variables or a secrets manager. Never hard-code it or commit it to source control.


Permissions

Each API user is issued a fixed set of permissions at creation time. The platform admin can update them at any time. Every endpoint documents the exact permission it requires.

Available Permissions
Initiate new custody account
scope

Create new custody accounts via POST /relay/v1/accounts.

View custody account
scope

List and retrieve existing accounts via GET /relay/v1/accounts.

View whitelisted address
scope

List and retrieve whitelisted destinations via GET /relay/v1/whitelisted-addresses.

View custody transaction list
scope

List custody transactions via GET /relay/v1/transactions.

View custody transaction detail
scope

Retrieve a single transaction via GET /relay/v1/transactions/{id}.

Initiate account transactions
scope

Submit new transactions from a custody account.

View custody transaction status
scope

Check transaction status via GET /relay/v1/transactions/{id}/status.

Approve transaction
scope

Approve pending transactions in the approval queue.

If a credential is missing the required permission for an endpoint, the API returns 403 Forbidden. The response body identifies the issue:

{
  "message": "Missing required API scope: Initiate account transactions"
}

Error Reference

Response Codes
400

Invalid or malformed request — missing required fields, failed validation, or an unsupported value (e.g. unknown assetId).

401

Missing, malformed, or revoked credentials. Check that both x-api-key and x-api-secret headers are present and correct.

403

Credentials are valid but the API user lacks the required permission for this action, or the credential is not client-scoped.

404

The requested resource does not exist or does not belong to your client scope.

409

Conflict — a resource with the same identity already exists.

429

Rate limit exceeded. Back off and retry after the duration indicated in the Retry-After header.


Rate Limiting

Requests are rate-limited per API key. When the limit is reached the API returns 429 Too Many Requests with headers to guide retry timing.

HTTP/1.1 429 Too Many Requests
Retry-After: 30
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1716652800
HeaderDescription
Retry-AfterSeconds to wait before retrying
X-RateLimit-LimitMaximum requests allowed per window
X-RateLimit-RemainingRequests remaining in the current window
X-RateLimit-ResetUnix timestamp when the window resets

On this page