Skip to content

feat(inboxes): accept path attachments on drafts - #141

Merged
dielduarte merged 1 commit into
mainfrom
feature/dev-2418-update-openapi-spec-resend-openapi
Oct 30, 2026
Merged

dielduarte merged 1 commit into
mainfrom
feature/dev-2418-update-openapi-spec-resend-openapi

Conversation

@dielduarte

Copy link
Copy Markdown
Contributor

POST /inboxes/{inbox_id}/drafts and PATCH /inboxes/{inbox_id}/drafts/{draft_id} now accept path attachments, like POST /emails. They used to return a 422. API change: resend/resend-monorepo#13475 (live in prod).

Changes

InboxDraftAttachmentInput:

  • Only filename is required now. content is required without path, and path is required without content.
  • New path property.
  • content_type is required with content. With path, it defaults to the downloaded file's content type.

The create/update attachments descriptions and the create-draft operation description now say that a path file is downloaded when the request is made (not when the draft is sent). They also give the 422 cases:

  • a path that doesn't start with http/https, or can't be downloaded
  • downloads that take more than 20 seconds together
  • a total over 25 MB, downloaded files included

Verification

  • yq eval . resend.yaml parses. redocly lint gives 184 warnings and 0 errors, the same as main.
  • Each rule checked live against api.resend.com:
    • path + filename → 201, and the content type comes from the download
    • path without filename → 422
    • content without content_type → 422
    • ftp:// path → 422
    • PATCH with path → 200
    • content + path → content wins

Linear: DEV-2418

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.

2 participants