# Create PagerDuty integration

Returns either a newly created PagerDuty integration, or validation errors.

[endpoint]
base_url = "https://uptime.betterstack.com"
path = "/api/v2/pager-duty-webhooks"
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 PagerDuty integration that you can see in the dashboard."
required = false
type = "string"

[[body_param]]
name = "*"
description = "Any other params you'd like to set. See the [list of all PagerDuty integration API parameters](https://betterstack.com/docs/uptime/api/pagerduty-integrations-response-params/) for details."
required = false

[[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 PagerDuty integration'''
body = '''{
  "data": {
    "id": "17",
    "type": "pager_duty_webhook",
    "attributes": {
      "name": "Test",
      "key": "[key]",
      "team_name": "My team"
    }
  }
}'''

[/responses]

#### Example cURL 

```shell
[label Example]
curl -X "POST" "https://uptime.betterstack.com/api/v2/pager-duty-webhooks/" \
     -H "Authorization: Bearer $TOKEN" \
     -H 'Content-Type: application/json; charset=utf-8' \
     -d $'{
  "name": "Test",
  "key": "[key]"
}'
```

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