Skip to content
Coritan Docs

Client API: Email preferences

Every Client API operation tagged Email preferences.

View as Markdown

Base URL: https://api.coritan.com/api/v1. Paths below are complete.

To try these requests in the browser, open the interactive Client API reference.

Method Path Summary
GET /api/v1/email/unsubscribe What an email's unsubscribe link will turn off
POST /api/v1/email/unsubscribe Turn off the kind of email the token names, for its account only

What an email's unsubscribe link will turn off

Section titled What an email's unsubscribe link will turn off

GET /api/v1/email/unsubscribe

What an email's unsubscribe link will turn off. Changes nothing.

Answers a page with an Unsubscribe button that posts back to this address, or, when the request asks for JSON, {"category", "label", "subscribed", "email"}: the kind of email the token names, how the email settings label it, whether the account still gets it, and the address, masked. 400 when the token is not one we signed, 404 when its account is gone.

Name In Type Required Description
token query string no The signed token from the email's unsubscribe link. It names one account and one kind of email.
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Turn off the kind of email the token names, for its account only

Section titled Turn off the kind of email the token names, for its account only

POST /api/v1/email/unsubscribe

Turn off the kind of email the token names, for its account only.

The one-click unsubscribe of RFC 8058: a mail app posts List-Unsubscribe=One-Click to the address in the email's List-Unsubscribe header, and the token in its query string is all this route reads. Security and billing email cannot be turned off, and no token names them. Answers {"ok": true, "category", "label", "changed"}, where changed is false when the kind was already off, or a page when the request asks for HTML. 400 when the token is not one we signed, 404 when its account is gone.

Name In Type Required Description
token query string no The signed token from the email's unsubscribe link. It names one account and one kind of email.
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.