Skip to navigation

Update File (Rename / Star)

View as Markdown

Update File (Rename / Star)

Updates file properties such as renaming the file or marking it as starred.

Method: PUT
URL: {{base_url}}/files/{{file_id}}


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://app.getgabs.com/partners/wp-gallery/manage)
access_tokenYesAccess token used to authorize the request
file_idYesID of the file to update

Path Parameters

ParameterTypeRequiredDescription
file_idintegerYesUnique identifier of the file to update

Example request URL:

{{base_url}}/files/34

Body (raw JSON)

Send the request body as raw JSON.

FieldTypeRequiredDescription
namestringNoNew name for the file
starredbooleanNoMark or unmark the file as starred

Example body:

{
"name": "renamed-photo.png",
"starred": true
}

Notes:

  • You can update either field independently.

  • If name is provided, the file will be renamed.

  • If starred is provided, the file will be starred or unstarred.


Sample request

curl --request PUT "{{base_url}}/files/{{file_id}}" \
--header "Authorization: Bearer {{access_token}}" \
--header "Content-Type: application/json" \
--data '{
"name": "renamed-photo.png",
"starred": true
}'

Sample success response

A successful update typically returns HTTP 200 OK.

{
"success": true,
"message": "File updated successfully",
"data": {
"id": 34,
"user_id": "43028",
"folder_id": 10,
"name": "renamed-photo.png",
"original_name": "Frame 1000003420.png",
"path": "cdngallery/9f86443bd9f2ad28d1be4b62e8783e96720ec87a2ba86fcbeb5fc537483bf05b/files/5/MEL37P9ilmLodrQg.png",
"hash": "b302a431204139c0572ab43b0d2bbc71297e8e1c21445d8daa786126de2d1cb1",
"path_hash": null,
"mime_type": "image/png",
"type": "image",
"extension": "png",
"size": 87963,
"url": "https://business.me-mate.net/getgabs-uploads/cdngallery/9f86443bd9f2ad28d1be4b62e8783e96720ec87a2ba86fcbeb5fc537483bf05b/files/5/MEL37P9ilmLodrQg.png",
"is_starred": false,
"is_whatsapp_compatible": true,
"whatsapp_compatibility_reason": "Ready for WhatsApp",
"uploaded_at": "2026-03-10T04:37:27.000000Z",
"created_at": "2026-03-10T04:37:27.000000Z",
"updated_at": "2026-03-10T06:15:07.000000Z",
"deleted_at": null,
"tags": [],
"folder": {
"id": 10,
"user_id": "43028",
"name": "test2",
"parent_id": 9,
"is_system": false,
"file_count": 14,
"created_at": "2026-03-09T13:10:07.000000Z",
"updated_at": "2026-03-10T05:34:50.000000Z",
"deleted_at": null
}
}
}

Common errors

  • 400 Bad Request

    • Invalid request body

    • Invalid file name format

  • 401 Unauthorized / 403 Forbidden

    • Missing/invalid Authorization header

    • Expired {{access_token}}

  • 404 Not Found

    • File with the given file_id does not exist

Notes

  • This endpoint allows updating file metadata only.

  • It does not replace or re-upload the file content.

  • The name field only changes the display name of the file in the system.

  • The starred flag can be used to highlight important files for easier access.

Request

This endpoint expects an object.
namestringRequired
starredbooleanRequired

Response

OK
dataobject
messagestring
successboolean