Delete Email Folder
DELETE
/api/v1/workspaces/{workspace_id}/email_folders/{id}
const url = 'https://example.com/%7B%7Bapp_url%7D/api/v1/workspaces/1/email_folders/1';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://example.com/%7B%7Bapp_url%7D/api/v1/workspaces/1/email_folders/1 \ --header 'Authorization: Bearer <token>'Deletes an email folder. Folders that still contain emails or subfolders cannot be deleted.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”workspace_id
required
integer
Workspace ID
id
required
integer
Email Folder ID
Responses
Section titled “ Responses ”Successful
Forbidden
Media typeapplication/json
object
message
required
string
code
string
Example
{ "message": "Record not found", "code": "share_link_expired"}Not Found
Media typeapplication/json
object
message
required
string
code
string
Example
{ "message": "Record not found", "code": "share_link_expired"}Unprocessable Entity
Media typeapplication/json
object
message
required
string
errors
required
object
key
additional properties
Array<string>
Example
{ "errors": { "username": [ "Username is required.", "Username must be unique." ], "email": [ "Invalid email format." ] }}