Skip to main content

Overview

Update an existing monitor group. You can modify the group name, description, and move it within the hierarchy by changing its parent. The API prevents circular references automatically.

Authentication

Requires API Key authentication via the X-API-Key header.
X-API-Key: YOUR_API_KEY

Request

curl -X PUT https://api.uptimeio.com/api/groups/550e8400-e29b-41d4-a716-446655440000 \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
    "name": "Updated Production Services",
    "description": "Updated description for production services"
  }'

Path Parameters

ParameterTypeDescription
groupIdUUIDThe ID of the group to update

Request Body

All fields are optional. Omit fields you don’t want to modify.
FieldTypeDescription
namestringNew group name (1-100 characters)
descriptionstringNew group description (max 500 characters)
parent_group_idUUIDNew parent group ID (null to move to root)

Response

Returns the updated group object.
{
  "success": true,
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "Updated Production Services",
    "description": "Updated description for production services",
    "parent_group_id": null,
    "check_count": 12,
    "created_at": "2024-12-26T10:30:00Z"
  }
}

Response Fields

FieldTypeDescription
idUUIDUnique identifier
namestringUpdated group name
descriptionstringUpdated description
parent_group_idUUID | nullParent group ID
check_countnumberNumber of monitors
created_attimestampCreation timestamp (unchanged)

Status Codes

StatusDescription
200Group updated successfully
400Validation error (invalid data or circular reference)
401Unauthorized (missing or invalid token)
403Forbidden (no permission to update group)
404Group not found

Examples

Update Group Name and Description

curl -X PUT https://api.uptimeio.com/api/groups/550e8400-e29b-41d4-a716-446655440000 \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Critical Services",
    "description": "High-priority monitoring group"
  }'

Move Group to Different Parent

curl -X PUT https://api.uptimeio.com/api/groups/880e8400-e29b-41d4-a716-446655440020 \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "parent_group_id": "990e8400-e29b-41d4-a716-446655440030"
  }'

Move Group to Root Level

curl -X PUT https://api.uptimeio.com/api/groups/880e8400-e29b-41d4-a716-446655440020 \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "parent_group_id": null
  }'

Error Codes

Validation Error - Invalid Name

{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid request data",
    "details": [
      {
        "code": "too_big",
        "message": "String must contain at most 100 character(s)",
        "path": ["name"]
      }
    ]
  }
}

Circular Reference Error

When attempting to set a group as its own parent or create a circular hierarchy:
{
  "success": false,
  "error": {
    "code": "CIRCULAR_REFERENCE",
    "message": "Cannot create circular group reference"
  }
}

Group Not Found

{
  "success": false,
  "error": {
    "code": "GROUP_NOT_FOUND",
    "message": "Group not found or access denied"
  }
}

Forbidden

{
  "success": false,
  "error": {
    "code": "FORBIDDEN",
    "message": "You do not have permission to update this group"
  }
}