Overview
TXCloud uses API keys to authenticate requests. All API requests must include your API key in theAuthorization header using Bearer token authentication.
API Key Types
TXCloud provides two types of API keys:| Type | Prefix | Use Case |
|---|---|---|
| Test/Sandbox | txc_test_ | Development and testing |
| Live/Production | txc_live_ | Production applications |
Getting Your API Key
1
Log in to Dashboard
Go to dashboard.txcloud.io and sign in.
2
Navigate to API Keys
Click on Settings in the sidebar, then select API Keys.
3
Create New Key
Click Create API Key and configure:
- Name: A descriptive name (e.g., “Production Server”)
- Environment: Test or Live
- Permissions: Select which APIs the key can access
- IP Whitelist: (Optional) Restrict to specific IPs
4
Copy Your Key
Copy the key immediately — it won’t be shown again!
Making Authenticated Requests
API Key Permissions
When creating an API key, you can restrict access to specific APIs:| Permission | Description |
|---|---|
identity:read | Read verification results |
identity:write | Create new verifications |
fraud:read | Read fraud signals and analytics |
fraud:write | Configure fraud rules and blocklists |
transactions:read | Read transaction scores |
transactions:write | Score transactions, update rules |
lending:read | Read credit assessments |
lending:write | Create assessments, upload statements |
kyb:read | Read business verifications |
kyb:write | Create business verifications |
watchlist:read | Read screening results |
watchlist:write | Screen entities, manage lists |
developers:read | Read API usage and logs |
developers:write | Manage webhooks and settings |
IP Whitelisting
For additional security, you can restrict API keys to specific IP addresses:IP whitelisting is optional but recommended for production keys.
Key Rotation
We recommend rotating your API keys periodically:1
Create New Key
Create a new API key with the same permissions.
2
Update Your Application
Deploy the new key to your application.
3
Verify New Key Works
Confirm requests are succeeding with the new key.
4
Revoke Old Key
Delete the old API key from the dashboard.
Required Headers
Every API request should include these headers:| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer token with your API key |
Content-Type | Yes (POST/PUT) | application/json |
Idempotency-Key | Recommended | Unique key for safe retries |
X-Request-ID | Optional | Your request ID for tracing |
Authentication Errors
| Error Code | HTTP Status | Description |
|---|---|---|
unauthorized | 401 | Missing or invalid API key |
forbidden | 403 | Key lacks required permissions |
ip_not_allowed | 403 | Request from non-whitelisted IP |
key_revoked | 401 | API key has been revoked |
key_expired | 401 | API key has expired |
Error Response Example
Best Practices
Use Environment Variables
Use Environment Variables
Store API keys in environment variables, not in code:
Use Different Keys per Environment
Use Different Keys per Environment
Create separate keys for development, staging, and production.
Monitor Key Usage
Monitor Key Usage
Check the dashboard regularly for unusual activity.
Enable IP Whitelisting
Enable IP Whitelisting
Restrict production keys to known server IPs.
Rotate Keys Regularly
Rotate Keys Regularly
Rotate production keys every 90 days.