> ## 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.

# Mailer Unsubscribe Endpoint

> Send emails to users from your workspace.

### Changelog
| Version      | Description |
| ------------ | ------------|
|5.4.0         | Added      |

## OpenAPI

````json POST /api/v1/mailer.unsubscribe
{
  "openapi": "3.0.0",
  "info": {
    "version": "1.0.0",
    "title": "Miscellaneous"
  },
  "servers": [
    {
      "url": "https://apiexplorer.support.rocket.chat"
    }
  ],
  "paths": {
    "/api/v1/mailer.unsubscribe": {
      "post": {
        "tags": [
          "Mailer"
        ],
        "summary": "Mailer Unsubscribe Endpoint",
        "description": "Send emails to users from your workspace.\n\n### Changelog\n| Version      | Description |\n| ------------ | ------------|\n|5.4.0         | Added      |",
        "operationId": "post-api-v1-mailer.unsubscribe",
        "parameters": [
          {
            "$ref": "#/components/parameters/Auth-Token"
          },
          {
            "$ref": "#/components/parameters/UserId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "_id": {
                    "type": "string",
                    "description": "The user id of the user that created the mailer"
                  },
                  "createdAt": {
                    "type": "string",
                    "description": "The time the mailer was created"
                  }
                },
                "required": [
                  "_id",
                  "createdAt"
                ]
              },
              "examples": {
                "Example": {
                  "value": {
                    "_id": "c6Lsa9SFVFxJLR56H",
                    "createdAt": "1692284808957"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/trueSuccess"
          },
          "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": {
                "status": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              }
            },
            "examples": {
              "Authorization Error": {
                "value": {
                  "status": "error",
                  "message": "You must be logged in to do this."
                }
              }
            }
          }
        }
      }
    }
  }
}
````

