Obsidian API Download OpenAPI spec (v1)

Staging documentation. Requests go to https://staging.obsidian.cards. Use test data only.

Errors

Errors use standard HTTP status codes and a JSON body with a stable, machine-readable code:

{
  "message": "Card not found",
  "error": {
    "code": "card_not_found",
    "message": "Card not found"
  }
}
{
  "message": "The given data was invalid.",
  "errors": { "amount": ["The amount field is required."] },
  "error": {
    "code": "validation_failed",
    "message": "The given data was invalid.",
    "fields": { "amount": ["The amount field is required."] }
  }
}

Older v1 fields

Some v1 endpoints also return fields from before error.code existed. They are kept so existing integrations keep working:

{
  "error": "Order cannot be cancelled in its current state",
  "status": "completed",
  "code": "order_not_cancellable",
  "message": "Order cannot be cancelled in its current state"
}

To read the code from any v1 error: use error.code when error is an object, otherwise code.

Status codes

Status Meaning
400 The request can't be applied to the resource in its current state
401 Missing or invalid token (unauthenticated)
402 Your balance can't cover it (eSIM orders)
403 IP not allowlisted (ip_not_allowed), or the resource belongs to another company (forbidden)
404 Not found
405 Wrong HTTP method for this path (method_not_allowed)
409 Conflicts with something in progress
422 Validation failed, or a business rule refused the request
429 Too many requests (rate_limited); see Rate limits
5xx Something failed on our side; retry later

Common codes

Code Where
validation_failed Any request with invalid fields
insufficient_balance Orders, loads and eSIM orders when your balance is too low
card_not_found Card endpoints
card_not_active The card isn't issued yet, or isn't in a state that allows this
card_closed The card is closed
reload_in_progress / unload_in_progress A load or unload is already running for this card
amount_below_minimum Load amount under 1.00
amount_exceeds_balance Unload amount above the card balance
reload_not_supported The card's product isn't reloadable
pin_not_supported PIN changes aren't available for this card
order_not_found Order endpoints
order_not_cancellable The order is past the point where it can be cancelled
order_not_accepting_profile The order isn't waiting for a cardholder profile
profile_exists The cardholder already has a profile
address_invalid The address couldn't be verified
identity_verification_unavailable POST /v1/profiles/identity-document (503): verification is briefly unavailable; send the document again after the Retry-After seconds
idempotency_key_required / idempotency_key_conflict / idempotency_request_in_flight eSIM orders and webhook subscriptions
server_error Retry later

Treat any code you don't recognise by its HTTP status.