Skip to navigation

Create API Key

Creates a bearer key, or registers a public key when the body carries public_key. The route selects the scope. Bearer secrets are returned once.

CLI:

agentmail api-keys create --name "My Key"

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
Create Bearer API Key RequestobjectRequired
OR
Create Public Key RequestobjectRequired

Response

This endpoint returns an object.
Create API Key Responseobject
OR
Public Key Credentialobject

Errors

400
Validation Error
409
Conflict Error