---
title: "Upload media for an MMS message"
method: POST
path: "/sms/files"
tags: ["Sms"]
---

# Upload media for an MMS message

`POST /sms/files`

## Request

- Base URL: `https://api.leadping.ai`
- URL: `https://api.leadping.ai/sms/files`
- Auth: HTTP bearer

Uploads and validates one media attachment, returning the metadata needed to include the asset in a subsequent Leadping MMS send.

## Request body `multipart/form-data`

- object
  - `file` string, binary, required: Binary file content to upload.

## Response `200`

The uploaded media attachment metadata.

- MessageMediaAttachment: Media attached to an SMS/MMS conversation event.
  - `fileId` string, nullable: The durable Media record containing this attachment's scanned bytes.
  - `url` string, uri: URL from which the media attachment can be retrieved.
  - `contentType` string, nullable: MIME content type of the media attachment.
  - `size` integer, nullable: Size of the media attachment in bytes.
  - `sha256` string, nullable: SHA-256 digest of the media content, when available.
  - `fileName` string, nullable: Original file name of the media attachment, when available.

## Other responses

- `400`: The request contains invalid values or fails validation.
- `401`: Authentication credentials are missing or invalid.
- `403`: The caller does not have permission to perform this operation.
- `404`: The requested resource or required account context was not found.
- `415`: The request content type is not supported by this endpoint.
- `429`: The client or account rate limit was exceeded. Retry after the interval in the Retry-After header.
- `500`: An unexpected error prevented the server from completing the request.

## Changes

- **2026-11-11** `81aed8c9afb7`: 3 info
  - added the non-success response with the status `404`
  - added the non-success response with the status `415`
  - added the non-success response with the status `500`

[Operation history](https://skmtc.dev/leadping/apis/leadping-api/changes/sms/files/post.md)

---

[API](https://skmtc.dev/leadping/apis/leadping-api.md) - [All operations](https://skmtc.dev/leadping/apis/leadping-api/llms.txt) - [OpenAPI document](https://skmtc.dev/leadping/apis/leadping-api/revisions/bf1852acaf45?raw)
