List Email Folders
GET
/api/v1/workspaces/{workspace_id}/email_folders
const url = 'https://example.com/%7B%7Bapp_url%7D/api/v1/workspaces/1/email_folders?per=10&page=1&parent_id=root&sort=created_at_asc';const options = {method: 'GET', 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 GET \ --url 'https://example.com/%7B%7Bapp_url%7D/api/v1/workspaces/1/email_folders?per=10&page=1&parent_id=root&sort=created_at_asc' \ --header 'Authorization: Bearer <token>'Retrieves the email folders the user has access to.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”workspace_id
required
integer
Workspace ID
Query Parameters
Section titled “Query Parameters”per
integer
Number of records per page
page
integer
Page number
project_id
integer
Filter folders by project ID
parent_id
string
Example
rootFilter folders by parent folder. Pass a folder ID to list its subfolders, or the string ‘root’ to list folders at the root of the project. When omitted, folders from all levels are returned.
search
string
Filter folders by name
sort
string
Sorting
Responses
Section titled “ Responses ”Successful
Media typeapplication/json
object
results
required
Array<object>
object
id
required
integer
name
required
string
project_id
required
integer
parent_id
required
The parent folder ID, or null for a folder at the root of the project.
integer | null
organization_id
required
integer
email_count
required
integer
folder_count
required
integer
created_at
required
string format: date-time
updated_at
required
string format: date-time
pagination
required
object
per
required
integer
page
required
integer
total
required
integer
Example
{ "results": [ { "id": 12345, "name": "Newsletters", "project_id": 12345, "parent_id": 12345, "organization_id": 12345, "email_count": 4, "folder_count": 2, "created_at": "2023-08-23T10:30:00.000Z", "updated_at": "2023-08-23T10:30:00.000Z" } ], "pagination": { "per": 10, "page": 1, "total": 100 }}Unauthorized
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"}