Creates a new API key for the authenticated user. The full key value is returned only once — store it securely, as it cannot be retrieved again.
cURL
curl --request POST \ --url https://api.rendobar.com/api-keys \ --header 'Content-Type: application/json' \ --data ' { "name": "Production API Key", "expiresIn": 2592000 } '
{ "data": { "id": "<string>", "name": "<string>", "prefix": "<string>", "createdAt": 123, "lastUsedAt": 123, "expiresAt": 123, "key": "<string>" } }
Descriptive name for the key (defaults to 'API Key')
"Production API Key"
Expiration in seconds (e.g., 2592000 = 30 days). Omit for no expiry.
2592000
API key created successfully
Show child attributes
Was this page helpful?