Skip to content

Receiving and inboxes (0.9.0) - #4

Open
heliocosta-dev wants to merge 3 commits into
mainfrom
feat/inboxes
Open

heliocosta-dev wants to merge 3 commits into
mainfrom
feat/inboxes

Conversation

@heliocosta-dev

Copy link
Copy Markdown
Member

Adds receiving and inboxes to the SDK, matching the API from MillionSend/millionsend v0.8.0 (receiving) and MillionSend/millionsend#112 (inboxes). The SDK version becomes 0.9.0.

  • Received mail: list (with the wait long-poll and the inbox, recipient, sender, subject, unread and quarantine filters), get, reply, forward, delete and attachments.
  • Inboxes: create, list, get, update and delete, plus safety settings, the latest verification code, quarantine and release, labels, threads with their emails, and drafts with send and reject.
  • Send results: replies, forwards and draft sends return the sent email, or on 202 the draft waiting for approval, kept apart from a sent result.
  • Related resources:
    • webhooks take inbox_ids, and the event list has email.received and the 14 inbox.* events;
    • API keys take inbox_id;
    • domains take receiving_catch_all.
  • Ids: empty, . and .. ids are refused before any request is made.

The SDK was checked against the API's OpenAPI document and route code on the product branch: paths, query and body field names, nullability, and the 202 branch. This SDK's tests and linters pass locally.

Merge and release once the product release with inboxes is deployed.

🤖 Generated with Claude Code

heliocosta-dev and others added 3 commits October 12, 2026 03:24
- Emails.Receiving: list (wait long-poll and the inbox, address, subject,
  unread and quarantine filters), get, reply, forward, remove, and
  Attachments.list / Attachments.get. resend-python's call shapes work.
- Inboxes: create, list, get, update, remove, plus Safety, Codes.latest,
  Quarantine, Labels, Threads (with Threads.Emails) and Drafts (with send
  and reject).
- Replies, forwards and Drafts.send return {"kind": "sent", "email": ...}
  or, on an HTTP 202, {"kind": "draft", "draft": ...}.
- Query booleans go out as "true"/"false" and lists comma-separated; a
  request with a wait query gets a timeout that outlasts it.
- New error subclasses for inbox_send_policy, inbox_send_cap_reached,
  approval_required, email_quarantined, email_blocked and too_many_waits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
URL normalization resolves an empty, "." or ".." path segment away, so an
id such as ".." turned DELETE /inboxes/{id}/labels/.. into
DELETE /inboxes/{id}/. The request dispatch now checks every path once,
and such a call raises ValueError without sending anything.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Inboxes.Threads.Emails.list and .get take include_quarantined, which the
  API accepts on both (owner views of held mail); before, get could not send
  it at all and list only through the options dict.
- README: the long-poll's held items carry quarantine_reason; the codes
  example filters on example.com.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant