API Keys
Create an API key
Mint a key for this workspace. The key itself is returned once; only its hash is stored. `expiresAt` makes it stop working at an instant (a key for a contractor or a one-off script); it stays listed until revoked.
AuthorizationBearer <token>
API key minted via POST /v1/api-keys (format mk_live_...)
In: header
name?string
A label for the key; "default" when omitted.
Length
1 <= length <= 80scope?string
read: GET only. write: everything.
Default
"write"Value in
"read" | "write"expiresAt?string
When the key stops working (ISO 8601, or epoch ms), for a key handed to a script or a contractor. Must be in the future. Omit or null for a key that never expires.
Format
date-timeResponse Body
application/json
application/json
application/json
curl -X POST "https://api.mentio.dev/v1/api-keys" \ -H "Content-Type: application/json" \ -d '{}'{
"id": "string",
"name": "string",
"prefix": "string",
"scope": "read",
"createdAt": "string",
"lastUsedAt": "string",
"expiresAt": "string",
"key": "string"
}{
"error": {
"code": "unauthorized",
"message": "string",
"requestId": "string",
"retryAfterSeconds": 0
}
}{
"error": {
"code": "unauthorized",
"message": "string",
"requestId": "string",
"retryAfterSeconds": 0
}
}