Skip to content

Upload an image

POST
/projects/{id}/media
curl --request POST \
--url https://api.warmup.social/projects/00000000-0000-0000-0000-000000000000/media \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file=@file

An image up to 15 MB in the file field. The server converts it to JPEG and returns an id — pass it as mediaId when creating a publication.

Counts towards the publishing rate limit (30 requests per minute per user by default).

id
required
string format: uuid

Example

00000000-0000-0000-0000-000000000000

Project UUID.

Media typemultipart/form-data
object
file
required

Image (image/*), up to 15 MB.

string format: binary

Image saved.

Media typeapplication/json
object
id
required
string format: uuid
url
required
string format: uri
width
required
integer
height
required
integer

Example

{
"width": 1080,
"height": 1350
}

No file (file_required), not an image (unsupported_media_type), unreadable image (invalid_image), invalid project id or the file is larger than 15 MB.

Media typeapplication/json

Error with a machine-readable code. Body validation errors come as formErrors / fieldErrors; business errors carry a code.

object
code
string
platform
string
Allowed values: facebook instagram threads
formErrors
Array<string>
fieldErrors
object
key
additional properties
Array<string>

Example

{
"code": "connection_missing",
"platform": "facebook",
"fieldErrors": {
"mediaId": [
"media_required"
]
}
}

The Bearer token is missing or invalid.

Media typeapplication/json
object
statusCode
required
integer
message
required
One of:
string
error
string
key
additional properties
any

Example

{
"statusCode": 400,
"message": "Invalid request",
"error": "Bad Request"
}

The requested resource was not found.

Media typeapplication/json
object
statusCode
required
integer
message
required
One of:
string
error
string
key
additional properties
any

Example

{
"statusCode": 400,
"message": "Invalid request",
"error": "Bad Request"
}

The publishing rate limit was exceeded.

Media typeapplication/json
object
statusCode
required
integer
message
required
One of:
string
error
string
key
additional properties
any

Example

{
"statusCode": 400,
"message": "Invalid request",
"error": "Bad Request"
}