Attachments API
Reusable attachments: upload once, reference by id in any number of emails.
4 operations. Guide: Send email with the API. Requests and responses are JSON with snake_case fields; authenticate with Authorization: Bearer <api key>. The examples assume a client built as in SDKs and the command line.
Store a reusable attachment (inline up to 4 MB, or from an upload)
POST /v1/attachments
Request body
object
Response
201 Created: object.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | A UUID. |
object | "attachment" | yes | |
filename | string | yes | |
content_type | string | yes | |
size | integer | yes | |
sha256 | string | yes | |
download_url | string | no | |
expires_at | string (date-time) | no | An ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z. |
created_at | string (date-time) | yes | An ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z. |
last_used_at | string (date-time) or null | yes | An ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z. |
Errors: 400, 401, 403, 404, 409, 422, 429, 500, with the error body.
Examples
curl -X POST https://api.minket.com/v1/attachments \
-H "Authorization: Bearer $MINKET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"filename":"receipt.pdf","content":"aGVsbG8="}'const result = await minket.attachments.create({
filename: "receipt.pdf",
content: "aGVsbG8="
});minket api createAttachment --body '{"filename":"receipt.pdf","content":"aGVsbG8="}'from minket.api.attachments import create_attachment
from minket.models import CreateAttachmentBodyType0
result = create_attachment.sync(client=client, body=CreateAttachmentBodyType0.from_dict({"filename":"receipt.pdf","content":"aGVsbG8="}))var body minket.CreateAttachmentJSONRequestBody
res, err := client.CreateAttachmentWithResponse(ctx, body)List reusable attachments
GET /v1/attachments
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
limit | query | integer | no | Default 20. |
after | query | string | no | A UUID. |
before | query | string | no | A UUID. |
Response
200 Success: object.
| Field | Type | Required | Description |
|---|---|---|---|
object | "list" | yes | |
data | array of object | yes | |
data[]. | string | yes | A UUID. |
data[]. | "attachment" | yes | |
data[]. | string | yes | |
data[]. | string | yes | |
data[]. | integer | yes | |
data[]. | string | yes | |
data[]. | string | no | |
data[]. | string (date-time) | no | An ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z. |
data[]. | string (date-time) | yes | An ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z. |
data[]. | string (date-time) or null | yes | An ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z. |
has_more | boolean | yes |
Errors: 400, 401, 403, 404, 409, 422, 429, 500, with the error body.
Examples
curl https://api.minket.com/v1/attachments \
-H "Authorization: Bearer $MINKET_API_KEY"const result = await minket.attachments.list();minket api listAttachmentsfrom minket.api.attachments import list_attachments
result = list_attachments.sync(client=client)res, err := client.ListAttachmentsWithResponse(ctx, &minket.ListAttachmentsParams{})Get a reusable attachment with a download URL
GET /v1/attachments/{id}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | A UUID. |
Response
200 Success: object.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | A UUID. |
object | "attachment" | yes | |
filename | string | yes | |
content_type | string | yes | |
size | integer | yes | |
sha256 | string | yes | |
download_url | string | no | |
expires_at | string (date-time) | no | An ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z. |
created_at | string (date-time) | yes | An ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z. |
last_used_at | string (date-time) or null | yes | An ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z. |
Errors: 400, 401, 403, 404, 409, 422, 429, 500, with the error body.
Examples
curl https://api.minket.com/v1/attachments/019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b \
-H "Authorization: Bearer $MINKET_API_KEY"const result = await minket.attachments.get("019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b");minket api getAttachment 019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5bfrom minket.api.attachments import get_attachment
result = get_attachment.sync("019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b", client=client)res, err := client.GetAttachmentWithResponse(ctx, "019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b")Delete a reusable attachment
DELETE /v1/attachments/{id}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | A UUID. |
Response
200 Success: object.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | A UUID. |
object | "attachment" | yes |
Errors: 400, 401, 403, 404, 409, 422, 429, 500, with the error body.
Examples
curl -X DELETE https://api.minket.com/v1/attachments/019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b \
-H "Authorization: Bearer $MINKET_API_KEY"const result = await minket.attachments.delete("019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b");minket api deleteAttachment 019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5bfrom minket.api.attachments import delete_attachment
result = delete_attachment.sync("019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b", client=client)res, err := client.DeleteAttachmentWithResponse(ctx, "019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b")