List email accounts
const url = 'https://api.clearance.rest/emails/accounts?limit=50';const options = {method: 'GET', headers: {'X-API-Key': '<X-API-Key>'}};
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://api.clearance.rest/emails/accounts?limit=50' \ --header 'X-API-Key: <X-API-Key>'The project’s Gmail, Outlook and Cloudflare addresses, newest first. Filter by status, provider, address and metadata. The status filter is applied after loading, so a page can contain fewer than limit items; a non-null next_cursor means the list continues. Filter on metadata values with metadata.<key>=<string> query parameters (top-level keys of letters, digits, _ and -, up to 64 characters; the value is compared as a string; several filters must all match), and on missing keys with metadata_absent=<key>,<key> (comma-separated).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Comma-separated connection statuses; an account matches when it has any of them (default: all).
Comma-separated providers; an account matches when it has any of them (default: all).
Exact match (case-insensitive).
Page size (1-200).
The next_cursor value of the previous page.
Comma-separated metadata keys; the account must have none of them.
Responses
Section titled “Responses”Default Response
object
A Gmail, Outlook or Cloudflare address connected to the project.
object
Provider of an email account.
CONNECTED: notifications are active. RENEWING: the subscription expired or is not set up yet and will be renewed automatically. REAUTH_REQUIRED: the last token refresh or sync failed; the owner may need to authorize again. Cloudflare addresses are always CONNECTED.
Whether the mailbox granted the permission needed for mark_as_read.
Free-form JSON object (at most 16 KB, 5 levels deep, keys up to 64 characters).
object
Increases on every metadata change; use it in If-Match.
UTC timestamp (ISO 8601).
UTC timestamp (ISO 8601).
Example
{ "success": true, "accounts": [ { "email_provider": "gmail", "status": "CONNECTED" } ]}Default Response
Error envelope returned by every JSON endpoint.
object
object
Machine-readable error code (snake_case).
Human-readable message.
Extra context for the error.
object
Example
{ "success": false}Default Response
Error envelope returned by every JSON endpoint.
object
object
Machine-readable error code (snake_case).
Human-readable message.
Extra context for the error.
object
Example
{ "success": false}Default Response
Error envelope returned by every JSON endpoint.
object
object
Machine-readable error code (snake_case).
Human-readable message.
Extra context for the error.
object
Example
{ "success": false}