https://api-devnet.polyester.ai
CreateApiKey
connectCreate a new API key for the caller.
POST
auth.v1.ApiKeyService/CreateApiKey Form
label
string 1-64 chars
subaccountId
string (fixed64)
Optional sub-account to scope this key to (opaque ID). If unset/empty, key is root-level.
icon
string max 32 chars
Optional user-chosen icon/emoji for UI display.
color
string max 32 chars
Optional user-chosen color token for UI display.
ipWhitelist
string max 32 items, unique
Edit in JSON
Optional CIDR whitelist (as strings); empty means no IP restriction.
publicKeyEd25519
string (byte) exactly 32 chars
Ed25519 public key bytes. Clients MUST generate the keypair locally and only send the public key; the private key/seed must never be sent to or stored by the server.
Request JSON
Response
Body
{
"apiKey": {
"color": "#7C3AED",
"createdAt": "2025-01-01T00:00:00Z",
"createdByActor": "value",
"expiresAt": "2025-01-01T00:00:00Z",
"icon": "💰",
"ipWhitelist": [
"value"
],
"keyId": "ak_1a3c6de8153d5a5b04cd2a6529779542",
"label": "Name Of My Subaccount",
"lastUsedAt": "2025-01-01T00:00:00Z",
"policyId": "1",
"publicKeyEd25519": "AA==",
"status": "accepted",
"subaccountId": "6789012345678"
}
}Possible Errors
400
invalid_argument 401
unauthenticated 403
permission_denied 404
not_found 503
unavailable