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

# Create ServiceNow credentials

`POST https://api.pagerduty.com/enrichment/integrations/servicenow/credentials`

Creates the ServiceNow API credentials used to authenticate synchronization and test requests. Only one credential set is allowed per account, and it is shared across the account's ServiceNow integration. The password is never returned in responses.

<!-- theme: warning -->

> ### Early Access
> This API is in Early Access and may change at any time. Contact your PagerDuty account team to request access.

Scoped OAuth requires: `contextual_data.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`) — required

The ServiceNow credentials to create. Only one credential set is allowed per account.

| Field | Type | Required | Description |
|---|---|---|---|
| `credentials` | object | yes |  |
| `credentials.instance_endpoint` | string | yes | The ServiceNow instance URL (for example, `https://your-instance.service-now.com`). |
| `credentials.user` | string | yes | The ServiceNow username used to authenticate API requests. The user must have read access to the configured CMDB tables. |
| `credentials.password` | string | yes | The ServiceNow password. Only accepted in requests and never returned in responses. Write-only. |

Example: Create ServiceNow credentials

```json
{
  "credentials": {
    "instance_endpoint": "https://your-instance.service-now.com",
    "user": "integration_user",
    "password": "YOUR_SERVICENOW_PASSWORD"
  }
}
```

## Response 201

The ServiceNow credentials were created successfully. The password is never returned.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `credentials` | object |  |  |
| `credentials.id` | string |  | Base32-encoded UUID v7 (26 uppercase alphanumeric characters) identifying the credentials. Read-only. |
| `credentials.instance_endpoint` | string |  | The ServiceNow instance URL (for example, `https://your-instance.service-now.com`). |
| `credentials.user` | string |  | The ServiceNow username used to authenticate API requests. The user must have read access to the configured CMDB tables. |
| `credentials.password` | string |  | The ServiceNow password. Only accepted in requests and never returned in responses. Write-only. |
| `credentials.created_at` | string (date-time) |  | The date/time the credentials were created. Read-only. |
| `credentials.updated_at` | string (date-time) |  | The date/time the credentials were last updated. Read-only. |
| `credentials.deleted_at` | string \| null (date-time) |  | The date/time the credentials were deleted, or `null` if they have not been deleted. Read-only. |

Example: Example Response

```json
{
  "credentials": {
    "id": "01HV2C3D4E5F6G7H8J9K0LMNPQ",
    "instance_endpoint": "https://your-instance.service-now.com",
    "user": "integration_user",
    "created_at": "2026-06-30T18:20:00Z",
    "updated_at": "2026-06-30T18:20:00Z",
    "deleted_at": null
  }
}
```

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

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