API reference
Account and keys
The account, its keys, limits and statements.
On this page
GET/v1/account
The signed-in account. USDF and free credits are returned as separate balances; each credit grant carries its expiry date.
Auth: API key: Authorization: Bearer sk_…
No parameters.
GET /v1/account
curl https://api.usdf.fi/v1/account \ -H "Authorization: Bearer $USDF_API_KEY"
Response, trimmed
{
"balance": { "usdf": "<amount>", "credits": "<amount>" },
"credits": [{ "amount": "<amount>", "source": "<source>", "expires_at": "<date>" }]
}GET/v1/account/activity
The account's activity.
Auth: API key: Authorization: Bearer sk_…
No parameters.
GET /v1/account/activity
curl https://api.usdf.fi/v1/account/activity \ -H "Authorization: Bearer $USDF_API_KEY"
GET/v1/account/usage
The account's usage.
Auth: API key: Authorization: Bearer sk_…
No parameters.
GET /v1/account/usage
curl https://api.usdf.fi/v1/account/usage \ -H "Authorization: Bearer $USDF_API_KEY"
GET/v1/account/keys
The account's API keys.
Auth: API key: Authorization: Bearer sk_…
No parameters.
GET /v1/account/keys
curl https://api.usdf.fi/v1/account/keys \ -H "Authorization: Bearer $USDF_API_KEY"
POST/v1/account/keys
Creates an API key.
Auth: API key: Authorization: Bearer sk_…
No parameters.
POST /v1/account/keys
curl -X POST https://api.usdf.fi/v1/account/keys \ -H "Authorization: Bearer $USDF_API_KEY"
PATCH/v1/account/keys/{id}
Changes a key's settings.
Auth: API key: Authorization: Bearer sk_…
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Path. The key id. |
PATCH /v1/account/keys/{id}
curl -X PATCH https://api.usdf.fi/v1/account/keys/{id} \
-H "Authorization: Bearer $USDF_API_KEY"DELETE/v1/account/keys/{id}
Revokes a key.
Auth: API key: Authorization: Bearer sk_…
No parameters.
DELETE /v1/account/keys/{id}
curl -X DELETE https://api.usdf.fi/v1/account/keys/{id} \
-H "Authorization: Bearer $USDF_API_KEY"GET/v1/keys/{id}/limits
A key's caps and allowlists.
Auth: API key: Authorization: Bearer sk_…
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Path. The key id. |
GET /v1/keys/{id}/limits
curl https://api.usdf.fi/v1/keys/{id}/limits \
-H "Authorization: Bearer $USDF_API_KEY"GET/v1/limits
The gateway's rate limits.
Auth: None
No parameters.
GET /v1/limits
curl https://api.usdf.fi/v1/limits
GET/v1/receipts/{id}
One request's receipt.
Auth: API key: Authorization: Bearer sk_…
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Path. The request id. |
GET /v1/receipts/{id}
curl https://api.usdf.fi/v1/receipts/{id} \
-H "Authorization: Bearer $USDF_API_KEY"GET/v1/statements/{YYYY-MM}.csv
A month's statement as CSV.
Auth: API key: Authorization: Bearer sk_…
| Name | Type | Required | Description |
|---|---|---|---|
YYYY-MM | string | Yes | Path. The month. |
GET /v1/statements/{YYYY-MM}.csv
curl https://api.usdf.fi/v1/statements/{YYYY-MM}.csv \
-H "Authorization: Bearer $USDF_API_KEY"