Mailer Unsubscribe Endpoint

Send emails to users from your workspace.

URL

Requires Auth

HTTP Method

/api/v1/mailer.unsubscribe

yes

POST

Headers

ArgumentExampleRequiredDescription

X-User-Id

myuser-name

Required

The authenticated user ID.

X-Auth-Token

myauth-token

Required

Auth token.

Payload Parameter

ArgumentExampleRequiredDescription

_id

c6Lsa9SFVFxJLR56H

Required

The user id of the user that created the mailer

createdAt

1692284808957

Required

The time the mailer was created

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.

{
    "status": "error",
    "message": "You must be logged in to do this."
}

Change Log

Version

Description

5.4.0

Added

Last updated

Rocket.Chat versions receive support for six months after release.