---
title: "Create or update an event subscription."
method: PUT
path: "/{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}"
tags: ["EventSubscriptions"]
---

# Create or update an event subscription.

`PUT /{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}`

Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope.

## Path parameters

- `scope` string, required
- `eventSubscriptionName` string, required

## Query parameters

- `api-version` string, required

## Request body

- EventSubscription — Definition of a Resource.
  - `id` string — Fully qualified identifier of the resource.
  - `name` string — Name of the resource.
  - `type` string — Type of the resource.

## Response `201`

EventSubscription CreateOrUpdate request accepted.

- EventSubscription — Definition of a Resource.
  - `id` string — Fully qualified identifier of the resource.
  - `name` string — Name of the resource.
  - `type` string — Type of the resource.

## Other responses

- `default` — *** Error Responses: *** * 400 Bad Request. * 500 Internal Server Error.

---

[API](https://skmtc.net/azure/apis/eventgridmanagementclient.md) · [All operations](https://skmtc.net/azure/apis/eventgridmanagementclient/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/azure/eventgridmanagementclient/revisions/df0357af3193/schema)
