---
title: "Update Event Subscription"
method: PATCH
path: "/eventSubscriptions/{eventSubscriptionKey}"
tags: ["Event Subscriptions"]
---

# Update Event Subscription

`PATCH /eventSubscriptions/{eventSubscriptionKey}`

## Request

- Base URL: `https://eu-west-1.api.silverflow.com/v1`
- URL: `https://eu-west-1.api.silverflow.com/v1/eventSubscriptions/{eventSubscriptionKey}`
- Auth: one of:
  - HTTP basic
  - HTTP bearer
- TypeScript: <https://skmtc.dev/silverflow/apis/silverflow-api/docs/eventSubscriptions/:eventSubscriptionKey/patch.ts> (a function with typed inputs; its response is checked against the schema)

When the subscription is created successfully, a test event will be sent to the `targetUrl`.

Requires `eventSubscriptions:Update` permission.

## Path parameters

- `eventSubscriptionKey` string, required

## Request body

- EventSubscriptionMergeUpdate
  - `description` string
  - `targetUrl` string: A valid URL

## Response `200`

The updated Event Subscription version

- EventSubscription
  - `key` string, required
  - `agentKey` string, required: Uniquely identifies an Agent
  - `status` 'active' | 'archived', required: The status of the Event Subscription
  - `description` string
  - `eventSource` string, required: A valid URL
  - `eventDataSchema` string, required: A valid URL
  - `targetUrl` string, required: A valid URL
  - `created` string, date-time, required: The date and time this object was created
  - `lastModified` string, date-time: The date and time this object was last modified
  - `version` integer, required: The version of this object

## Other responses

- `400`: The request was malformed. See the response body for details
- `401`: Authentication information is missing or invalid
- `403`: The authenticated client is forbidden to make the request for the resource identified.
- `404`: The requested resource was not found
- `412`: The conditions specified in the HTTP headers of the request were not met.
- `429`: The number of requests (per minute) has exceeded the configured maximum

---

[API](https://skmtc.dev/silverflow/apis/silverflow-api.md) - [All operations](https://skmtc.dev/silverflow/apis/silverflow-api/llms.txt) - [OpenAPI document](https://skmtc.dev/silverflow/apis/silverflow-api/revisions/43ecbe4fd6ea?raw)
