Skip to content

Exemples — Public API

Snippets prêts à copier pour tester l'API.

Scripts curl

Tous les scripts attendent STORMEO_API_KEY exporté en variable d'environnement. Optionnel : STORMEO_API_BASE (défaut https://beta.stormeo.io/api/public/v1).

bash
export STORMEO_API_KEY=spk_votre_clef_48_hex
ScriptDescriptionScopes requis
curl/00-getting-started.sh/me + /scopes + /health — sanity check(aucun)
curl/01-clients-crud.shCRUD complet (create → read → update → delete)clients:*
curl/02-invoices-create-mark-paid.shWorkflow facture draft → sent → paidinvoices:write,read
curl/03-webhooks-subscribe-and-test.shSouscription webhook + test ping + historiquewebhooks:manage
curl/04-rate-limit-monitoring.shBoucle de monitoring de la consommation(aucun)

Postman

Une collection Postman est disponible : postman.json (à venir — exporter la collection depuis Postman après import des endpoints documentés).

Variables Postman à configurer :

  • : https://beta.stormeo.io/api/public/v1
  • : votre clé spk_*
  • : un ID de client existant pour les exemples qui en ont besoin

Insomnia / Bruno / HTTPie

Les scripts curl sont directement portables :

bash
# httpie
http GET "$STORMEO_API_BASE/clients" "x-api-key: $STORMEO_API_KEY"

# xh (httpie en Rust, plus rapide)
xh GET "$STORMEO_API_BASE/clients" "x-api-key: $STORMEO_API_KEY"

StormeoOS API