# Sending inline attachments using multipart/form-data header

**URL:** <https://forums.nylas.com/t/sending-inline-attachments-using-multipart-form-data-header/512>\
**Category:** Question and Answers\
**Tags:** email-api\
**Created:** [October 15, 2024, 11:25am UTC](https://forums.nylas.com/t/sending-inline-attachments-using-multipart-form-data-header/512 "2024-10-15T11:25:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hamzahyounus](https://avatars.discourse-cdn.com/v4/letter/h/f08c70/32.png) [@hamzahyounus](https://forums.nylas.com/u/hamzahyounus)\
**Post date:** [October 15, 2024, 11:25am UTC](https://forums.nylas.com/t/sending-inline-attachments-using-multipart-form-data-header/512/1 "2024-10-15T11:25:45Z")

</div>

I am using the content type “multipart/form-data” when sending emails. How to send inline attachments in such case?  
Please let me know if you need more information to have a better insight.

---

<div class="post-metadata">

**Author:** ![spang](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.nylas.com/spang/32/218_2.png) [@spang](https://forums.nylas.com/u/spang)\
**Post date:** [October 16, 2024, 11:10pm UTC](https://forums.nylas.com/t/sending-inline-attachments-using-multipart-form-data-header/512/2 "2024-10-16T23:10:06Z")

</div>

hi @hamzahyounus

I believe the info in the “Sending Inline attachments using form data” section of this help article will help you:

> **[Sending attachments in API V3 larger than 3MB via multipart](https://support.nylas.com/hc/en-us/articles/19492515408669-Sending-attachments-in-API-V3-larger-than-3MB-via-multipart)**
>
> As a developer it may be easier to send all your emails as multipart/form-data thus allowing for maximum attachment size of 25MB, note the request\_time is longer than sending by JSON.
> In order to s...

Here’s the mentioned cURL snippet from that page:

```auto
curl --request POST \
--url https://api.us.nylas.com/v3/grants/{{grant_id}}/messages/send \
--header 'Authorization: Bearer {{NYLAS_API_KEY}}' \
--header 'Content-Type: multipart/form-data' \
--form 'message={
"body": "Hey there! This is an email testing out inline attachments using the Nylas Email API. Here is what their mascot looks like -- I think she is so cute! <br> <img src=\"cid:xyzpdqnyla\"/> <br> They also have a cool logo: <img src=\"cid:xyzpdqlogo\"/>.",
"subject": "Testing out inline attachments",
"to": [{
"email": "test@outlook.com",
"name": "Adrian Traeger"
}]
}' \
--form xyzpdqnyla=@/Users/TestPath/Desktop/nyla.png \
--form xyzpdqlogo=@/Users/TestPath/Desktop/logo.png

```

Basically, you need to embed a cid reference in the message body, and then pass your file as the form data for the same alphanumeric string as the cid.

Does that solve your problem, or are you having trouble further down the line with a specific language or scenario?
