> ## Documentation Index
> Fetch the complete documentation index at: https://developer.rocket.chat/llms.txt
> Use this file to discover all available pages before exploring further.
# Delete Invite by ID
> Deletes an invite from the workspace.
Permission required: `create-invite-links`
## OpenAPI
````json DELETE /api/v1/removeInvite/{_id}
{
"openapi": "3.0.0",
"info": {
"version": "1.0.0",
"title": "Rooms"
},
"servers": [
{
"url": "https://apiexplorer.support.rocket.chat"
}
],
"tags": [
{
"name": "Channels"
},
{
"name": "Directory"
},
{
"name": "Groups"
},
{
"name": "Rooms"
},
{
"name": "Teams"
},
{
"name": "Room Invites"
},
{
"name": "Subscriptions"
},
{
"name": "ABAC"
}
],
"paths": {
"/api/v1/removeInvite/{_id}": {
"delete": {
"tags": [
"Room Invites"
],
"summary": "Delete Invite by ID",
"description": "Deletes an invite from the workspace.\r\n\r\nPermission required: `create-invite-links`",
"operationId": "delete-api-v1-removeInvite-_id",
"parameters": [
{
"$ref": "#/components/parameters/Auth-Token"
},
{
"$ref": "#/components/parameters/UserId"
},
{
"name": "_id",
"in": "path",
"description": "The invite ID to be deleted.",
"required": true,
"schema": {
"type": "string"
},
"example": "kDKQ3H"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/trueSuccess"
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"error": {
"type": "string"
},
"errorType": {
"type": "string"
},
"details": {
"type": "object",
"properties": {
"method": {
"type": "string"
}
}
}
}
},
"examples": {
"Invalid Invitation Id": {
"value": {
"success": false,
"error": "Invalid Invitation _id [invalid-invitation-id]",
"errorType": "invalid-invitation-id",
"details": {
"method": "removeInvite"
}
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/authorizationError"
}
}
}
}
},
"components": {
"parameters": {
"Auth-Token": {
"name": "X-Auth-Token",
"in": "header",
"description": "The `authToken` of the authenticated user.",
"required": true,
"schema": {
"type": "string"
},
"example": "RScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f"
},
"UserId": {
"name": "X-User-Id",
"in": "header",
"description": "The `userId` of the authenticated user.",
"required": true,
"schema": {
"type": "string"
},
"example": "rbAXPnMktTFbNpwtJ"
}
},
"responses": {
"trueSuccess": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
}
}
},
"examples": {
"Success": {
"value": {
"success": true
}
}
}
}
}
},
"authorizationError": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"error": {
"type": "string"
}
}
},
"examples": {
"Authorization Error": {
"value": {
"success": false,
"error": "You must be logged in to do this."
}
}
}
}
}
}
}
}
}
````