Endpoint
Request
Headers
string
required
A valid Vouch API key. You must already have at least one key (from the dashboard) to generate additional keys via the API.
Body Parameters
This endpoint accepts an empty JSON body ({}). No parameters are required. You may optionally include metadata fields if your integration requires key labelling — contact Vouch support for details on extended metadata.
Examples
Response
A successful request returns HTTP201 Created with the newly generated key.
string
The full API key in the format
vouch_live_<random>. This value is shown once only — copy it to your environment before discarding the response.string
The non-secret prefix of the key (e.g.
vouch_live_8f9a2b3c). You can safely log or display this to help identify which key is in use without exposing the secret.string
ISO 8601 timestamp of when the key was generated.
Example Response
Best Practices
Follow these guidelines to keep your API keys and your users’ data safe. Use environment variables. Never hard-code an API key in your source files. Store it in an environment variable namedVOUCH_API_KEY and reference it at runtime:
.env files to your .gitignore. Use a secrets manager (e.g. AWS Secrets Manager, HashiCorp Vault, or your CI/CD platform’s secret store) in production environments.
Rotate keys regularly. Generate a new key and deprecate the old one on a schedule that fits your security policy. Use the prefix field to identify which key is active in your logs without exposing the secret portion.
Use one key per environment. Maintain separate keys for development, staging, and production so that a compromised key in one environment cannot affect others.