---
title: "Remove a mapping of room alias to room ID."
method: DELETE
path: "/_matrix/client/v3/directory/room/{roomAlias}"
tags: ["Room directory"]
---

# Remove a mapping of room alias to room ID.

`DELETE /_matrix/client/v3/directory/room/{roomAlias}`

## Request

- Base URL: `https://matrix.org`
- URL: `https://matrix.org/_matrix/client/v3/directory/room/{roomAlias}`
- Auth: one of:
  - API key in query parameter `access_token`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/matrix/apis/matrix-client-server-api/docs/_matrix/client/v3/directory/room/:roomAlias/delete.ts> (a function with typed inputs; its response is checked against the schema)

Remove a mapping of room alias to room ID.

Servers may choose to implement additional access control checks here, for instance that
room aliases can only be deleted by their creator or a server administrator.

**Note:**
Servers may choose to update the `alt_aliases` for the `m.room.canonical_alias`
state event in the room when an alias is removed. Servers which choose to update the
canonical alias event are recommended to, in addition to their other relevant permission
checks, delete the alias and return a successful response even if the user does not
have permission to update the `m.room.canonical_alias` event.

## Path parameters

- `roomAlias` string, mx-room-alias, required

## Response `200`

The mapping was deleted.

- object

## Other responses

- `404`: There is no mapped room ID for this room alias.

---

[API](https://skmtc.dev/matrix/apis/matrix-client-server-api.md) - [All operations](https://skmtc.dev/matrix/apis/matrix-client-server-api/llms.txt) - [OpenAPI document](https://skmtc.dev/matrix/apis/matrix-client-server-api/revisions/c7fe4072c681?raw)
