Create API key
Create a scoped API key for your Darwin account.
Manage API keys in Darwin
Authorizations
The HTTP-only Darwin account session cookie set after sign-in. Local development uses better-auth.session_token without the __Secure- prefix.
Body
A recognizable name for the environment or integration that will use this key.
1 - 120"Production server"
Optional permissions for the key. Omit this field to grant the current default developer scopes; prefer the narrowest scopes your integration needs.
1Optional future ISO 8601 expiration. Omit or set null for no scheduled expiration.
"2027-09-21T00:00:00.000Z"
Response
The API key was created. Store apiKey securely because Darwin will not return it again.
Stable non-secret identifier for the API key.
Human-readable key name supplied at creation.
Non-secret prefix you can use to identify the key in logs and settings.
Permissions granted to the key. Every API operation still enforces its required scope.
Lifetime number of requests authenticated with this key.
x >= 0When Darwin most recently authenticated a request with this key, or null if unused.
When the key expires, or null when it has no scheduled expiration.
When the key was revoked, or null while it has not been revoked.
When the key was created.
Plaintext API key. Darwin returns this value only in the create response.