Skip to content
This repository has been archived by the owner on Jun 27, 2024. It is now read-only.

Latest commit

 

History

History
70 lines (51 loc) · 2.17 KB

mailer-unsubscribe-endpoint.md

File metadata and controls

70 lines (51 loc) · 2.17 KB

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-Idmyuser-nameRequiredThe authenticated user ID.
X-Auth-Tokenmyauth-tokenRequiredAuth token.

Payload Parameter

ArgumentExampleRequiredDescription
_idc6Lsa9SFVFxJLR56HRequiredThe user id of the user that created the mailer
createdAt1692284808957RequiredThe 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.

{% tabs %} {% tab title=" Authorization" %}

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

{% endtab %} {% endtabs %}

Change Log

Version Description
5.4.0 Added