Skip to content

POST Media

POST /brands/{brandId}/media

Uploads a media file (image or video) and returns an id you can reference when creating a post.

ParameterTypeDescription
brandIdintegerID from the brands list.

Request body:

multipart/form-data with a single field:

FieldTypeDescription
mediafileThe image or video to upload.
Terminal window
curl -X POST https://nuelink.com/api/public/v1/brands/13493/media
-H "Authorization: Bearer YOUR_API_KEY"
-F "media=@./photo.jpg"

Response: 201 Created

{
"status": "success",
"data": {
"id": "bWVkaWEvcmo2dzRhSVY4YUJOMWJoU3c4U2t6VEJOenVXcjRoTmsuanBn",
"type": "image/jpeg",
"size": 4587311
}
}
FieldTypeDescription
idstringOpaque media ID. Pass this as media[].id when posting.
typestringMIME type detected by the server.
sizeintegerFile size in bytes.
TypeAccepted formatsMax size
ImagePNG, JPG / JPEG100 MB
VideoMP4, MOV100 MB
DocumentPDF (used for LinkedIn document posts)100 MB

Nuelink accepts a single file per upload and returns a media id you can reference in POST /posts.

ℹ️ Platform-specific constraints still apply. Even within the 100 MB ceiling, each social platform enforces its own limits: Instagram caps video length, TikTok requires certain aspect ratios, and so on. Media that passes Nuelink’s upload check may still be rejected at publish time by the target platform. Check each platform’s publishing guidelines when targeting a specific format.

Error example: no file sent:
Response: 422 Unprocessable Entity

{
"status": "error",
"message": "The given data was invalid.",
"errors": {
"media": [
"The media field is required."
]
}
}

Error example: file too large:
Response: 422 Unprocessable Entity

{
"status": "error",
"message": "The given data was invalid.",
"errors": {
"media": [
"The media file may not be greater than 100 megabytes."
]
}
}

Error example: unsupported format:
Response: 422 Unprocessable Entity:

{
"status": "error",
"message": "The given data was invalid.",
"errors": {
"media": [
"The media must be a file of type: png, jpg, jpeg, mp4, mov, pdf."
]
}
}

Supported uploads (max 100 MB each):

  • Images: png, jpg, jpeg
  • Videos: mp4, mov
  • Documents: pdf

Example validation errors:

{
"status": "error",
"message": "The given data was invalid.",
"errors": {
"media": ["The media field is required."]
}
}
{
"status": "error",
"message": "The given data was invalid.",
"errors": {
"media": ["The media file may not be greater than 100 megabytes."]
}
}
{
"status": "error",
"message": "The given data was invalid.",
"errors": {
"media": ["The media must be a file of type: png, jpg, jpeg, mp4, mov, pdf."]
}
}