Create a workspace API key
Create a secret key for your backend’s workspace operations.
https://api.nuxie.ai/v1/workspaces/{workspaceId}/api-keysCreate a secret sk_ key for server-side workspace requests, such as starting an Experience. You must be a workspace owner or admin with a verified email address.
Authentication
Authenticate with the user session bearer token returned by Create a user session. A workspace sk_ key cannot authenticate this operation.
Request
workspaceIdpathstringrequiredWorkspace ID from List your workspaces.
namebodystringrequiredA name describing where you will use the key, from 1 to 100 characters.
expiresInDaysbodyintegerDays until expiry: 1–365. Defaults to 90. Send null for no expiry.
Response
Save the key when it is created. Later key listings return metadata without the secret. Keep it on your server, separate from the publishable app keys used by the SDKs.
objectstringrequiredapi_key.
idstringrequiredKey ID, used to revoke it later.
namestringrequiredKey name, or null.
prefixstringrequiredsk_ for workspace keys.
created_by_user_idstringrequiredCreating user ID, or null.
created_atstringrequiredISO 8601 creation time.
expires_atstringrequiredISO 8601 expiry time, or null for no expiry.
last_used_atstringrequiredISO 8601 last-use time, or null.
enabledbooleanrequiredWhether the key is enabled.
keystringrequiredComplete secret key. Returned only when the key is created.
Use and manage the key
Send the returned key as Authorization: Bearer <key> on Workspace API requests. Set X-Nuxie-Env: test for test data or X-Nuxie-Env: live for live data; requests default to live if you omit the header. The key’s name or prefix does not select the environment.
To list keys, send GET /v1/workspaces/{workspaceId}/api-keys. To revoke a key, send DELETE /v1/workspaces/{workspaceId}/api-keys/{keyId}. Both management requests use your user session token.
Errors
A 403 can return workspace_access_denied when you are not a member, workspace_admin_required when you are not an owner or admin, or email_verification_required when your email is unverified. Invalid body fields return 400.
Workspace API requests also depend on your plan and billing status. See Workspace authentication.