Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions fern/definition/inboxes/messages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,22 @@ service:
display-name: Get Raw Message
Copy link

@cubic-dev-ai cubic-dev-ai bot Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: According to linked Linear issue ENG-347, getRaw should be faded/removed, but this change adds the getRaw endpoint back into the API definition.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At fern/definition/inboxes/messages.yml, line 58:

<comment>According to linked Linear issue ENG-347, `getRaw` should be faded/removed, but this change adds the `getRaw` endpoint back into the API definition.</comment>

<file context>
@@ -55,6 +55,28 @@ service:
       errors:
         - global.NotFoundError
 
+    getRaw:
+      method: GET
+      path: /{message_id}/raw
</file context>
Fix with Cubic

path-parameters:
message_id: messages.MessageId
response: file
response: messages.RawMessageResponse
errors:
- global.NotFoundError

update:
method: PATCH
path: /{message_id}
display-name: Update Message
path-parameters:
message_id: messages.MessageId
request: messages.UpdateMessageRequest
response: messages.Message
errors:
- global.ValidationError
- global.NotFoundError

send:
method: POST
path: /send
Expand Down Expand Up @@ -114,15 +126,3 @@ service:
- global.ValidationError
- global.NotFoundError
- messages.MessageRejectedError

update:
method: PATCH
path: /{message_id}
display-name: Update Message
path-parameters:
message_id: messages.MessageId
request: messages.UpdateMessageRequest
response: messages.Message
errors:
- global.ValidationError
- global.NotFoundError
16 changes: 16 additions & 0 deletions fern/definition/messages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,22 @@ types:
type: list<MessageItem>
docs: Ordered by `timestamp` descending.

RawMessageResponse:
Copy link

@cubic-dev-ai cubic-dev-ai bot Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: According to linked Linear issue ENG-347, get-raw-message should be faded/retired, but this change adds the RawMessageResponse contract that keeps raw message download behavior in the API surface.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At fern/definition/messages.yml, line 148:

<comment>According to linked Linear issue ENG-347, `get-raw-message` should be faded/retired, but this change adds the `RawMessageResponse` contract that keeps raw message download behavior in the API surface.</comment>

<file context>
@@ -145,6 +145,13 @@ types:
         type: list<MessageItem>
         docs: Ordered by `timestamp` descending.
 
+  RawMessageResponse:
+    docs: Signed URL to download the raw .eml file.
+    properties:
</file context>
Fix with Cubic

docs: Signed URL to download the raw .eml file. Uses CloudFront signing, same as attachments.
properties:
message_id:
type: MessageId
docs: ID of the message.
size:
type: MessageSize
docs: Size of the raw message in bytes.
download_url:
type: string
docs: Pre-signed CloudFront URL to download the raw message. Expires at expires_at.
expires_at:
type: datetime
docs: Time at which the download URL expires.

Addresses:
discriminated: false
union:
Expand Down
2 changes: 0 additions & 2 deletions fern/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,6 @@ redirects:
destination: /custom-domains
- source: /best-practices/email-deliverability
destination: /email-deliverability
- source: /api-reference/inboxes/messages/get-raw-message
destination: /api-reference/inboxes/messages/get-raw
- source: /webhook/agentmail
destination: /webhook-verification
- source: /get-started/quickstart
Expand Down
1 change: 1 addition & 0 deletions fern/pages/core-concepts/messages.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ Copy one of the blocks below into Cursor or Claude for complete Messages API kno
* - messages.forward(inboxId, messageId, { to, subject?, text?, html? })
* - messages.update(inboxId, messageId, { addLabels?, removeLabels? })
* - messages.getAttachment(inboxId, messageId, attachmentId)
* - messages.getRaw(inboxId, messageId) -> { message_id, size, download_url, expires_at } (CloudFront signed URL for .eml)
Copy link

@cubic-dev-ai cubic-dev-ai bot Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Use camelCase field names for the TypeScript getRaw response shape to match SDK conventions used in this doc.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At fern/pages/core-concepts/messages.mdx, line 238:

<comment>Use camelCase field names for the TypeScript `getRaw` response shape to match SDK conventions used in this doc.</comment>

<file context>
@@ -235,7 +235,7 @@ Copy one of the blocks below into Cursor or Claude for complete Messages API kno
    * - messages.update(inboxId, messageId, { addLabels?, removeLabels? })
    * - messages.getAttachment(inboxId, messageId, attachmentId)
-   * - messages.getRaw(inboxId, messageId) -> { url } (pre-signed S3 URL for .eml)
+   * - messages.getRaw(inboxId, messageId) -> { message_id, size, download_url, expires_at } (CloudFront signed URL for .eml)
    * - messages.getRaw(inboxId, messageId)
    *
</file context>
Suggested change
* - messages.getRaw(inboxId, messageId) -> { message_id, size, download_url, expires_at } (CloudFront signed URL for .eml)
* - messages.getRaw(inboxId, messageId) -> { messageId, size, downloadUrl, expiresAt } (CloudFront signed URL for .eml)
Fix with Cubic

* - messages.getRaw(inboxId, messageId)
*
* Reply content: use extractedText/extractedHtml for new content without quoted history.
Expand Down
Loading