Delete Theme File

DELETE /v2/sites/{site_id}/themes/{theme_id}/files?path={file_path}

Deletes a theme file from a Square Online site. This operation permanently removes the specified file from the theme directory of the site.

Permissions: ONLINE_STORE_CUSTOM_THEME_WRITE

Path parameters

Name Type Description
site_id string Required The ID of the site.
theme_id string Required The ID of the theme.

Query parameters

Name Type Description
path string Required The URL-encoded path of the theme file to delete.

Response fields

Name Type Description
errors Error [ ] Any errors that occurred during the request.

Example request

curl https://connect.squareup.com/v2/sites/site_id0/themes/theme_id1/files?path=theme%2Fpath%2Ffile_name2.twig \
  -X DELETE \
  -H 'Square-Version: 2023-09-25' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -H 'Content-Type: application/json'

Example response

{}