Links

Mailer Unsubscribe Endpoint

Send emails to users from your workspace.
URL
Requires Auth
HTTP Method
/api/v1/mailer.unsubscribe
yes
POST

Headers

Argument
Example
Required
Description
X-User-Id
myuser-name
Required
The authenticated user ID.
X-Auth-Token
myauth-token
Required
Auth token.

Payload Parameter

Argument
Example
Required
Description
_id
c6Lsa9SFVFxJLR56H
Required
The user id of the user that created the mailer
createdAt
1692284808957
Required
The user id of the user that created the mailer.

Example Payload

{
"_id":"c6Lsa9SFVFxJLR56H",
"createdAt":"1692284808957"
}

Example Call

curl -L -X POST "http://localhost:3000/api/v1/mailer.unsubscribe" \
-H 'x-auth-token: mKbjO_nZwyhw5wAwxzyvbfKi-gwsczKAREXuk531nYC' \
-H 'x-user-id: BgJxHCKughQrg3TZP' \
-H 'Content-Type: application/json' \
-d '{
"_id":"c6Lsa9SFVFxJLR56H",
"createdAt":"1692284808957"
}'

Example Result

Success

{
"success": true
}

Errors

The following errors can occur upon the endpoint.
  • Authorization: Requires an authentication token for the request to be made.
Authorization
{
"status": "error",
"message": "You must be logged in to do this."
}

Change Log

Version
Description
5.4.0
Added
Last modified 2mo ago
Deprecation for cloud services and apps is now extended to November 20, 2023. Rocket.Chat versions receive support for six months after release.