Skip to content

Archived Email API ​

Endpoints for retrieving and deleting archived emails. All endpoints require authentication and the appropriate archive permission.

List Emails for an Ingestion Source ​

List archived emails for an ingestion source​

GET
/v1/archived-emails/ingestion-source/{ingestionSourceId}

Returns a paginated list of archived emails belonging to the specified ingestion source. Requires read:archive permission.

Authorizations​

bearerAuth

JWT obtained from POST /v1/auth/login. Pass as Authorization: Bearer <token>.

Type
HTTP (bearer)
or
apiKeyAuth

API key generated via POST /v1/api-keys. Pass as X-API-KEY: <key>.

Type
API Key (header: X-API-KEY)

Parameters​

Path Parameters

ingestionSourceId*

The ID of the ingestion source to retrieve emails for.

Type
string
Required
Example"clx1y2z3a0000b4d2"

Query Parameters

page

Page number for pagination.

Type
integer
Example1
Default
1
limit

Number of items per page.

Type
integer
Example10
Default
10

Responses​

Paginated list of archived emails.

application/json
JSON
{
  
"items": [
  
  
{
  
  
  
"id": "clx1y2z3a0000b4d2",
  
  
  
"ingestionSourceId": "clx1y2z3a0000b4d2",
  
  
  
"userEmail": "user@company.com",
  
  
  
"messageIdHeader": "string",
  
  
  
"sentAt": "string",
  
  
  
"subject": "Q4 Invoice",
  
  
  
"senderName": "Finance Dept",
  
  
  
"senderEmail": "finance@vendor.com",
  
  
  
"recipients": [
  
  
  
  
{
  
  
  
  
  
"name": "John Doe",
  
  
  
  
  
"email": "john.doe@example.com"
  
  
  
  
}
  
  
  
],
  
  
  
"storagePath": "string",
  
  
  
"storageHashSha256": "string",
  
  
  
"sizeBytes": 0,
  
  
  
"isIndexed": true,
  
  
  
"hasAttachments": true,
  
  
  
"isOnLegalHold": true,
  
  
  
"archivedAt": "string",
  
  
  
"attachments": [
  
  
  
  
{
  
  
  
  
  
"id": "clx1y2z3a0000b4d2",
  
  
  
  
  
"filename": "invoice.pdf",
  
  
  
  
  
"mimeType": "application/pdf",
  
  
  
  
  
"sizeBytes": 204800,
  
  
  
  
  
"storagePath": "myemailvault/attachments/abc123.pdf"
  
  
  
  
}
  
  
  
],
  
  
  
"thread": [
  
  
  
  
{
  
  
  
  
  
"id": "clx1y2z3a0000b4d2",
  
  
  
  
  
"subject": "Re: Q4 Invoice",
  
  
  
  
  
"sentAt": "string",
  
  
  
  
  
"senderEmail": "finance@vendor.com"
  
  
  
  
}
  
  
  
],
  
  
  
"path": "string",
  
  
  
"tags": [
  
  
  
  
"string"
  
  
  
]
  
  
}
  
],
  
"total": 1234,
  
"page": 1,
  
"limit": 10
}

Playground​

Authorization
Variables
Key
Value

Samples​

Powered by VitePress OpenAPI

Get a Single Email ​

Get a single archived email​

GET
/v1/archived-emails/{id}

Retrieves the full details of a single archived email by ID, including attachments and thread. Requires read:archive permission.

Authorizations​

bearerAuth

JWT obtained from POST /v1/auth/login. Pass as Authorization: Bearer <token>.

Type
HTTP (bearer)
or
apiKeyAuth

API key generated via POST /v1/api-keys. Pass as X-API-KEY: <key>.

Type
API Key (header: X-API-KEY)

Parameters​

Path Parameters

id*

The ID of the archived email.

Type
string
Required
Example"clx1y2z3a0000b4d2"

Responses​

Archived email details.

application/json
JSON
{
  
"id": "clx1y2z3a0000b4d2",
  
"ingestionSourceId": "clx1y2z3a0000b4d2",
  
"userEmail": "user@company.com",
  
"messageIdHeader": "string",
  
"sentAt": "string",
  
"subject": "Q4 Invoice",
  
"senderName": "Finance Dept",
  
"senderEmail": "finance@vendor.com",
  
"recipients": [
  
  
{
  
  
  
"name": "John Doe",
  
  
  
"email": "john.doe@example.com"
  
  
}
  
],
  
"storagePath": "string",
  
"storageHashSha256": "string",
  
"sizeBytes": 0,
  
"isIndexed": true,
  
"hasAttachments": true,
  
"isOnLegalHold": true,
  
"archivedAt": "string",
  
"attachments": [
  
  
{
  
  
  
"id": "clx1y2z3a0000b4d2",
  
  
  
"filename": "invoice.pdf",
  
  
  
"mimeType": "application/pdf",
  
  
  
"sizeBytes": 204800,
  
  
  
"storagePath": "myemailvault/attachments/abc123.pdf"
  
  
}
  
],
  
"thread": [
  
  
{
  
  
  
"id": "clx1y2z3a0000b4d2",
  
  
  
"subject": "Re: Q4 Invoice",
  
  
  
"sentAt": "string",
  
  
  
"senderEmail": "finance@vendor.com"
  
  
}
  
],
  
"path": "string",
  
"tags": [
  
  
"string"
  
]
}

Playground​

Authorization
Variables
Key
Value

Samples​

Powered by VitePress OpenAPI

Delete an Email ​

Delete an archived email​

DELETE
/v1/archived-emails/{id}

Permanently deletes an archived email by ID. Deletion must be enabled in system settings and the email must not be on legal hold. Requires delete:archive permission.

Authorizations​

bearerAuth

JWT obtained from POST /v1/auth/login. Pass as Authorization: Bearer <token>.

Type
HTTP (bearer)
or
apiKeyAuth

API key generated via POST /v1/api-keys. Pass as X-API-KEY: <key>.

Type
API Key (header: X-API-KEY)

Parameters​

Path Parameters

id*

The ID of the archived email to delete.

Type
string
Required
Example"clx1y2z3a0000b4d2"

Responses​

Email deleted successfully. No content returned.

Playground​

Authorization
Variables
Key
Value

Samples​

Powered by VitePress OpenAPI