Browse the docs

API reference

Email

Email from the server: through its own mail server, else collectoh.com while claimed. Invitations, reset links, alerts and the weekly digest. docs/11 §12.

Paths are relative to /api/v1 on your server.

GET/mail#

Read how email leaves, and its settings

via is how an email would go now: own (the mail server below), collectoh (no mail server of its own, but claimed by a collectoh.com account) or none. The password is never sent back, only whether one is kept.

Authorisation
Bearer token or API key · Session cookie
  • 200Success. application/json · object
  • 401UNAUTHENTICATED: no session, or the access token expired. application/json · ErrorEnvelope
  • 403FORBIDDEN: the account lacks settings:manage, or the library, label, age or schedule scope refuses it. application/json · ErrorEnvelope
PUT/mail#

Change the email settings

Only what the body names changes. smtp null forgets the mail server. A password replaces the kept one (sealed at rest); null forgets it. The kept one goes only to the host, port, security and username it was saved with: a change to any of them without a new password is refused. A username needs a password, and security: none takes neither.

Authorisation
Bearer token or API key · Session cookie
Body
application/json · object
  • 200Success. application/json · object
  • 400VALIDATION_FAILED: the request did not match the schema; details.issues lists what. VALIDATION_FAILED: a setting is not valid, or a password is missing application/json · ErrorEnvelope
  • 401UNAUTHENTICATED: no session, or the access token expired. application/json · ErrorEnvelope
  • 403FORBIDDEN: the account lacks settings:manage, or the library, label, age or schedule scope refuses it. application/json · ErrorEnvelope
POST/mail/digest/preview#

Send this week’s digest to yourself

The weekly digest as the admin who asks would get it — what they may see, added in the last seven days — sent to them now, whether they asked for it or not.

Authorisation
Bearer token or API key · Session cookie
  • 200Success. application/json · object
  • 401UNAUTHENTICATED: no session, or the access token expired. application/json · ErrorEnvelope
  • 403FORBIDDEN: the account lacks settings:manage, or the library, label, age or schedule scope refuses it. application/json · ErrorEnvelope
  • 409CONFLICT: the account has no email, nothing is new, or the server can’t send application/json · ErrorEnvelope
GET/mail/me#

Read your own email and digest

Authorisation
Bearer token or API key · Session cookie
  • 200Success. application/json · object
  • 401UNAUTHENTICATED: no session, or the access token expired. application/json · ErrorEnvelope
  • 403FORBIDDEN: the account may not do this. application/json · ErrorEnvelope
PUT/mail/me#

Ask for the weekly digest, or stop it

Authorisation
Bearer token or API key · Session cookie
Body
application/json · object
  • 200Success. application/json · object
  • 400VALIDATION_FAILED: the request did not match the schema; details.issues lists what. application/json · ErrorEnvelope
  • 401UNAUTHENTICATED: no session, or the access token expired. application/json · ErrorEnvelope
  • 403FORBIDDEN: the account may not do this. application/json · ErrorEnvelope
  • 409CONFLICT: the account has no email, or the server sends no digest application/json · ErrorEnvelope
POST/mail/test#

Send a test email

To to, or to the admin’s own email. Says which way it went.

Authorisation
Bearer token or API key · Session cookie
Body
application/json · object
  • 200Success. application/json · object
  • 400VALIDATION_FAILED: the request did not match the schema; details.issues lists what. application/json · ErrorEnvelope
  • 401UNAUTHENTICATED: no session, or the access token expired. application/json · ErrorEnvelope
  • 403FORBIDDEN: the account lacks settings:manage, or the library, label, age or schedule scope refuses it. application/json · ErrorEnvelope
  • 409CONFLICT: the server has no way to send email application/json · ErrorEnvelope
  • 502PROVIDER_UNAVAILABLE: the mail server, or collectoh.com, refused it application/json · ErrorEnvelope
POST/mail/unsubscribe#

Stop the weekly digest from its link

The token at the foot of every digest: stops it for that account, without signing in.

Authorisation
None
Body
application/json · object
  • 204Done; no body.
  • 400VALIDATION_FAILED: the request did not match the schema; details.issues lists what. application/json · ErrorEnvelope