Skip to navigation

Upload Files

View as Markdown

Upload Files

Uploads one or more files to a specific folder.

Method: POST
URL: {{base_url}}/files


Authentication

This endpoint requires authentication.

  • Recommended: Bearer token in the Authorization header:

    Authorization: Bearer {{access_token}}

Notes:

  • If your collection/folder already sets auth, this request can inherit auth.

  • Ensure {{access_token}} is a valid, non-expired token.


Required variables

Set these variables at the environment or collection level:

VariableRequiredDescription
base_urlYesBase API URL (e.g. https://busness.me-mate.net/partners/wp-gallery/manage)
access_tokenYesAccess token used to authorize the request
folder_idYesTarget folder ID to upload into

Body (multipart/form-data)

Send as form-data (multipart/form-data).

FieldTypeRequiredDescription
files[]fileYesOne or more files to upload. Use the same key (files[]) for each file.
folder_idtextYesFolder identifier. Usually set as {{folder_id}}.

Multiple files

To upload multiple files, add multiple rows with the same key files[] (each row is of type File) and choose a file for each.


Sample request

curl --request POST "{{base_url}}/files" \
--header "Authorization: Bearer {{access_token}}" \
--form "folder_id={{folder_id}}" \
--form "files[]=@/path/to/file1.png" \
--form "files[]=@/path/to/file2.jpg"

Sample success response (shape)

A successful upload typically returns HTTP 201 Created and a JSON response.

Example shape:

{
"status": "Created",
"id": "<upload_or_resource_id>",
"name": "Upload Files"
}

Common errors

  • 400 Bad Request

    • Missing folder_id

    • No files[] provided

    • Invalid multipart/form-data formatting

  • 401 Unauthorized / 403 Forbidden

    • Missing/invalid Authorization header

    • Expired {{access_token}}

  • 413 Payload Too Large

    • Uploaded file(s) exceed server limits
  • 415 Unsupported Media Type

    • Request not sent as multipart/form-data

Notes: uploading files in Postman

  • In Body → form-data:

    • Set files[] row Type to File and select a file from your computer.

    • Keep folder_id as Text (e.g. {{folder_id}}).

  • Do not manually set the Content-Type: multipart/form-data header; Postman will set it (including the boundary) automatically.

  • If you run this in a Runner/Monitor, ensure the executing context has access to the referenced files (file selection is local to the client session on web/desktop).

Request

This endpoint expects a multipart form containing a file.
files[]fileRequired
folder_idstringRequired

Response

Created
datalist of objects
messagestring
successboolean