Skip to content

API reference

Account

The account behind your API key: balance, discount and webhook endpoint.

Your balance changes only through orders, rentals, refunds and deposits. Add funds from Billing in the dashboard; the API is read-only for money coming in.

The Account object

The account that owns the API key: its balance, discount and webhook endpoint.

Attributes

  • idstring

    Unique identifier, prefixed usr_.

  • emailstring

    Sign-in email address.

  • namestring· nullable

    Display name, if set.

  • balancestring

    Available balance in US dollars, as a decimal string.

  • balance_microsinteger

    Available balance in micro-dollars (1 USD = 1,000,000).

  • discount_bpsinteger

    Account discount in basis points (100 = 1%), already applied to quotes and order prices.

    Between 0 and 10000.

  • default_countrystring· nullable

    Preferred country (ISO2) set in the dashboard, if any.

  • default_strategystring

    Preferred quoting strategy set in the dashboard.

    One of:bestcheapestfastest

  • webhook_urlstring· nullable

    Where signed webhook events are delivered, if configured.

  • created_attimestamp

    When the account was created.

Account object · example
{
  "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"
}

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.

Returns

Returns an Account object.

  • 200The account.

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"
Response · 200
{
  "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"
}