Log an email
Logs an email that no connected account will sync, such as history from a previous CRM or a mailbox export. The email appears on account, contact, and opportunity timelines at $sentAt and threads with related emails. $sentAt must be in the past, and at least one participant must be a workspace member and one must be external.
The Message-ID header (or a generated one) identifies the email. If an email with the same Message-ID already exists, the request returns 409 and writes nothing. Group emails into threads with $threadId, or pass In-Reply-To and References in headers.
Privacy defaults to the most permissive setting among the participants’ connected accounts, else METADATA. Set $privacySetting to override it. Logging an email never sends it, never cancels a sequence enrollment, and creates records only when autoCreateRecords is true. Filter out personal and non-sales mail before logging.
Supports idempotency via the Idempotency-Key header.
Required scope: emails:create
Rate limit category: Write
Body ParametersJSON
Log an email
curl https://api.lightfield.app/v1/emails/log \
-H 'Content-Type: application/json' \
-H 'Lightfield-Version: 2026-03-01' \
-H "Authorization: Bearer $API_KEY" \
-d '{
"fields": {
"$from": "$from",
"$sentAt": "$sentAt"
}
}'{
"id": "eml_cm0abc456def789",
"accessLevel": "FULL",
"createdAt": "2026-05-01T09:00:00.000Z",
"fields": {
"$subject": {
"value": "Following up on our chat",
"valueType": "TEXT"
},
"$sentAt": {
"value": "2026-05-01T08:30:00.000Z",
"valueType": "DATETIME"
},
"$from": {
"value": [
"sales@acme.com"
],
"valueType": "EMAIL"
},
"$to": {
"value": [
"lead@example.com"
],
"valueType": "EMAIL"
},
"$cc": {
"value": [
"string"
],
"valueType": "EMAIL"
},
"$bcc": {
"value": [
"string"
],
"valueType": "EMAIL"
},
"$privacySetting": {
"value": "string",
"valueType": "TEXT"
},
"$body": {
"value": "<p>Hi there,</p><p>Following up on our chat earlier this week.</p>",
"valueType": "HTML"
}
},
"httpLink": null,
"objectType": "email",
"relationships": {
"$account": {
"cardinality": "has_many",
"objectType": "account",
"values": [
"acc_cm4stu901uvw234"
],
"directions": {
"asDestination": {
"cardinality": "HAS_ONE",
"values": [
"string"
]
},
"asSource": {
"cardinality": "HAS_ONE",
"values": [
"string"
]
}
}
},
"$contact": {
"cardinality": "has_many",
"objectType": "contact",
"values": [
"con_cm2ghi789jkl012"
],
"directions": {
"asDestination": {
"cardinality": "HAS_ONE",
"values": [
"string"
]
},
"asSource": {
"cardinality": "HAS_ONE",
"values": [
"string"
]
}
}
}
},
"updatedAt": "2026-05-01T10:00:00.000Z",
"externalId": "externalId"
}Returns Examples
{
"id": "eml_cm0abc456def789",
"accessLevel": "FULL",
"createdAt": "2026-05-01T09:00:00.000Z",
"fields": {
"$subject": {
"value": "Following up on our chat",
"valueType": "TEXT"
},
"$sentAt": {
"value": "2026-05-01T08:30:00.000Z",
"valueType": "DATETIME"
},
"$from": {
"value": [
"sales@acme.com"
],
"valueType": "EMAIL"
},
"$to": {
"value": [
"lead@example.com"
],
"valueType": "EMAIL"
},
"$cc": {
"value": [
"string"
],
"valueType": "EMAIL"
},
"$bcc": {
"value": [
"string"
],
"valueType": "EMAIL"
},
"$privacySetting": {
"value": "string",
"valueType": "TEXT"
},
"$body": {
"value": "<p>Hi there,</p><p>Following up on our chat earlier this week.</p>",
"valueType": "HTML"
}
},
"httpLink": null,
"objectType": "email",
"relationships": {
"$account": {
"cardinality": "has_many",
"objectType": "account",
"values": [
"acc_cm4stu901uvw234"
],
"directions": {
"asDestination": {
"cardinality": "HAS_ONE",
"values": [
"string"
]
},
"asSource": {
"cardinality": "HAS_ONE",
"values": [
"string"
]
}
}
},
"$contact": {
"cardinality": "has_many",
"objectType": "contact",
"values": [
"con_cm2ghi789jkl012"
],
"directions": {
"asDestination": {
"cardinality": "HAS_ONE",
"values": [
"string"
]
},
"asSource": {
"cardinality": "HAS_ONE",
"values": [
"string"
]
}
}
}
},
"updatedAt": "2026-05-01T10:00:00.000Z",
"externalId": "externalId"
}