Create API key
Create an application-only Search key.
Authorizations
The HTTP-only Darwin account session cookie set after sign-in. Local development uses better-auth.session_token without the __Secure- prefix.
Body
An active application owned by the signed-in account.
1 - 200A recognizable name for the environment or integration that will use this key.
1 - 120"Production server"
Optional. New application keys are limited to directory:read; use OAuth for user-scoped Act.
1 elementdirectory:read Optional 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.
New keys identify an application; legacy keys retain their previous user-bound behavior until revoked.
application, legacy_user The application identified by a new key, or null for a legacy user key.