Developers
Authentication
To access the Ospree API, contact our Sales Team at sales@ospree.io. They will guide you through onboarding, including reviewing and agreeing to our terms and conditions.
After onboarding, a Manager creates API Keys in the Dashboard. Each environment (sandbox and production) has its own Dashboard and its own keys.
Send your API Key
Every API request must include a live API Key in the Authorization header, using the Bearer scheme. Requests without a valid key are rejected with 401 Unauthorized.
Shell · Sample data
curl 'https://sandbox.ospree.io/api/v2/directory/accounts' \ --header 'Authorization: Bearer YOUR_API_KEY'
Create an API Key
A Manager creates a key in the Dashboard and chooses:
Access: Full access, or a level per API: No access, Read, or Read & write (the Rule Engine API has Read & write only). See Scopes below.
Expiry: every key has an expiry date. It must be in the future and at most one year away.
Allowed IPs (optional): a list of IP addresses. When set, the key only works for requests from those addresses.
The key is shown once, at creation. Ospree does not store it and cannot show it again, so copy it to a secure place straight away.
Replace and revoke keys
Keys cannot be rotated in place. To replace a key before it expires, create a new key, move your traffic to it, then revoke the old key. A revoked key stops working at once and for good. An expired key also stops working, and stays in the key list, marked expired, until a Manager revokes it.
Scopes
Each API Key carries one or more Scopes. A Scope names one API and an access level. Each endpoint lists the Scopes it requires in the API Reference; a key needs all of them.
Scope
Gives access to
api
Full access: every API, including APIs added later
address:read
Address API: read screened addresses and verifications
address:write
Address API: screen addresses and request wallet-control verifications
directory:read
Directory API: read and search accounts and VASPs
directory:write
Directory API: create, update and delete accounts
travel_rule:read
Travel Rule API: read transfers and tokens
travel_rule:write
Travel Rule API: create and update transfers
rule_engine:write
Rule Engine API: evaluate rules
webhooks:read
Webhooks API: read webhook endpoints and event types. Listing webhook requests also needs travel_rule:read
webhooks:write
Webhooks API: create and delete webhook endpoints, manage signing secrets, resend webhook requests
A write Scope also gives read on the same API. In the Dashboard, Read is the read Scope and Read & write is the write Scope.
A request with a key that lacks the required Scope is refused with 403 Forbidden. The response names the missing Scope:
JSON · Sample data
{ "status": "fail", "message": "This API key does not have the travel_rule:write scope. Create a key that has it.", "error_code": "auth.insufficient_scope", "data": { "required_scopes": ["travel_rule:write"] }}
To fix it, create a key that has the Scope. You cannot add Scopes to an existing key.
We prioritize security and expect our users to do the same. Keep your API Keys secret, give each key only the access it needs, and revoke keys you no longer use. If you have questions or need help managing your keys, contact our support team.