mirror of
https://github.com/louislam/uptime-kuma.git
synced 2026-03-02 22:57:00 -05:00
API: POST /api/monitor returns 404 Not Found #4175
Labels
No labels
A:accessibility
A:api
A:cert-expiry
A:core
A:dashboard
A:deployment
A:documentation
A:domain expiry
A:incidents
A:maintenance
A:metrics
A:monitor
A:notifications
A:reports
A:settings
A:status-page
A:ui/ux
A:user-management
Stale
ai-slop
blocked
blocked-upstream
bug
cannot-reproduce
dependencies
discussion
duplicate
feature-request
feature-request
good first issue
hacktoberfest
help
help wanted
house keeping
invalid
invalid-format
invalid-format
question
releaseblocker 🚨
security
spam
type:enhance-existing
type:new
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/uptime-kuma#4175
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @aetd on GitHub (Jun 19, 2025).
📑 I have found these related issues/pull requests
I was unable to find any similar open or closed issues or pull requests.
🛡️ Security Policy
📝 Description
A fresh Docker installation of Uptime Kuma does not accept POST requests to its API to create a new monitor. The request fails with an HTTP 404 Not Found error, and the response body says Cannot POST /api/monitor. This happens even after a clean reinstall using the :latest image tag.
Deploy Uptime Kuma on a clean Debian 12 server using the standard docker-compose.yml with the image louislam/uptime-kuma:latest.
Access the web UI at http://<SERVER_IP>:3001 and complete the initial admin user setup.
In the UI, navigate to Settings > API Keys and create a new API key.
From the same server's command line (via SSH), execute the following curl command to try and create a monitor, replacing <YOUR_API_KEY> with the key from the previous step.
👟 Reproduction steps
Bash
curl -v -X POST
-H "Content-Type: application/json"
-d '{"type":"http","name":"Test from Curl","url":"https://google.com"}'
"http://127.0.0.1:3001/api/monitor?apiKey=<YOUR_API_KEY>"
👀 Expected behavior
The curl command should succeed with an HTTP 200 OK status. The response body should be a JSON object indicating success, like {"ok":true, "msg":"Saved", "monitorID":X}. A new monitor named "Test from Curl" should appear in the Uptime Kuma dashboard.
😓 Actual Behavior
curl -v -X POST
-H "Content-Type: application/json"
-d '{"type":"http","name":"Test from Curl","url":"https://google.com"}'
"http://127.0.0.1:3001/api/monitor?apiKey=uk2__wHHF7l1rZ6Q6ADUDpuPvPerAZef-sTOJa_8Ld36"
Note: Unnecessary use of -X or --request, POST is already inferred.
< HTTP/1.1 404 Not Found
<html lang="en"> <head> </head> </html> * Connection #0 to host 127.0.0.1 left intact< X-Frame-Options: SAMEORIGIN
< Content-Security-Policy: default-src 'none'
< X-Content-Type-Options: nosniff
< Content-Type: text/html; charset=utf-8
< Content-Length: 151
< Date: Thu, 19 Jun 2025 23:54:48 GMT
< Connection: keep-alive
< Keep-Alive: timeout=5
<
🐻 Uptime-Kuma Version
1.23.13 (from :latest tag, also tried with :1)
💻 Operating System and Arch
Debian 12
🌐 Browser
Google
🖥️ Deployment Environment
X.X.X(BuildY.Y.Y)X.X.XX.X.X(LTS: Yes/No)X.X.X(LTS: Yes/No)X.X.X(LTS: Yes/No)X.X.X(LTS: Yes/No, via[method/tool])X📝 Relevant log output
@CommanderStorm commented on GitHub (Jun 19, 2025):
We don't currently have this api.
Not sure where you got the idea we have
@valzargaming commented on GitHub (Jun 20, 2025):
This looks like a spam bot
@louislam commented on GitHub (Jun 20, 2025):
I don't think so, but it looks like the idea was coming from AI, and then op trusted AI and opened an issue here.
@brojor commented on GitHub (Nov 17, 2025):
@CommanderStorm I guess he was trying (just like me) to manage Uptime Kuma using terraform provider that attempts to call this endpoint. This wrapper is required for it to work correctly.