API Key Authentication
All Stableyard API requests require authentication via thex-sdk-key header.
Getting Your API Key
Contact us to request API access:- Telegram: @miteshmetha
- Email: mitesh@stableyard.fi
- Sandbox API key for testing
- Production API key after review
Using Your API Key
Include thex-sdk-key header in all requests:
Request Headers
| Header | Required | Description |
|---|---|---|
x-sdk-key | Yes | Your API key |
Content-Type | For POST/PUT | application/json |
Origin | For CORS | Your domain |
Security Best Practices
Do
- Store API keys in environment variables
- Use server-side code to make API calls
- Rotate keys periodically
- Use different keys for sandbox/production
Don’t
- Commit API keys to version control
- Include keys in client-side JavaScript
- Share keys across applications
- Use production keys in development
Environment Variables
Environments
| Environment | Base URL | Purpose |
|---|---|---|
| Sandbox | https://sandbox.api.stableyard.fi | Testing and development |
| Production | https://api.stableyard.fi | Live transactions |
Error Responses
Missing API Key
Invalid API Key
Rate Limited
CORS Configuration
For browser-based requests, ensure your origin is whitelisted. Contact support to add domains to your allowlist.IP Whitelisting
Enterprise customers can restrict API access to specific IP addresses. Contact support to configure IP whitelisting.Key Rotation
To rotate your API key:- Request a new key from support
- Update your application with the new key
- Confirm the old key should be revoked
- Old key is deactivated
Key rotation can be performed without downtime by supporting multiple keys temporarily during the transition.
Next: See Register — create a new Money Account.