Tags and Tag Groups
Tags help you organize your monitors. You can assign multiple tags to a monitor and use them for filtering and bulk notification management. Tag groups let you organize related tags together.
Example request:
$ OHDEAR_TOKEN="your API token" $ curl https://ohdear.app/api/tags \ -H "Authorization: Bearer $OHDEAR_TOKEN" \ -H 'Accept: application/json' \ -H 'Content-Type: application/json'
All endpoints below follow the same authentication pattern.
Tags #
Tag response fields #
Each tag object has these fields:
{ "id": 1, "team_id": 1, "team_name": "My Team", "name": "Production", "slug": "production", "created_at": "2024-01-15T10:00:00.000000Z", "updated_at": "2024-01-15T10:00:00.000000Z", "sites": [1, 2, 5] }
id: unique identifierteam_id: the team this tag belongs toteam_name: the team namename: the tag nameslug: URL-safe version of the namecreated_at: when the tag was created (UTC)updated_at: when the tag was last modified (UTC)sites: array of monitor IDs assigned to this tag
List all tags #
GET /api/tags
Returns all tags across your teams. Each item follows the tag shape above.
Create a tag #
POST /api/tags
Creates a new tag.
Request body (JSON):
team_id(integer, required) -- the ID of the team this tag belongs toname(string, required) -- the name of the tagmonitors(array of integers, optional) -- monitor IDs to assign this tag to
Returns the tag object.
Tag groups #
Tag groups allow you to organize related tags together, making it easier to manage monitors and notifications at scale.
Tag group response fields #
Each tag group object has these fields:
{ "id": 1, "label": "Environments", "team_id": 1, "team_name": "My Team", "created_at": "2024-01-15T10:00:00.000000Z", "tags": [ { "id": 1, "name": "Production", "slug": "production", "..." } ] }
id: unique identifierlabel: the tag group labelteam_id: the team this tag group belongs toteam_name: the team namecreated_at: when the tag group was created (UTC)tags: array of tag objects in this group
List all tag groups #
GET /api/tag-groups
Returns all tag groups across your teams. Each item follows the tag group shape above.
Create a tag group #
POST /api/tag-groups
Creates a new tag group.
Request body (JSON):
team_id(integer, required) -- the ID of the team this tag group belongs tolabel(string, required) -- the label for the tag grouptags(array of strings, optional) -- tag names to include in this group. Supports wildcards (e.g.,prod-*)
Returns the tag group object.
Update a tag group #
PUT /api/tag-groups/{tagGroupId}
Updates an existing tag group.
Request body (JSON):
team_id(integer, required) -- the ID of the team this tag group belongs tolabel(string, required) -- the label for the tag grouptags(array of strings, optional) -- updated tag names. Supports wildcards (e.g.,prod-*)
Returns the updated tag group object.
Delete a tag group #
DELETE /api/tag-groups/{tagGroupId}
Deletes a tag group. Only the grouping is removed -- individual tags remain and stay assigned to their monitors. Returns 204 No Content on success.
Feel free to reach out via [email protected] or on X via @OhDearApp if you have any other questions. We'd love to help!