Skip to content

Key

The credential a Customer presents on a call; the platform checks it on every call and never stores it.

A Key is the credential a Customer presents on a call; the platform checks it on every call and never stores it.

Kinds

KindCalls and usage
liveCalls and usage post to the books of the Startup.
testCalls and usage stay in the test namespace, whose books never post.
devCalls and usage stay in the dev namespace, whose books never post.

Checks

Every call passes these gates in order before it runs. A refused call is free.

GateChecksStatusCodes
key-validA presented Key is a credential the platform accepts.401invalid_key
key-requiredA call presents a Key when the Offer requires one.401key_required
entitledThe Entitlement of the Key covers the operation.403not_entitled
placedThe Customer resolves, and its calls have a namespace to live in.503customer_unresolved, customer_unplaced
within-limitThe call fits under every Limit, which it reserves before it runs.403limit_exceeded
limits-checkableThe Limits can be checked at all; when they cannot, nothing runs.503limits_unavailable

Guarantees

  • A Limit is never skipped. When the Limits cannot be checked, the call answers 503 and nothing runs.
  • A test call never touches live books. A test or dev Key keeps its calls and usage in a separate namespace whose books never post.

Example

A test call to the Openhours sample
curl https://openhours.example/places/pl_4821/hours \
  -H "X-Api-Key: $OPENHOURS_TEST_KEY"