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

# Configure an account's session configurations

`PUT https://api.pagerduty.com/session_configurations`

Creates or updates session configurations for a PagerDuty Account. The configurations will take effect immediately for new sessions, while existing sessions for the specified `types` are immediately revoked.

Scoped OAuth requires: `session_configurations.write`

## Authorization

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

## Query parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `type` | string | yes | Session configuration type. This can be either 'mobile' or 'web', or a comma-separated list of both. One of: `mobile`, `web`. |

## 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`) — required

| Field | Type | Required | Description |
|---|---|---|---|
| `session_configuration` | object | yes |  |
| `session_configuration.absolute_session_ttl` | integer | yes | Absolute session time to live in seconds. Minimum: 600. Maximum: 18144000. |
| `session_configuration.idle_session_ttl` | integer | yes | Idle session time to live in seconds. Minimum: 60. Maximum: 15552000. |

## Response 200

Session Configurations updated successfully

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `session_configurations` | array of object | yes |  |
| `session_configurations[].type` | string | yes | The session configuration type (mobile or web) One of: `mobile`, `web`. |
| `session_configurations[].absolute_session_ttl` | integer | yes | Absolute session time to live in seconds. Minimum: 600. Maximum: 18144000. |
| `session_configurations[].idle_session_ttl` | integer | yes | Idle session time to live in seconds. Minimum: 60. Maximum: 86400. |

Example: Put Session Configurations Example

```json
{
  "session_configurations": [
    {
      "type": "web",
      "absolute_session_ttl": 3600,
      "idle_session_ttl": 600
    },
    {
      "type": "mobile",
      "absolute_session_ttl": 7200,
      "idle_session_ttl": 1200
    }
  ]
}
```

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