DELETE/folders/{id}

Delete a folder

Deletes a folder that contains no content. Use the id path parameter to select the folder; folders with content cannot be deleted until that content is removed or moved.

2 parameters
idintegerrequired
The unique identifier of the folder to delete.
Intercom-Versionstringoptional
Selects the API version. Defaults to `2.17` when omitted; supported versions include 1.0 through 1.4 and 2.0 through 2.6.
Allowed:1.01.11.21.31.42.02.12.22.32.42.52.6Default:2.17

4 status codes
200Returns a deletion result containing the deleted folder's ID, the object type `folder`, and a boolean indicating whether deletion succeeded.
idstringoptional
The unique identifier for the deleted folder
objectstringoptional
The type of object - `folder`.
Allowed:folder
deletedbooleanoptional
Whether the folder was successfully deleted.
401Returned when the request is unauthorized.
typestringrequired
The type is error.list
request_idstringoptional
errorsarray<object>required
An array of one or more error objects
404Returned when the folder does not exist.
typestringrequired
The type is error.list
request_idstringoptional
errorsarray<object>required
An array of one or more error objects
422Returned when the folder contains content and cannot be deleted.
typestringrequired
The type is error.list
request_idstringoptional
errorsarray<object>required
An array of one or more error objects

Error handling

A 401 is returned when the request is unauthorized. A 404 is returned when the id path parameter does not identify an existing folder. A 422 is returned when the folder contains content.