> Documentation index for AI agents: https://docs.pagerduty.com/llms.txt

# Create an Incident Type

`POST https://api.pagerduty.com/incidents/types`

Create a new incident type.

Incident Types are a feature which will allow customers to categorize incidents, such as a security incident, a major incident, or a fraud incident.

For more information see the [API Concepts Document](https://docs.pagerduty.com/developer/api-concepts#incidentType)

Scoped OAuth requires: `incident_types.write`

## Authorization

- **api_key** (apiKey) — `Authorization` header. The API Key with format `Token token=<API_KEY>`

## Header parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `Accept` | string | yes | The `Accept` header is used as a versioning header. Default: `application/vnd.pagerduty+json;version=2`. |

## Request body (`application/json`)

| Field | Type | Required | Description |
|---|---|---|---|
| `incident_type` | object | yes | Details of the incident type to be created. |
| `incident_type.name` | string | yes | The name of the Incident Type. Usage of the suffix `_default` is prohibited. This cannot be changed once the incident type has been created. Max length: 50. |
| `incident_type.display_name` | string | yes | The display name of the Incident Type. Usage of the prefix `PD`, `PagerDuty`, `Default` is prohibited. Max length: 50. |
| `incident_type.parent_type` | string | yes | The parent type of the Incident Type. Either name or id of the parent type can be used. |
| `incident_type.enabled` | boolean |  | Whether the Incident Type is enabled. Defaults to true if not provided. |
| `incident_type.description` | string |  | The description of the Incident Type. Max length: 1000. |

Example: Request Example

```json
{
  "incident_type": {
    "name": "fraud_incident",
    "display_name": "Fraud Incident",
    "parent_type": "incident_default"
  }
}
```

## Response 201

The incident type object created.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `incident_type` | object | yes |  |
| `incident_type.enabled` | boolean |  | State of this Incident Type object. |
| `incident_type.id` | string |  | Read-only. |
| `incident_type.name` | string |  | The name of the Incident Type. |
| `incident_type.parent` | object |  | The parent Incident Type (id/name). If omitted, type is created under top level (incident_default) |
| `incident_type.parent.id` | string |  |  |
| `incident_type.parent.type` | string |  |  |
| `incident_type.type` | string |  | A string that determines the schema of the object. This must be the standard name for the entity, suffixed by `_reference` if the object is a reference. Read-only. |
| `incident_type.description` | string |  | A succinct description of the Incident Type. |
| `incident_type.created_at` | string (date-time) |  | The time the Incident Type was created. Read-only. |
| `incident_type.updated_at` | string (date-time) |  | The time the Incident Type was last modified. |
| `incident_type.display_name` | string |  | The display name of the Incident Type. The first character must be alphanumeric. Max length: 50, Min Length : 1. The `display_name` for a Field must be unique. |

Example: Response Example

```json
{
  "incident_type": {
    "enabled": true,
    "id": "P234567",
    "name": "fraud_incident",
    "parent": {
      "id": "P123456",
      "type": "incident_type_reference"
    },
    "type": "incident_type",
    "description": null,
    "created_at": "2023-05-31T13:41:47Z",
    "updated_at": "2023-07-31T13:41:47Z",
    "display_name": "Fraud Incident"
  }
}
```

## Response 400

Caller provided invalid arguments. Please review the response for error details. Retrying with the same arguments will *not* work.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | object |  |  |
| `error.code` | integer |  | Read-only. |
| `error.message` | string |  | Error message string. Read-only. |
| `error.errors` | array of string |  | Read-only. |

## Response 401

Caller did not supply credentials or did not provide the correct credentials.
If you are using an API key, it may be invalid or your Authorization header may be malformed.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | object |  |  |
| `error.code` | integer |  | Read-only. |
| `error.message` | string |  | Error message string. Read-only. |
| `error.errors` | array of string |  | Read-only. |

## Response 403

Caller is not authorized to view the requested resource.
While your authentication is valid, the authenticated user or token does not have permission to perform this action.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | object |  |  |
| `error.code` | integer |  | Read-only. |
| `error.message` | string |  | Error message string. Read-only. |
| `error.errors` | array of string |  | Read-only. |

## Response 404

The requested resource was not found.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | object |  |  |
| `error.code` | integer |  | Read-only. |
| `error.message` | string |  | Error message string. Read-only. |
| `error.errors` | array of string |  | Read-only. |

## Response 500

Internal Server Error the PagerDuty server experienced an error.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | object |  |  |
| `error.code` | integer |  | Read-only. |
| `error.message` | string |  | Error message string. Read-only. |
| `error.errors` | array of string |  | Read-only. |

## Developer Agreement

Your access to and use of the PagerDuty Developer Services is governed by the [PagerDuty Developer Agreement](https://docs.pagerduty.com/developer/pagerduty-developer-agreement).
