POST
/
v1
/
services
curl --request POST \
  --url https://api.rootly.com/v1/services \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
  --header 'content-type: application/vnd.api+json'
{
  "data": {
    "id": "8816af6d-5fc3-4f3c-af9e-526671927911",
    "type": "services",
    "attributes": {
      "name": "elasticsearch-prod",
      "slug": "elasticsearch-prod",
      "description": "Elastisearch",
      "public_description": "Public description",
      "notify_emails": [
        "john@rootly.com",
        "doe@rootly.com"
      ],
      "color": "#FFF",
      "status": "operational",
      "position": 1,
      "show_uptime": true,
      "show_uptime_last_days": 60,
      "slack_channels": [
        {
          "id": "C03MKDSEJE8",
          "name": "elastisearch"
        }
      ],
      "slack_aliases": [
        {
          "id": "S03F7QUV7F1",
          "name": "engineering"
        }
      ],
      "github_repository_name": "rootlyhq/my-github-service",
      "github_repository_branch": "main",
      "gitlab_repository_name": "rootlyhq/my-gitlab-service",
      "gitlab_repository_branch": "main",
      "opsgenie_id": "8743a1b2-11da-480e-8493-744660987bef",
      "pagerduty_id": "PQ9K7I8",
      "backstage_id": null,
      "external_id": "d795fe69-acc2-4b30-92c9-3c25cbb92056",
      "cortex_id": null,
      "service_now_ci_sys_id": null,
      "environment_ids": [
        "cbb5e4f2-74d9-4895-affa-3dd65c80fc87"
      ],
      "service_ids": [
        "a65f27de-4e45-497f-a519-9aa3e01ed9fd"
      ],
      "owners_group_ids": [
        "8530e7aa-1e82-4532-9751-e8597409dfac"
      ],
      "owners_user_ids": [
        461
      ],
      "incidents_count": 0,
      "alert_urgency_id": null,
      "alerts_email_enabled": true,
      "alerts_email_address": "service-37c6b84cce0ba00cfdfa89ddbe025080@test.email.rootly.io",
      "created_at": "2025-03-07T00:09:09.282-08:00",
      "updated_at": "2025-03-07T00:09:09.282-08:00"
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/vnd.api+json
data
object
required

Response

201
application/vnd.api+json
service created
data
object
required