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

# Migrate an Integration from one Event Orchestration to another

`POST https://api.pagerduty.com/event_orchestrations/{id}/integrations/migration`

Move an Integration and its Routing Key from the Event Orchestration specified in the request payload, to the Event Orchestration specified in the request URL.

Any future events sent to this Integration's Routing Key will be processed by this Event Orchestration's Rules.

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

Scoped OAuth requires: `event_orchestrations.write`

## Authorization

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

## Path parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | The ID of an Event Orchestration. |

## 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 |
|---|---|---|---|
| `source_id` | string | yes | The ID of the Event Orchestration you'll be moving the Integration away from. |
| `source_type` | string | yes | The type of of the `source_id` object. One of: `orchestration`. |
| `integration_id` | string | yes | The ID of the Integration you'll be moving. |

Example: Example: Migrate an Integration

```json
{
  "source_type": "orchestration",
  "source_id": "b02e973d-9620-4e0a-9edc-00fedf7d4694",
  "integration_id": "11832872-88b6-4661-8972-db5712b69496"
}
```

## Response 200

The Integration that was migrated

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `integrations` | array of object |  |  |
| `integrations[].id` | string |  | ID of the Integration. Read-only. |
| `integrations[].label` | string |  | Name of the Integration. |
| `integrations[].parameters` | object |  | Read-only. |
| `integrations[].parameters.routing_key` | string |  | Routing Key used to send Events to this Orchestration. Read-only. |
| `integrations[].parameters.type` | string |  | Read-only. Default: `global`. |
| `total` | integer \| null |  | The total number of records matching the given query. Read-only. |

Example: Response Example

```json
{
  "integrations": [
    {
      "id": "9c5ff030-12da-4204-a067-25ee61a8df6c",
      "label": "Go-Kart Orchestration Default Integration",
      "parameters": {
        "routing_key": "R022XIJR9M266DX570EVE6EXP1AFBN6D",
        "type": "global"
      }
    },
    {
      "id": "11832872-88b6-4661-8972-db5712b69496",
      "label": "Integration for Monitoring Tool X",
      "parameters": {
        "routing_key": "R028DIE06SNKNO6V5ACSLRV7Y0TUVG7T",
        "type": "global"
      }
    }
  ],
  "total": 2
}
```

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

The request was received and recognized by the server, but its HTTP method was rejected for the requested resource.

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

The request conflicts with the current state of the server.

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