---
title: "Attach files to a resource"
method: POST
path: "/attachments"
tags: ["Attachments"]
---

# Attach files to a resource

`POST /attachments`

## Request

- Base URL: `https://api.presscart.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.presscart.com/attachments`
- Auth: HTTP bearer

Create attachments linking one or more files to a resource (campaign, article, profile, etc.).

## Request body

- object
  - `file_ids` string[], required: One or more file IDs to attach
  - `resource_type` string, required: Resource type (e.g. campaign_questionnaire, article_photo, article_document, article_brief_document, article_document_staged, article_brief_document_staged, profile_logo, profile_asset, product_image, product_logo, product_screenshot, outlet_logo, content_type_image)
  - `resource_id` string, uuid, required: ID of the resource to attach to

## Response `201`

Files attached successfully

- object
  - `records` FileAttachment[], required
    - `id` string, uuid, required
    - `file_id` string, uuid, required
    - `resource_type` string, required
    - `resource_id` string, uuid, required
    - `created_by` string, uuid, nullable, required
    - `created_at` union, required
      - string, nullable
      - string
      - unknown

---

[API](https://skmtc.dev/presscart/apis/presscart-prod-api.md) · [All operations](https://skmtc.dev/presscart/apis/presscart-prod-api/llms.txt) · [OpenAPI document](https://skmtc.dev/presscart/apis/presscart-prod-api/revisions/2154581d845e?raw)
