API Reference
Authentication
Every API call is made on behalf of one vault. Your vault has an API key, which you create in the RoxCustody dashboard (Vault settings, API keys). Exchange it for a short-lived access token with Generate Tokens, then send the token in the X-ACCESS-TOKEN header of every other request.
Token lifetimes: the access token is valid for 30 minutes (expiresAt is its expiry as a Unix timestamp in milliseconds); the refresh token is valid for 180 days. When the access token expires, requests fail with HTTP 498 and code E01403: call Refresh Token to get a new pair. Each refresh token can be used once, and the new pair replaces the old one. If the refresh token is no longer valid, start a new session with Generate Tokens.
Rate limits: Generate Tokens accepts 10 requests per minute; Refresh Token accepts 2 requests per second. All other endpoints accept up to 500 requests per second per vault. Beyond these limits, the API returns HTTP 429 with code E00404.
Endpoints
POSTGenerate TokensExchanges your vault API key for an access token and a refresh token. This is the first call of every integration. Store both tokens securely; send the access token in the X-ACCESS-TOKEN header of all other requests.POSTRefresh TokenReturns a new access token and a new refresh token. Call it when a request fails with HTTP 498 (token expired). The refresh token you send is consumed: use the new one next time.
Was this page helpful?