# Create heartbeat group

Returns either a newly created heartbeat group, or validation errors.

[endpoint]
base_url = "https://uptime.betterstack.com"
path = "/api/v2/heartbeat-groups"
method = "POST"

[[body_param]]
name = "team_name"
description = "Required if using [global API token](https://betterstack.com/docs/uptime/api/getting-started-with-uptime-api/#get-a-global-api-token) to specify the team which should own the resource"
required = false
type = "string"

[[body_param]]
name = "paused"
description = "Set to `true` to pause monitoring for any existing heartbeats in the group — we won't notify you about downtime.  Set to `false` to resume monitoring for any existing heartbeats in the group."
required = false
type = "boolean"

[[body_param]]
name = "name"
description = "A name of the group that you can see in the dashboard."
required = false
type = "string"

[[body_param]]
name = "sort_index"
description = "Set `sort_index` to specify how to sort your heartbeat groups."
required = false
type = "integer"

[[header]]
name = "Authorization"
description = "Bearer `$TOKEN`"
required = true
type = "string"

[[header]]
name = "Content-type"
description = "application/json"
required = false
type = "String"
[/endpoint]

[responses]
[[response]]
status = 201
description = '''Returns newly created heartbeat group'''
body = '''{
  "data": {
    "id": "123456",
    "type": "heartbeat_group",
    "attributes": {
      "name": "Backend services",
      "sort_index": 0,
      "created_at": "2020-10-03T20:20:43.547Z",
      "updated_at": "2020-10-03T20:20:43.547Z",
      "team_name": "Test team",
      "paused": false
    }
  }
}'''
[/responses]

#### Example cURL 

```shell
[label Example]
curl --request POST \
  --url https://uptime.betterstack.com/api/v2/heartbeat-groups \
  --header "Authorization: Bearer $TOKEN" \
  --header 'Content-Type: application/json' \
  --data '{
	"name": "Backend services"
}'
```

[info]
#### Looking for the details of a specific parameter?
Explore [the list of all heartbeat groups API parameters](https://betterstack.com/docs/uptime/api/heartbeat-groups-api-response-params/)
[/info]
