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

# Create a team

`POST https://api.pagerduty.com/teams`

Create a new Team.

A team is a collection of Users and Escalation Policies that represent a group of people within an organization.

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

Scoped OAuth requires: `teams.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`)

The team to be created.

| Field | Type | Required | Description |
|---|---|---|---|
| `team` | object | yes |  |
| `team.id` | string |  | Read-only. |
| `team.summary` | string \| null |  | A short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to `name`, though it is not intended to be an identifier. Read-only. |
| `team.type` | string | yes | The type of object being created. One of: `team`. Default: `team`. |
| `team.self` | string \| null (url) |  | the API show URL at which the object is accessible. Read-only. |
| `team.html_url` | string \| null (url) |  | a URL at which the entity is uniquely displayed in the Web app. Read-only. |
| `team.name` | string | yes | The name of the team. Max length: 100. |
| `team.description` | string |  | The description of the team. Max length: 1024. |
| `team.default_role` | string |  | The team is private if the value is "none", or public if it is "manager" (the default permissions for a non-member of the team are either "none", or their base role up until "manager"). One of: `manager`, `none`. Default: `manager`. |

Example: Request Example

```json
{
  "team": {
    "type": "team",
    "name": "Engineering",
    "description": "The engineering team"
  }
}
```

## Response 201

The team that was created.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `team` | object | yes | Same fields as `team` above. |

Example: Response Example

```json
{
  "team": {
    "id": "PQ9K7I8",
    "type": "team",
    "summary": "Engineering",
    "self": "https://api.pagerduty.com/teams/PQ9K7I8",
    "html_url": "https://subdomain.pagerduty.com/teams/PQ9K7I8",
    "name": "Engineering",
    "description": "All engineering",
    "default_role": "manager"
  }
}
```

## 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 402

Account does not have the abilities to perform the action. Please review the response for the required abilities.
You can also use the [Abilities API](#resource_Abilities) to determine what features are available to your account.

### `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 429

Too many requests have been made, the rate limit has been reached.

### `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).
