Skip to main content
POST
/
v1
/
media
Upload media (multipart)
curl --request POST \
  --url https://api.letmepost.dev/v1/media \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form file='@example-file'
{
  "id": "med_01HY6X4AWBJM2K9F2PTQMR",
  "url": "https://media.letmepost.dev/prod/orgs/.../med_01HY6X4AWBJM2K9F2PTQMR.jpg",
  "contentType": "image/jpeg",
  "sizeBytes": 1,
  "sha256": "<string>",
  "createdAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Mint an API key in the dashboard. See https://letmepost.dev/docs/authentication/.

Query Parameters

profileId
string<uuid>

Place the upload under this profile. Org-wide keys only — profile-scoped keys must omit this and inherit their own profile.

Body

multipart/form-data
file
file
required

The single file part. Multiple parts or any name other than file are rejected.

Response

Upload succeeded.

id
string
required
Pattern: ^med_[0-9A-Za-z]{22}$
Example:

"med_01HY6X4AWBJM2K9F2PTQMR"

url
string<uri>
required
Example:

"https://media.letmepost.dev/prod/orgs/.../med_01HY6X4AWBJM2K9F2PTQMR.jpg"

contentType
string
required
Example:

"image/jpeg"

sizeBytes
integer
required
Required range: x >= 0
sha256
string
required
Pattern: ^[0-9a-f]{64}$
createdAt
string<date-time>
required