Skip to Content
Bryfo Docsv0.2.1
交互式 OpenAPI

Mail

Connected mailboxes, unified threads, send/undo/schedule, Screener, The Feed, and RFC 8058 unsubscribe.

GET
/api/v1/accounts

Authorization

SessionCookie
cookiebryfo_session<token>

HttpOnly, SameSite=Lax session cookie (7-day sliding TTL, 30-day cap).

Response Body

Connected mailbox list

Example Request
curl -X GET 'https://mail.example.com/api/v1/accounts' \  --cookie 'bryfo_session='
Example Response200
Empty
POST
/api/v1/accounts

Authorization

SessionCookie
cookiebryfo_session<token>

HttpOnly, SameSite=Lax session cookie (7-day sliding TTL, 30-day cap).

Request Body

application/json
  1. body
email*string
Formatemail
display_name?string
preset_id?string
imap_host*string
imap_port*integer
imap_security?string
Value in"tls""starttls"
smtp_host*string
smtp_port*integer
smtp_security?string
Value in"tls""starttls"
server_saves_sent?boolean
password*string

Response Body

Mailbox connected and initial sync queued

Example Request
curl -X POST 'https://mail.example.com/api/v1/accounts' \  --cookie 'bryfo_session=' \  -H 'Content-Type: application/json' \  -d '{  "email": "user@example.com",  "imap_host": "string",  "imap_port": 0,  "smtp_host": "string",  "smtp_port": 0,  "password": "string"}'
Example Response201
Empty
GET
/api/v1/threads

Authorization

SessionCookie
cookiebryfo_session<token>

HttpOnly, SameSite=Lax session cookie (7-day sliding TTL, 30-day cap).

Query Parameters

folder?string
Value in"inbox""awaiting""screener""snoozed""starred""sent""drafts""archive""spam""trash""all"
account_id?string
q?string

Hybrid lexical + semantic query with operators (from:, to:, subject:, has:attachment, is:unread, after:, before:)

limit?integer
Default50
offset?integer
Default0

Response Body

Paginated thread list

Example Request
curl -X GET 'https://mail.example.com/api/v1/threads' \  --cookie 'bryfo_session='
Example Response200
Empty
POST
/api/v1/messages/send

Authorization

SessionCookie
cookiebryfo_session<token>

HttpOnly, SameSite=Lax session cookie (7-day sliding TTL, 30-day cap).

Request Body

application/json
  1. body
account_id*string
Formatuuid
draft_id?string
Formatuuid
to*array<string>
cc?array<string>
bcc?array<string>
subject*string
body_text?string
body_html?string
undo_seconds?integer
Range0 <= value <= 60
Default8
scheduled_at?string
Formatdate-time
followup_at?string
Formatdate-time

Response Body

Message sent, queued in undo window, or scheduled

Example Request
curl -X POST 'https://mail.example.com/api/v1/messages/send' \  --cookie 'bryfo_session=' \  -H 'Content-Type: application/json' \  -d '{  "account_id": "449e7a5c-69d3-4b8a-aaaf-5c9b713ebc65",  "to": [    "string"  ],  "subject": "string"}'
Example Response200
Empty
POST
/api/v1/screener/decide

Authorization

SessionCookie
cookiebryfo_session<token>

HttpOnly, SameSite=Lax session cookie (7-day sliding TTL, 30-day cap).

Request Body

application/json
  1. body
pattern*string
decision*string
Value in"allow""block"

Response Body

Rule persisted and matching pending threads transitioned

Example Request
curl -X POST 'https://mail.example.com/api/v1/screener/decide' \  --cookie 'bryfo_session=' \  -H 'Content-Type: application/json' \  -d '{  "pattern": "string",  "decision": "allow"}'
Example Response200
Empty
GET
/api/v1/feed

Authorization

SessionCookie
cookiebryfo_session<token>

HttpOnly, SameSite=Lax session cookie (7-day sliding TTL, 30-day cap).

Query Parameters

unread_only?boolean
limit?integer
Rangevalue <= 50
Default20

Response Body

Newsletter feed items

Example Request
curl -X GET 'https://mail.example.com/api/v1/feed' \  --cookie 'bryfo_session='
Example Response200
Empty
POST
/api/v1/subscriptions/bulk-unsubscribe

Authorization

SessionCookie
cookiebryfo_session<token>

HttpOnly, SameSite=Lax session cookie (7-day sliding TTL, 30-day cap).

Request Body

application/json
  1. body
senders*array<string>
Itemsitems <= 20
archive_existing?boolean

Response Body

Per-sender RFC 8058 execution summary

Example Request
curl -X POST 'https://mail.example.com/api/v1/subscriptions/bulk-unsubscribe' \  --cookie 'bryfo_session=' \  -H 'Content-Type: application/json' \  -d '{  "senders": [    "string"  ]}'
Example Response200
Empty