POST/v1/monitor-groups

Create a monitor group

Creates a monitor group in the project the API key belongs to.

Request

Bodyapplication/json
group_namestringrequired
Name of the group. It must not match an existing group in the same project.
Example:"Production"
sort_ordernumberoptional
Position of the group in the list. When omitted, the group is placed last: Hyperping takes the highest sort_order in the project and adds 1.

Response

Returns the created group with status code 201.

Errors

Error responses
400Group name is required
The body has no group_name
400A group with this name already exists
Another group in the project already uses that name
403read-only key
The API key has read-only permissions
RequestcURL
curl -X POST https://api.hyperping.io/v1/monitor-groups \
  -H "Authorization: Bearer ${API_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "group_name": "Production",
    "sort_order": 1
  }'
201 CreatedJSON
{
  "group_id": 12,
  "group_name": "Production",
  "sort_order": 1
}
400 Bad RequestJSON
{
  "message": "A group with this name already exists"
}