Create API Key
createAPIKeyCreate a named API key for Uptime Kuma to authenticate Prometheus /metrics scraping via HTTP basic auth. Returns the key once for the user to store before it expires.
Instructions
Creates an API key and returns it. It is sent as the password of HTTP basic auth, with any username. This is the only time the key can be read, and it stays in this conversation's transcript, so give it to the user to store and do not repeat it. Note: once any key exists, Uptime Kuma's /metrics endpoint takes API keys instead of the admin username and password, so a Prometheus scraper still using those must switch.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>"
},
"name": "createAPIKey"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | What the key is for, e.g. "prometheus" | |
| expires | No | When it stops working, in the server's local time: "YYYY-MM-DD" (end of that day) or "YYYY-MM-DD HH:mm". Omit for never. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| key | No | The key itself, e.g. "uk1_…". Shown only now. | |
| keyID | No | ||
| expires | Yes |