# Create severity group

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

[endpoint]
base_url = "https://uptime.betterstack.com"
path = "/api/v2/urgency-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 = "name"
description = "The name of the group that you can see in the dashboard."
required = true
type = "string"

[[body_param]]
name = "sort_index"
description = "Set sort_index to specify how to sort your severity 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 severity group'''
body = '''{
  "data": {
    "id": "1234567",
    "type": "urgency_group",
    "attributes": {
      "name": "Example",
      "sort_index": null,
      "created_at": "2024-07-26T15:07:46.350Z",
      "updated_at": "2024-07-26T15:07:46.350Z",
      "team_name": "Testing"
    }
  }
}'''

[/responses]

#### Example cURL 

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

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