Skip to content
Het fundament eronderDeveloper platform

API-sleutels en endpoints

Een afgebakende, geversioneerde API voor wat we later willen scripten.

Growth-OS kan API-sleutels uitgeven met scopes, limieten per minuut en geversioneerde endpoints. Er is vandaag één endpoint gepubliceerd, voor projecten, en niets in ons dagelijks werk hangt ervan af. Het staat er zodat een script of een ander intern hulpmiddel later koppelen een instelling is in plaats van een project op zich.

SHA-256hashing on every stored secret1time a secret is ever shown3checks before feature code runs

Productvoorbeeld

Bekijk het in werking

Dit is hetzelfde visuele component als in de ingelogde applicatie, met voorspelbare voorbeelddata.

Scenario
Voorbeeldscherm
Thema van voorbeeldoppervlak
Voorbeeldmodus

Configured

The real API key, quickstart, endpoint and delivery views, side by side.

Inerte voorbeelddata · geen netwerktoegang

API keys

1 active

A key lets a script or another system read this workspace through the versioned API. The plaintext key is shown once at creation; only a verifier is stored.

Production reportingActive
sk_live_8f31…projects:readusage:readNo expiry dateLast used Aug 13, 2026

Create a key

The plaintext key appears once, right after you create it.

Name it after the system that will use it, so you know what stops working when you revoke it.

A short life limits the damage of a leaked key.

Scopes

A key can only do what its scopes allow.

Quickstart

The starter exposes the released, versioned projects read API. More scopes appear here as their routes ship.

curl https://your-app.example/api/v1/projects \
  -H "Authorization: Bearer sk_live_..."

Outbound webhooks

1 enabled

Each endpoint receives signed, versioned events over HTTPS with bounded retries.

Production receiverEnabled
https://example.com/hooks/saasorganization.updatedsubscription.updatedLast delivery Aug 13, 2026, 8:00 AM

Add an endpoint

The signing secret appears once, right after you add the endpoint.

The receiver has to answer within the retry window.

Events

Only the events you pick are sent to this endpoint.

Recent deliveries

1 need attention

Every event sent to an enabled endpoint, with the attempts it took. Failed and stopped deliveries can be replayed during the retention window.

EventStatusAttemptsResponseCreatedAction
subscription.updatedDelivered1 attemptHTTP 200Aug 13, 2026, 7:59 AMNothing to replay
organization.updatedReceiver unavailable after the bounded retry policy.Stopped retrying8 attemptsHTTP 503Aug 13, 2026, 7:30 AM

Voorbeeld gereed

Kernpunten

Waarom dit belangrijk is

A secret exists once

A key is hashed with SHA-256 before storage and shown a single time. A copy of the database carries nothing worth stealing.

Three checks before any handler runs

The key, its scope and its per-minute allowance are verified before a request reaches feature code.

Versions and dates declared up front

Each endpoint registers its version, stability and retirement dates, so changing it is a decision rather than a surprise for whatever depends on it.

Het probleem dat dit oplost

Zonder een gedeelde basis bouwt elk team deze randgevallen opnieuw, en anders.

Keys you can read back

A hand-rolled key table usually stores the secret itself. One copied backup and every key is compromised at once. Storing only a hash means there is nothing there to leak.

The field that can never change

An endpoint ships with no version, something starts depending on every field in the response, and now every change is a breaking change. Declared versions and retirement dates keep that conversation possible.

One loop consumes everything

A script with a bug hammers the API and everything else slows down. Adding limits to a live API afterwards is painful, so keys carry a per-minute allowance from the first request.

Hoe het werkt

Het mechanisme van begin tot eind, zoals het in de repository is geïmplementeerd.

  1. 1

    An admin creates a key

    The secret is generated on the server, hashed and shown once. If it is lost you revoke and reissue; reading it back is deliberately impossible.

  2. 2

    Endpoints declare their contract

    Each route registers its version, request and response shapes, and rate-limit key before it ships, so compatibility is written down rather than remembered.

  3. 3

    Requests pass three gates

    The server verifies the key, checks its scope and reserves rate-limit quota. Only then does the handler touch data.

  4. 4

    Keys retire rather than vanish

    Revoking stamps a timestamp instead of deleting the row. The key stops working immediately and the history of what it did survives.

Technische garanties

Wat dit wel en niet belooft

Veiligheidsgrens

De sleutel in het voorbeeld is nep en geeft nergens toegang. Echte geheimen worden alleen binnen ingelogde adminopdrachten aangemaakt, en test- en live-sleutels zijn gescheiden door hun prefix, zodat de een nooit in plaats van de ander kan worden gebruikt.

Implementatiebewijs

De grens hierboven is geen claim maar code. Deze bestanden dragen het contract:

  • src/features/developer-platform/server.ts
  • src/server/api-key-auth.ts
  • src/registries/api-lifecycle.ts
  • src/routes/api/v1/projects.ts
Vragen

Veelgestelde vragen

Waar API-sleutels en endpoints op rust

De documentatie beschrijft dezelfde contracten die deze pagina demonstreert.