Skip to navigation

Bulk Move Files

View as Markdown

Bulk Move Files

Moves multiple files to a specified folder in a single request.

Method: POST
URL: {{base_url}}/files/bulk-move


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.

Headers

HeaderValue
Content-Typeapplication/json
AuthorizationBearer {{access_token}}

Required variables

Set these variables at the environment or collection level:

VariableRequiredDescription
base_urlYesBase API URL (e.g. https://app.getgabs.com/partners/wp-gallery/manage)
access_tokenYesAccess token used to authorize the request

Body (raw JSON)

Send the request body as raw JSON.

FieldTypeRequiredDescription
file_idsarrayYesArray of file IDs to move
folder_idintegerYesDestination folder ID

Example body:

{
"file_ids": [
37
],
"folder_id": 10
}

Notes:

  • You can include one or multiple file IDs in the file_ids array.
  • All specified files will be moved to the provided folder.
  • The destination folder_id must exist and be accessible to the authenticated user.

Sample request

curl --request POST "{{base_url}}/files/bulk-move" \
--header "Authorization: Bearer {{access_token}}" \
--header "Content-Type: application/json" \
--data '{
"file_ids": [37],
"folder_id": 10
}'

Sample success response

A successful request typically returns HTTP 200 OK.

{
"success": true,
"message": "1 file(s) moved"
}

Common errors

  • 400 Bad Request

    • Missing file_ids
    • Missing folder_id
    • Invalid file ID format
  • 401 Unauthorized / 403 Forbidden

    • Missing/invalid Authorization header
    • Expired {{access_token}}
  • 404 Not Found

    • One or more files do not exist
    • Destination folder does not exist

Notes

  • This endpoint moves multiple files at once, reducing the need for multiple API calls.
  • File metadata and URLs remain unchanged; only the folder association is updated.
  • Useful for bulk file organization operations in gallery or file manager interfaces.

Request

This endpoint expects an object.
file_idslist of integersRequired
folder_idintegerRequired

Response

OK
messagestring
successboolean