Create API key
const url = 'https://api.neuramancer.dev/v1/auth/api';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"tenantName":"example","keyName":"example","expiryDate":"2026-04-15T12:00:00Z"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.neuramancer.dev/v1/auth/api \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "tenantName": "example", "keyName": "example", "expiryDate": "2026-04-15T12:00:00Z" }'Generates a new API key for a tenant. The clear-text key is returned only once in the response. Requires authentication (API key belonging to tenant or user JWT with tenant access).
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
Tenant name to create the API key for
Human-readable name for the API key
Expiration date for the API key (must be in the future)
Examplegenerated
{ "tenantName": "example", "keyName": "example", "expiryDate": "2026-04-15T12:00:00Z"}Responses
Section titled “Responses”API key created successfully
Standardized success response following the APIResponse
object
object
Human-readable name for the API key
Unique identifier for the API key (use this to delete the key)
Creation timestamp
Expiration timestamp
The clear-text API key secret (returned only once, store securely). Subsequent reads return ‘***’.
Example
{ "success": true}Invalid request - missing required fields or invalid expiry date
object
Error message
Example
{ "success": false}Unauthorized - invalid or missing authentication
object
Error message
Example
{ "success": false}Unauthorized - tenant access denied
object
Error message
Example
{ "success": false}Tenant not found
object
Error message
Example
{ "success": false}Internal server error
object
Error message
Example
{ "success": false}