---
search:
  tags:
    - external-events
    - PATCH
seo:
  description: >-
    Update external event mapping. Reference for the PATCH
    /workspaces/{organizationId}/external-event-mappings/{id} endpoint in the
    Pile API.
sidebar:
  label: Update external event mapping
  badge: PATCH
title: Update external event mapping
type: openapi-operation
---
`PATCH /workspaces/{organizationId}/external-event-mappings/{id}`

**Request body** (`application/json`)

- `source` (string)
- `eventType` (string)
- `entityType` (string)
- `matchPath` (string)
- `stepKey` (string)
- `secret` (string)
- `enabled` (boolean)

Request body example:

```json
{
  "source": "string",
  "eventType": "string",
  "entityType": "issue",
  "matchPath": "string",
  "stepKey": "string",
  "secret": "string",
  "enabled": true
}
```

**Responses**

- `200` — External event mapping updated
- `404` — External event mapping not found

Response example, 200:

```json
{
  "mapping": {
    "id": "string",
    "organizationId": "string",
    "source": "string",
    "eventType": "string",
    "entityType": "issue",
    "matchPath": "string",
    "stepKey": "string",
    "enabled": true,
    "createdBy": "string",
    "createdAt": "string",
    "updatedAt": "string"
  }
}
```
