Mint an API key
POST/keys
POST
/keys
Create a new ck_ API key for the signed-in account. The raw key is returned exactly once; store it and pass it as the Authorization bearer on api.close.city. Accounts hold at most 3 active keys.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”X-CSRF-Token
required
string
The session’s CSRF token, from GET /auth/csrf.
Request Body
Section titled “Request Body”object
label
Optional label.
string
Responses
Section titled “Responses”The new key, shown once.
object
key
string
prefix
string
tokens_remaining
The account’s current token balance. The signup grant is once per account, so this can be 0 for a returning account.
integer
No signed-in session.
Missing or invalid X-CSRF-Token.
Active-key limit reached; revoke one.