Skip to content
campaiDeveloper
campai.com

Templates ยท Folders

DELETE/{organizationId}/templates/folders/{folderId}

Delete folder

Deletes the specified folder and moves its templates to unfiled. It takes an organization ID and a folder ID and returns no content.

Permissions

Send an API key of the organization in the path, using the X-API-Key header.

Who may call it

  • The caller must have organization access and the template.remove permission.
  • If the folder contains a receipt template, the caller also needs receipt.edit.
  • If the folder contains a donation confirmation template, the caller also needs donationsSettings.edit.

Request

Path parameters

  • organizationIdidrequired
  • folderIdidrequired
Request
curl --fail-with-body --silent --show-error --max-time 30 --globoff \
  --request DELETE 'https://cloud.campai.com/api/YOUR_ORGANIZATION_ID/templates/folders/YOUR_FOLDER_ID' \
  --header 'X-API-Key: YOUR_API_KEY'

Response

200 Successful response

No response body is specified.

What else happens

  • After the checks pass, the folder is deleted.
  • Templates in the folder are moved to unfiled by setting their folder to null.

Errors

Other errors

StatusErrorWhen
404No fixed messageIf the folder is not found in the organization, the request fails with HTTP 404 (NOT_FOUND).

Errors nearly every request can meet are listed under Errors.