Overview
Base URL: https://api.trixdb.com/v1
Authentication: All endpoints require a valid API key via the Authorization header.
Header
Authorization: Bearer YOUR_API_KEYEmail Address Endpoints
Get Email Address
Endpoint
GET /email/addressRequest
curl -X GET https://api.trixdb.com/v1/email/address \
-H "Authorization: Bearer YOUR_API_KEY"Response 200
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"email": "[email protected]",
"localPart": "abc12xyz",
"domain": "mail.trixdb.com",
"isActive": true,
"createdAt": "2024-01-15T10:30:00Z"
}Create Email Address
Endpoint
POST /email/addressRequest
curl -X POST https://api.trixdb.com/v1/email/address \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"regenerate": false}'Rotate Email Address
Endpoint
POST /email/address/rotateRequest
curl -X POST https://api.trixdb.com/v1/email/address/rotate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"gracePeriodDays": 30}'Response 201
{
"id": "660e8400-e29b-41d4-a716-446655440001",
"email": "[email protected]",
"previousEmail": "[email protected]",
"gracePeriodDays": 30,
"createdAt": "2024-01-20T10:30:00Z"
}List All Addresses
Endpoint
GET /email/addressesDeactivate Address
Endpoint
DELETE /email/addressEmail History Endpoints
List Email History
Endpoint
GET /email/history?limit=20&offset=0&status=completed| Parameter | Type | Default | Description |
|---|---|---|---|
limit | integer | 20 | Results per page (1-100) |
offset | integer | 0 | Pagination offset |
status | string | - | Filter by status |
Get Email Details
Endpoint
GET /email/history/:idResponse 200
{
"id": "email-uuid-1",
"sender": "[email protected]",
"recipient": "[email protected]",
"subject": "STORE: Meeting notes @work #meeting p1",
"bodyPlain": "Discussed budget allocation...",
"status": "completed",
"parsedIntent": {
"command": "store",
"content": "Meeting notes",
"metadata": {
"space": "work",
"tags": ["meeting"],
"priority": 1
},
"method": "subject"
},
"responseMemoryId": "memory-uuid-1",
"createdAt": "2024-01-15T10:30:00Z",
"processedAt": "2024-01-15T10:30:02Z"
}Sender Rules Endpoints
List Sender Rules
Endpoint
GET /email/senders?ruleType=blockAdd Sender Rule
Endpoint
POST /email/sendersRequest
curl -X POST https://api.trixdb.com/v1/email/senders \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"emailPattern": "*@spam.com",
"ruleType": "block",
"reason": "Known spam domain"
}'Check Sender
Endpoint
POST /email/senders/checkRequest
curl -X POST https://api.trixdb.com/v1/email/senders/check \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"email": "[email protected]"}'Response 200
{
"allowed": true,
"reason": null,
"matchedRule": null
}Remove Sender Rule
Endpoint
DELETE /email/senders/:patternReactions Endpoints
List Reactions
Endpoint
GET /email/reactionsCreate Reaction
Endpoint
POST /email/reactionsRequest
curl -X POST https://api.trixdb.com/v1/email/reactions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Important Meeting Alert",
"triggerType": "memory_created",
"triggerConditions": {
"tags": ["important", "meeting"],
"contentContains": "deadline"
},
"emailSubjectTemplate": "Alert: New Memory",
"emailBodyTemplate": "A memory was created.",
"cooldownMinutes": 60,
"maxPerDay": 10
}'Update Reaction
Endpoint
PATCH /email/reactions/:idDelete Reaction
Endpoint
DELETE /email/reactions/:idDigests Endpoints
List Digests
Endpoint
GET /email/digestsCreate Digest
Endpoint
POST /email/digestsRequest
curl -X POST https://api.trixdb.com/v1/email/digests \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Weekly Summary",
"scheduleType": "weekly",
"timezone": "America/New_York",
"includeNewMemories": true,
"includeHighlights": true,
"maxItems": 10,
"tags": ["meeting"],
"isActive": true
}'Update Digest
Endpoint
PATCH /email/digests/:idDelete Digest
Endpoint
DELETE /email/digests/:idSend Digest Now
Endpoint
POST /email/digests/:id/sendAttachments Endpoints
List Attachments
Endpoint
GET /email/history/:id/attachmentsGet Attachment
Endpoint
GET /email/attachments/:idDownload Attachment
Endpoint
GET /email/attachments/:id/download?expiresIn=3600Response 200
{
"url": "https://s3.amazonaws.com/bucket/path?signature=...",
"expiresIn": 3600
}Delete Attachment
Endpoint
DELETE /email/attachments/:idError Responses
| Status | Error | Description |
|---|---|---|
| 400 | bad_request | Invalid request parameters |
| 401 | unauthorized | Invalid or missing authentication |
| 404 | not_found | Resource not found |
| 409 | conflict | Resource already exists |
| 429 | rate_limit_exceeded | Too many requests |
Error Response
{
"error": "not_found",
"message": "Email address not found"
}Rate Limits
| Resource | Limit | Window |
|---|---|---|
| Inbound emails | 10 | 1 minute |
| Inbound emails | 100 | 1 hour |
| API requests | 1000 | 1 minute |
Rate limit headers are included in responses: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset