API Key Management
Update API Key
Update an API key's name or active status
Authorization
BearerAuth AuthorizationBearer <token>
JWT token authentication for API key management
In: header
Path Parameters
key_id*string
API key ID
Format
uuidRequest Body
application/json
name?string
New name for the API key
is_active?boolean
Activate or deactivate the key
Response Body
application/json
curl -X PATCH "https://api.brainus.lk/api/v1/dev/keys/497f6eca-6276-4993-bfeb-53cbbbba6f08" \ -H "Content-Type: application/json" \ -d '{}'{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "Production API Key",
"key_prefix": "sk_live_",
"is_active": true,
"created_at": "2019-08-24T14:15:22Z",
"last_used_at": "2019-08-24T14:15:22Z",
"plan": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "Free",
"description": "string",
"rate_limit_per_minute": 10,
"rate_limit_per_day": 1000,
"monthly_quota": 10000,
"price_lkr": 0,
"allowed_models": [
"string"
]
}
}Empty
Empty