API reference
Account
The account behind your API key: balance, discount and webhook endpoint.
Endpoints
The Account object
The account that owns the API key: its balance, discount and webhook endpoint.
Attributes
idstringUnique identifier, prefixed
usr_.emailstringSign-in email address.
namestring· nullableDisplay name, if set.
balancestringAvailable balance in US dollars, as a decimal string.
balance_microsintegerAvailable balance in micro-dollars (1 USD = 1,000,000).
discount_bpsintegerAccount discount in basis points (100 = 1%), already applied to quotes and order prices.
Between 0 and 10000.
default_countrystring· nullablePreferred country (ISO2) set in the dashboard, if any.
default_strategystringPreferred quoting strategy set in the dashboard.
One of:
bestcheapestfastestwebhook_urlstring· nullableWhere signed webhook events are delivered, if configured.
created_attimestampWhen the account was created.
{
"id": "usr_8Rk3VbX7nQ2mLw5TzP4c",
"email": "you@example.com",
"name": "Ada Lovelace",
"balance": "24.86",
"balance_micros": 24860000,
"discount_bps": 0,
"default_country": "US",
"default_strategy": "best",
"webhook_url": "https://example.com/webhooks/passcode",
"created_at": "2026-09-14T08:21:37.000Z"
}Retrieve your account
Returns the account that owns the API key. Handy as a first request to check that your key works, and to read your balance before buying.
Errors
Any endpoint can also return unauthorized, account_disabled, rate_limited and internal_error, and method_not_allowed when called with another method.
curl https://passcode.sh/api/v1/me \
-H "Authorization: Bearer $PASSCODE_API_KEY"{
"id": "usr_8Rk3VbX7nQ2mLw5TzP4c",
"email": "you@example.com",
"name": "Ada Lovelace",
"balance": "24.86",
"balance_micros": 24860000,
"discount_bps": 0,
"default_country": "US",
"default_strategy": "best",
"webhook_url": "https://example.com/webhooks/passcode",
"created_at": "2026-09-14T08:21:37.000Z"
}