Skip to content

Get an email account

GET
/emails/accounts/{email}
curl --request GET \
--url https://api.clearance.rest/emails/accounts/example \
--header 'X-API-Key: <X-API-Key>'

The ETag header carries the metadata version.

email
required
string
>= 3 characters

Email address (URL-encoded).

Default Response

Media typeapplication/json
object
success
required
boolean
account
required

A Gmail, Outlook or Cloudflare address connected to the project.

object
id
required
string
email
required
string
email_provider
required

Provider of an email account.

string
Allowed values: gmail outlook cloudflare
status
required

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.

string
Allowed values: CONNECTED RENEWING REAUTH_REQUIRED
last_error
required
string | null
subscription_expires_at
required
Any of:

UTC timestamp (ISO 8601).

string
mark_as_read_authorized
required

Whether the mailbox granted the permission needed for mark_as_read.

boolean
project_id
required
string
metadata
required

Free-form JSON object (at most 16 KB, 5 levels deep, keys up to 64 characters).

object
key
additional properties
metadata_version
required

Increases on every metadata change; use it in If-Match.

integer
>= -9007199254740991 <= 9007199254740991
created_at
required

UTC timestamp (ISO 8601).

string
updated_at
required

UTC timestamp (ISO 8601).

string
Example
{
"success": true,
"account": {
"email_provider": "gmail",
"status": "CONNECTED"
}
}

Default Response

Media typeapplication/json

Error envelope returned by every JSON endpoint.

object
success
required
boolean
error
required
object
code
required

Machine-readable error code (snake_case).

string
message
required

Human-readable message.

string
details

Extra context for the error.

object
key
additional properties
Example
{
"success": false
}

Default Response

Media typeapplication/json

Error envelope returned by every JSON endpoint.

object
success
required
boolean
error
required
object
code
required

Machine-readable error code (snake_case).

string
message
required

Human-readable message.

string
details

Extra context for the error.

object
key
additional properties
Example
{
"success": false
}

Default Response

Media typeapplication/json

Error envelope returned by every JSON endpoint.

object
success
required
boolean
error
required
object
code
required

Machine-readable error code (snake_case).

string
message
required

Human-readable message.

string
details

Extra context for the error.

object
key
additional properties
Example
{
"success": false
}