Skip to main content

API Overview

The SavvyMoney API is a RESTful API that provides programmatic access to credit scores, user management, and personalized offers.

Base URLs

EnvironmentBase URL
Sandboxhttps://api.sandbox.savvymoney.com
Productionhttps://api.savvymoney.com
Environment Separation

Always use sandbox for development and testing. Production credentials should only be used in your production environment with real user data.

API Versioning

The API uses URL path versioning. The current version is v1.

https://api.savvymoney.com/v1/users

When we release breaking changes, we'll increment the version number. Previous versions will be supported for at least 12 months after deprecation notice.

Authentication

All API requests require authentication using OAuth 2.0 Bearer tokens.

curl -X GET "https://api.savvymoney.com/v1/users/{userId}/credit-score" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json"

See Authentication for details on obtaining tokens.

Request Format

Headers

All requests should include these headers:

HeaderRequiredDescription
AuthorizationYesBearer token: Bearer {access_token}
Content-TypeYes (for POST/PUT)application/json
AcceptRecommendedapplication/json
X-Request-IDRecommendedUnique request identifier for tracing

Request Body

For POST and PUT requests, send JSON in the request body:

{
"firstName": "John",
"lastName": "Doe",
"email": "[email protected]"
}

Response Format

Success Responses

Successful responses return JSON with appropriate HTTP status codes:

200 OK
{
"data": {
"userId": "usr_abc123",
"score": 742,
"scoreDate": "2024-01-15"
},
"meta": {
"requestId": "req_xyz789",
"timestamp": "2024-01-15T10:30:00Z"
}
}

HTTP Status Codes

CodeDescription
200Success
201Created
204No Content (successful delete)
400Bad Request - Invalid parameters
401Unauthorized - Invalid or expired token
403Forbidden - Insufficient permissions
404Not Found - Resource doesn't exist
409Conflict - Resource already exists
422Unprocessable Entity - Validation error
429Too Many Requests - Rate limit exceeded
500Internal Server Error
503Service Unavailable

Error Responses

Errors return a consistent JSON structure:

Error Response
{
"error": {
"code": "VALIDATION_ERROR",
"message": "The request could not be validated",
"details": [
{
"field": "email",
"message": "Invalid email format"
}
]
},
"meta": {
"requestId": "req_xyz789",
"timestamp": "2024-01-15T10:30:00Z"
}
}

Error Codes

CodeDescription
VALIDATION_ERRORRequest validation failed
AUTHENTICATION_ERRORInvalid credentials or token
AUTHORIZATION_ERRORInsufficient permissions
NOT_FOUNDResource not found
RATE_LIMIT_EXCEEDEDToo many requests
USER_NOT_ENROLLEDUser must be enrolled first
CREDIT_FROZENUser's credit is frozen
INTERNAL_ERRORServer error - contact support

Rate Limits

API requests are subject to rate limiting:

Endpoint TypeLimitWindow
Authentication100 requests1 minute
User Operations1000 requests1 minute
Batch Operations50 requests1 minute
WebhooksUnlimited-

Rate limit headers are included in every response:

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1705312800

When rate limited, you'll receive a 429 response:

{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Too many requests. Please retry after 60 seconds.",
"retryAfter": 60
}
}

Pagination

List endpoints support pagination using cursor-based pagination:

GET /v1/users?limit=25&cursor=eyJpZCI6MTAwfQ
ParameterTypeDefaultDescription
limitinteger25Items per page (max 100)
cursorstring-Cursor from previous response

Paginated responses include pagination metadata:

{
"data": [...],
"pagination": {
"hasMore": true,
"nextCursor": "eyJpZCI6MTI1fQ",
"total": 250
}
}

Filtering & Sorting

Many list endpoints support filtering and sorting:

GET /v1/offers?status=active&sort=-createdAt

Common Filters

ParameterDescription
statusFilter by status
createdAfterCreated after date (ISO 8601)
createdBeforeCreated before date (ISO 8601)

Sorting

Use the sort parameter with field names. Prefix with - for descending order:

sort=createdAt    # Ascending
sort=-createdAt # Descending
sort=score,-date # Multiple fields

Idempotency

For POST requests that create resources, you can provide an idempotency key to prevent duplicate operations:

curl -X POST "https://api.savvymoney.com/v1/users/enroll" \
-H "Authorization: Bearer {token}" \
-H "Idempotency-Key: unique-request-id-123" \
-H "Content-Type: application/json" \
-d '{"email": "[email protected]", ...}'

If you retry a request with the same idempotency key within 24 hours, you'll receive the original response.

SDKs & Libraries

While you can call the API directly, we provide official SDKs:

LanguagePackage
JavaScript/Node.jsnpm install @savvymoney/node-sdk
JavaMaven: com.savvymoney:sdk
Pythonpip install savvymoney
iOSCocoaPods: SavvyMoneySDK
AndroidGradle: com.savvymoney:sdk

API Changelog

v1.2.0 (2024-01-15)

  • Added batch enrollment endpoint
  • Improved error messages
  • Added X-Request-ID header support

v1.1.0 (2023-10-01)

  • Added webhook support
  • Added offer click tracking
  • Performance improvements

v1.0.0 (2023-06-01)

  • Initial release

Next Steps