Authentication
API keys, environments, scopes and restrictions.
Send your API key as a bearer token on every request:
Authorization: Bearer bmp_test_…Use HTTPS only. The API sends no CORS headers: call it from your servers, never from a browser or a mobile app, so the key stays secret.
Keys and environments
| Environment | Key prefix | API base URL |
|---|---|---|
| Production | bmp_live_ | https://api.bemyplan.com |
| Sandbox | bmp_test_ | https://api.sandbox.bemyplan.com |
- A key sent to the other environment answers
401api_key_wrong_environment. The error'sdetails.expectedPrefixnames the prefix that environment expects. - No
Authorizationheader:401api_key_missing. - An unknown or revoked key:
401api_key_invalid.
Scopes
A key carries scopes. The Data API needs data:read. The portal offers two presets: Data only
(data:read) and Full access (every scope a key may hold). A call outside the key's scopes answers
403 insufficient_scope.
Services
The Data API is enabled for every account by default. A service that is not enabled for your account
answers 403 service_not_enabled: contact BeMyPlan. If BeMyPlan cannot check which services are enabled,
the call answers 503 entitlement_unavailable: retry shortly. The scope is checked before the service.
IP allowlist
You can restrict a key to single addresses or CIDR ranges, when you create it or later from the key's
restrictions. A call from another address answers 403 api_key_restricted.
Suspended accounts
While BeMyPlan has suspended an account, every key of it answers 403 api_key_workspace_disabled until
BeMyPlan restores it.
Who manages keys
The Owner, Admin and Developer roles can create and revoke keys. Viewers can see them but cannot change them. BeMyPlan staff never create keys for you and never ask you for one.
Rotation
Create a new key, deploy it, then revoke the old one. A revoked key stops working within seconds.