Server settings
Use the server settings below to configure how Blnk exposes its API and enforces authentication.BLNK_SERVER_SECURE
This controls whether API authentication is enforced when you make requests to the server. When set to false, Blnk skips authentication checks.
When set to true, requests must authenticate via X-Blnk-Key header using one of the following:
-
the master key,
BLNK_SERVER_SECRET_KEY -
a stored API key
API keys
Scoped keys for day-to-day API access.
BLNK_SERVER_SECRET_KEY
This is required for any secure Blnk deployment. It is used in two places in Blnk:
- As the master API key for authenticated requests to the server
-
As the HMAC signing secret for outgoing webhooks and hook callbacks.
Webhook security
Signature verification for webhook consumers.
Best practices
- Set
BLNK_SERVER_SECURE=truein any real deployment. - Use a strong secret for
BLNK_SERVER_SECRET_KEY, and make sure to store secrets outside version control. - Keep the server secret stable within an environment unless you are prepared to update any systems that verify webhook signatures.
Metrics endpoint
When monitoring export is enabled, Blnk serves Prometheus metrics atGET /metrics on the API port and on the worker monitoring port. Set metrics_bearer_token to require Authorization: Bearer <token> on scrape requests.
The same rules apply on the worker monitoring port. Auth failures return structured JSON - see API error codes.
Tokenization settings
Use tokenization settings to enable encryption and token generation when using the PII Tokenization feature.Tokenization behaviour
Tokenization is only enabled whenBLNK_TOKENIZATION_SECRET is set and is exactly 32 bytes long. If the secret is missing, tokenization is disabled. If the secret is set but not 32 bytes long, Blnk does not fail startup, but tokenization operations may fail when called.
When enabled, Blnk uses this secret for AES-GCM encryption in standard tokenization and HMAC-based seeding for format-preserving tokenization.
Note: Store this secret securely and keep it stable for each environment. If you change it after data has already been tokenized, previously tokenized values may no longer detokenize correctly.
Request and payload limits
Use these settings to limit request body size and upload size.How limits are applied
These size limits are separate from per-endpoint item limits. A request can be within the item-count limit and still exceed the body-size limit.For example, a bulk transaction request with the accepted count may exceed 5 MB if each transaction contains large metadata or long field values.
Rate limiting
Use rate limiting settings to protect the API from abuse and to control traffic spikes more predictably.Rate limiting behaviour
If bothBLNK_RATE_LIMIT_RPS and BLNK_RATE_LIMIT_BURST are unset, Blnk applies its built-in defaults.
If you set only one of those two values, Blnk derives the other automatically:
- if only
BLNK_RATE_LIMIT_RPSis set,burstdefaults to2 * RPS - if only
BLNK_RATE_LIMIT_BURSTis set,requests_per_seconddefaults toburst / 2