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

# Add a CMDB table

`POST https://api.pagerduty.com/enrichment/integrations/servicenow/{integration_id}/tables`

Adds a new ServiceNow CMDB table configuration to an existing integration. An integration may contain at most 8 tables. New tables are created with `status: disabled`; enable synchronization separately once the configuration has been validated.

<!-- 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>`

## Path parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `integration_id` | string | yes | Base32-encoded UUID v7 (26 uppercase alphanumeric characters) identifying the ServiceNow enrichment integration. |

## 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 CMDB table configuration to add to the integration.

| Field | Type | Required | Description |
|---|---|---|---|
| `cmdb_table` | object | yes |  |
| `cmdb_table.display_name` | string | yes | A human-readable name for the CMDB table configuration. This name is used to identify the generated enrichment schema in the Event Enrichment rule editor. |
| `cmdb_table.ci_table_name` | string | yes | The name of the ServiceNow CMDB table to synchronize (for example, `cmdb_ci_server` or `cmdb_ci_ip_switch`). Table names are case-sensitive. |
| `cmdb_table.query_filter` | string \| null |  | An optional ServiceNow encoded query used to limit which records are synchronized from the table (for example, `operational_status=1^u_environment=production`). Set to `null` to synchronize all records. |
| `cmdb_table.field_mappings` | array of object | yes | The mappings between ServiceNow fields and event fields. Must contain between 2 and 20 mappings, including at least one enrichment field. At most 3 mappings may be marked as query fields. Min items: 2. Max items: 20. |
| `cmdb_table.field_mappings[].servicenow_field` | string | yes | The ServiceNow field (column) to read the value from. Dot-walked fields are supported to traverse relationships (for example, `support_group.manager.email`). |
| `cmdb_table.field_mappings[].event_field` | string | yes | The event field that the ServiceNow value is mapped to. |
| `cmdb_table.field_mappings[].type` | string |  | Set to `query` to use this mapping as a lookup key for matching incoming events to Configuration Items. Omit it for enrichment fields (the default). At most 3 mappings may be marked `query`, and at least one mapping must be left as an enrichment field. When no mapping is marked `query`, the `name` field is used as the query field automatically. Only `query` is accepted here — any other value is rejected. One of: `query`. |

Example: Add a CMDB table

```json
{
  "cmdb_table": {
    "display_name": "Windows Servers",
    "ci_table_name": "cmdb_ci_win_server",
    "query_filter": null,
    "field_mappings": [
      {
        "servicenow_field": "name",
        "event_field": "source"
      },
      {
        "servicenow_field": "category",
        "event_field": "category"
      },
      {
        "servicenow_field": "fault_count",
        "event_field": "fault count"
      },
      {
        "servicenow_field": "cost_cc",
        "event_field": "cost cc"
      }
    ]
  }
}
```

## Response 201

The CMDB table was added to the integration successfully.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `cmdb_table` | object |  |  |
| `cmdb_table.id` | string |  | Base32-encoded UUID v7 (26 uppercase alphanumeric characters) identifying the CMDB table configuration. Read-only. |
| `cmdb_table.display_name` | string |  | A human-readable name for the CMDB table configuration. This name is used to identify the generated enrichment schema in the Event Enrichment rule editor. |
| `cmdb_table.ci_table_name` | string |  | The name of the ServiceNow CMDB table to synchronize (for example, `cmdb_ci_server` or `cmdb_ci_ip_switch`). Table names are case-sensitive. |
| `cmdb_table.query_filter` | string \| null |  | An optional ServiceNow encoded query used to limit which records are synchronized from the table (for example, `operational_status=1^u_environment=production`). Set to `null` to synchronize all records. |
| `cmdb_table.field_mappings` | array of object |  | The mappings between ServiceNow fields and event fields. Must contain between 2 and 20 mappings, including at least one enrichment field. At most 3 mappings may be designated as query fields. |
| `cmdb_table.field_mappings[].servicenow_field` | string | yes | The ServiceNow field (column) to read the value from. Dot-walked fields are supported to traverse relationships (for example, `support_group.manager.email`). |
| `cmdb_table.field_mappings[].event_field` | string | yes | The event field that the ServiceNow value is mapped to. |
| `cmdb_table.field_mappings[].type` | string |  | Determines how the field is used during enrichment. `enriched` fields add contextual data to a matched event, while `query` fields are used to match incoming events to Configuration Items. When no mapping specifies a `type`, the field defaults to `enriched` and the `name` field is automatically used as the single query field. To match on a different field — or on more than one field — set `type: query` on those mappings; in that mode `name` is no longer used as a query field unless it is itself marked `query`. Up to 3 query fields may be configured, and when more than one is set an event must contain a matching value for every query field to be enriched (logical AND). At least one mapping must be an enriched field. In responses, a mapping's `type` is `query`, `enriched`, or `discriminator`. `discriminator` is assigned automatically to the `sys_id` field of `cmdb_rel_ci` relationship tables to distinguish relationship types; it appears in responses but cannot be set on requests. One of: `query`, `enriched`, `discriminator`. |
| `cmdb_table.status` | string |  | The current data synchronization status of the table. `disabled`: sync is not enabled (the default for newly created tables). `syncing`: an initial sync is in progress. `active`: sync is healthy and incremental updates are running. `error`: sync failed (check the credentials or table configuration). Read-only. One of: `disabled`, `syncing`, `active`, `error`. |
| `cmdb_table.created_at` | string (date-time) |  | The date/time the table configuration was created. Read-only. |
| `cmdb_table.updated_at` | string (date-time) |  | The date/time the table configuration was last updated. Read-only. |
| `cmdb_table.deleted_at` | string \| null (date-time) |  | The date/time the table configuration was deleted, or `null` if it has not been deleted. Read-only. |

Example: Example Response

```json
{
  "cmdb_table": {
    "id": "01HV9TBLE2DEFGHIJKLMNOPQRS",
    "display_name": "Windows Servers",
    "ci_table_name": "cmdb_ci_win_server",
    "query_filter": null,
    "field_mappings": [
      {
        "servicenow_field": "name",
        "event_field": "source",
        "type": "query"
      },
      {
        "servicenow_field": "category",
        "event_field": "category",
        "type": "enriched"
      },
      {
        "servicenow_field": "fault_count",
        "event_field": "fault count",
        "type": "enriched"
      },
      {
        "servicenow_field": "cost_cc",
        "event_field": "cost cc",
        "type": "enriched"
      }
    ],
    "status": "disabled",
    "created_at": "2026-06-30T20:00:00Z",
    "updated_at": "2026-06-30T20:00: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 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 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).
