ApiApi keys
Create a new API key
POST
Creates a new API key. The full key is only shown ONCE - save it securely!
bearerX-API-Version?stringAPI version for header-based versioning
Default
"1"Value in
"1""2"application/json- body
name*stringAPI key name
Length
3 <= length <= 100environment*stringEnvironment type
Value in
"test""live"projectId?stringAssociated project ID
expiresAt?stringExpiration date (ISO 8601)
scopes?array<array<any>>Permission scopes. Defaults to ["*"] (full access). Example: ["invoices:read", "invoices:write"]
API key created successfully. Full key is returned only once.
curl -X POST 'http://localhost:3001/api/v1/api-keys' \ -H 'Content-Type: application/json' \ -d '{ "name": "Production API Key", "environment": "test"}'Example Response201
Empty