Authentication
Header:Authorization: Bearer {token}
Token: JWT signed using your CDP API Key Secret
Usage: Most API endpoints (accounts, transfers, payment methods)
Docs: See Authentication Guide
Error Responses
All errors return a consistent structure:errorType- Machine-readable error codeerrorMessage- Human-readable descriptioncorrelationId- Unique request identifier for debuggingerrorLink- Documentation link for the error
invalid_request- Malformed requestnot_found- Resource doesn’t existforbidden- Permission deniedidempotency_error- Idempotency key conflictinternal_server_error- Server error
HTTP Status Codes
| Code | Meaning | When Used |
|---|---|---|
| 200 | Success | GET, PUT requests succeeded |
| 201 | Created | POST request created resource |
| 400 | Bad Request | Invalid parameters or malformed request |
| 401 | Unauthorized | Missing or invalid authentication |
| 403 | Forbidden | Authenticated but lacks permission |
| 404 | Not Found | Resource doesn’t exist |
| 409 | Conflict | Idempotency key conflict |
| 500 | Internal Server Error | Server-side error occurred |
Resource IDs
All resources use prefixed identifier patterns:| Resource | Prefix | Example |
|---|---|---|
| Account | account_ | account_af2937b0-9846-4fe7-bfe9-ccc22d935114 |
| Transfer | transfer_ | transfer_af2937b0-9846-4fe7-bfe9-ccc22d935114 |
| Payment Method | pm_ | pm_af2937b0-9846-4fe7-bfe9-ccc22d935114 |
| Customer | customer_ | customer_af2937b0-9846-4fe7-bfe9-ccc22d935114 |
{prefix}_{uuid}
Amounts
All monetary amounts are represented as strings to preserve precision. Format: String representation of decimal number Examples:"100.00"- 100 USD"2.5"- 2.5 BTC"103.50"- 103.50 USD
Assets
Assets are identified by lowercase symbols. Fiat:usd
Stablecoins: usdc, usdt, eurc, pyusd
Timestamps
All datetime fields are returned in UTC using ISO 8601 format withZ suffix.
Format: YYYY-MM-DDTHH:MM:SSZ
Example: 2023-10-08T14:30:00Z
Pagination
List endpoints support cursor-based pagination using tokens. Query Parameters:pageSize- Number of resources per page (default: 20)pageToken- Token for next page from previous response
nextPageToken- Token to fetch next page (absent on last page)
Idempotency
Use idempotency keys to safely retry requests without duplicate operations. Header:X-Idempotency-Key
Format: UUID v4 (36 characters)
Pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
Example: 8e03978e-40d5-43e8-bc93-6894a57f9324
Behavior:
- Optional header for POST requests
- Duplicate requests with same key return identical responses and won’t repeat the same operation
- Prevents accidental duplicate operations (e.g., creating duplicate transfers)
idempotency_error if another request with the same key is currently processing