Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add content-id info for email attachments #801

Merged
merged 1 commit into from
Mar 21, 2025
Merged
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
15 changes: 8 additions & 7 deletions content/integrations/email/attachments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ layout: integrations

## The attachment object

Every attachment you send to Knock in your `data` payload should have the following properties:
Every attachment you send to Knock in your `data` payload should include the following properties (those marked with an `*` are required):

| Property | Description |
| -------------- | -------------------------------------------- |
| name\* | The name of the file |
| content_type\* | A mime type for the file |
| content\* | The base64 encoded file content (up-to 10mb) |
| Property | Description |
| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name`\* | The name of the file |
| `content_type`\* | A mime type for the file |
| `content`\* | The base64 encoded file content (up to 10mb) |
| `content_id` | An optional unique `Content-ID` for the attachment, which will automatically set the attachment as `inline`. Currently only supported for [SendGrid](/integrations/email/sendgrid) and [Postmark](/integrations/email/postmark). |

```js title="An example attachment object"
{
Expand All @@ -29,7 +30,7 @@ Every attachment you send to Knock in your `data` payload should have the follow
}
```

**Note**: each attachment object must be less than 10mb but check with your email provider to see if they set a lower limit.
**Note**: each attachment object must be less than 10mb, but you should confirm whether your email provider has a lower limit.

## Sending attachments in your trigger call

Expand Down
Loading