List Emails
GET
/api/v1/workspaces/{workspace_id}/emails
const url = 'https://example.com/%7B%7Bapp_url%7D/api/v1/workspaces/1/emails?per=10&page=1&status=draft&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/emails?per=10&page=1&status=draft&sort=created_at_asc' \ --header 'Authorization: Bearer <token>'Retrieves the Emails 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 emails by project ID
status
string
Filter emails by status
search
string
Filter emails by search term, matching against the email’s name or content.
sort
string
Sorting
Responses
Section titled “Responses”Successful
Media typeapplication/json
object
results
required
Array<object>
object
id
required
integer
status
required
string
name
required
string
project_id
required
integer
created_at
required
string format: date-time
organization_id
required
integer
email_design_system_id
required
integer
default_locale
required
A BCP 47 language tag identifying the language and region of a piece of content. Must carry both a language and a region subtag, and must be in canonical case (lowercase language, titlecase script, uppercase region) — en-GB, not en-gb or en_GB. The region may be a UN M.49 code, so en-001 (world) is valid.
string
locales
required
Array<string>
updated_at
required
string format: date-time
last_updated_by
required
ai_edit_in_progress
required
boolean
translation_in_progress
required
boolean
brand_profile_id
required
integer | null
link_tracking_profile_id
required
integer | null
published_at
required
string | null format: date-time
screenshot_url
required
string
pagination
required
object
per
required
integer
page
required
integer
total
required
integer
Example
{ "results": [ { "id": 12345, "status": "draft", "name": "My Email", "project_id": 12345, "created_at": "2023-08-23T10:30:00.000Z", "organization_id": 12345, "email_design_system_id": 12345, "default_locale": "en-GB", "locales": [ "en-GB" ], "updated_at": "2023-08-23T10:30:00.000Z", "last_updated_by": { "type": "User", "id": 12345, "first_name": "John", "last_name": "Smith", "profile_image_url": "https://example.com/profile.jpg" }, "ai_edit_in_progress": false, "translation_in_progress": false, "brand_profile_id": 12345, "link_tracking_profile_id": 12345, "published_at": "2023-08-23T10:30:00.000Z", "screenshot_url": "https://www.example.com/screenshot.png" } ], "pagination": { "per": 10, "page": 1, "total": 100 }}Unauthorized
Media typeapplication/json
object
message
required
string
Example
{ "message": "Record not found"}