Skip to main content
PATCH
/
monitors
/
{id}
Partially update a monitor
curl --request PATCH \
  --url https://upcron.io/api/monitors/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "My Monitor",
  "url": "https://example.com/health",
  "valid_http_codes": [
    200,
    201
  ],
  "basic_auth_username": "user",
  "basic_auth_password": "pass",
  "_method": "GET",
  "active": true
}
'
{
  "message": "Monitor updated successfully",
  "data": {
    "id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
    "name": "My Monitor",
    "url": "https://example.com",
    "project_id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
    "valid_http_codes": [
      200,
      201
    ],
    "status": 1,
    "basic_auth_username": null,
    "method": "GET",
    "active": true,
    "created_at": "2024-01-01T12:00:00.000000Z",
    "updated_at": "2024-01-01T12:00:00.000000Z",
    "uptime": 99.5,
    "last_checked": "2 minutes ago",
    "incidents_count": 3,
    "last_incident_duration": 120,
    "project": {
      "id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
      "name": "My Project",
      "description": "Project description"
    }
  }
}

Authorizations

Authorization
string
header
required

Laravel Sanctum Bearer token authentication

Path Parameters

id
string<uuid>
required

Monitor ID

Body

application/json
name
string
Maximum string length: 255
Example:

"My Monitor"

url
string<uri>
Maximum string length: 2048
Example:

"https://example.com/health"

valid_http_codes
integer[]
Required range: 100 <= x <= 599
Example:
[200, 201]
basic_auth_username
string | null
Maximum string length: 255
Example:

"user"

basic_auth_password
string | null
Maximum string length: 255
Example:

"pass"

_method
enum<string>
Available options:
GET,
POST,
PUT,
PATCH,
DELETE,
HEAD
Example:

"GET"

active
boolean
Example:

true

Response

Monitor updated successfully

message
string
Example:

"Monitor updated successfully"

data
object