---
title: "PUT /eventroutes/{id}"
method: PUT
path: "/eventroutes/{id}"
tags: ["EventRoutes"]
---

# PUT /eventroutes/{id}

`PUT /eventroutes/{id}`

Adds or replaces an event route.
Status codes:
* 204 No Content
* 400 Bad Request
  * EventRouteEndpointInvalid - The endpoint provided does not exist or is not active.
  * EventRouteFilterInvalid - The event route filter is invalid.
  * EventRouteIdInvalid - The event route id is invalid.
  * LimitExceeded - The maximum number of event routes allowed has been reached.

## Path parameters

- `id` string, required

## Query parameters

- `api-version` string, required

## Request body

- EventRoute — A route which directs notification and telemetry events to an endpoint. Endpoints are a destination outside of Azure Digital Twins such as an EventHub.
  - `id` string — The id of the event route.
  - `endpointName` string, required — The name of the endpoint this event route is bound to.
  - `filter` string, required — An expression which describes the events which are routed to the endpoint.

## Response `204`

Success

## Other responses

- `default` — Default response.

---

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