---
title: "Decline an invite to a Matrix room"
method: DELETE
path: "/ocs/v2.php/apps/spreed/api/{apiVersion}/matrix/invite/{id}"
tags: ["matrix_room"]
---

# Decline an invite to a Matrix room

`DELETE /ocs/v2.php/apps/spreed/api/{apiVersion}/matrix/invite/{id}`

## Request

- The document declares no server URL.
- Auth: one of:
  - HTTP bearer
  - HTTP basic

## Path parameters

- `apiVersion` 'v1', required
- `id` string, required

## Headers

- `OCS-APIRequest` boolean, required

## Response `200`

Invite declined

- object
  - `ocs` object, required
    - `meta` OCSMeta, required
      - `status` string, required
      - `statuscode` integer, required
      - `message` string
      - `totalitems` string
      - `itemsperpage` string
    - `data` unknown, required

## Other responses

- `401`: Current user is not logged in
- `404`: Invite or Matrix account not found
- `502`: The Matrix homeserver rejected declining or could not be reached

## Changes

- **2026-10-10** `839087136ade`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/nextcloud/apis/spreed-full/changes/ocs/v2.php/apps/spreed/api/:apiVersion/matrix/invite/:id/delete.md)

---

[API](https://skmtc.dev/nextcloud/apis/spreed-full.md) - [All operations](https://skmtc.dev/nextcloud/apis/spreed-full/llms.txt) - [OpenAPI document](https://skmtc.dev/nextcloud/apis/spreed-full/revisions/1d24d3b8fec0?raw)
