---
title: "Upload media"
method: POST
path: "/media"
tags: ["Media"]
---

# Upload media

`POST /media`

This operation uploads media such a images, videos, and files to Spruce for use in messaging. Uploading a file will return a media ID that can be used to reference the file in other operations. Callers of this API should record the resulting media ID for future use. A media ID can be used in the `attachmentID` field of the [conversation message post attachment](/reference/postmessagefromendpoint). Media IDs can be used multiple times.
The `Content-Type` and `Content-Disposition` headers on the multipart `media` field can use used to provide additional metadata about the media. This metadata can impact how the media is displayed and downloaded from the application.

**Example Headers**
* `Content-Disposition: form-data; name="media"; filename="image.png"`
* `Content-Type: image/png`

## Response `200`

An array of messages that are scheduled for the organization

- Media
  - `id` string, required — Spruce's media message ID
  - `object` string, required — String representing the object's type

## Other responses

- `400` — bad request
- `500` — unexpected error

---

[API](https://skmtc.net/sprucehealth/apis/spruce-health-api.md) · [All operations](https://skmtc.net/sprucehealth/apis/spruce-health-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sprucehealth/spruce-health-api/revisions/988e298cd9fd/schema)
