---
title: "Create Macro Attachment"
method: POST
path: "/api/v2/macros/{macro_id}/attachments"
tags: ["Macros"]
---

# Create Macro Attachment

`POST /api/v2/macros/{macro_id}/attachments`

Allows an attachment to be uploaded and associated with a macro at the same time.

**Note:** A macro can be associated with up to five attachments.

#### Allowed For

* Agents

## Response `201`

Success Response

- MacroAttachmentResponse
  - `macro_attachment` MacroAttachmentObject
    - `content_type` string — The content type of the image. Example value: "image/png"
    - `content_url` string — A full URL where the attachment image file can be downloaded
    - `created_at` string, date-time — The time when this attachment was created
    - `filename` string — The name of the image file
    - `id` integer — Automatically assigned when created
    - `size` integer — The size of the image file in bytes

---

[API](https://skmtc.dev/botbrains-io/apis/support-api.md) · [All operations](https://skmtc.dev/botbrains-io/apis/support-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/botbrains-io/support-api/revisions/d53eac07ba68/schema)
