Emails API
/api/v1/communications
Emails sent through agentlyleads land on the timeline by themselves. Everything that happened somewhere else, a phone call, a LinkedIn exchange, a meeting, an email from another system, is logged here.
Log a communication
Requires write:communications (or *).
POST /api/v1/communications HTTP/1.1
Host: agentlyleads.com
Authorization: Bearer alk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Content-Type: application/json
{
"contactExternalId": "hs_contact_123",
"type": "LINKEDIN",
"direction": "INBOUND",
"subject": "Accepted the InMail, asked for toys",
"body": "Hi Howard, TJX buys from new inventory sources every week...",
"occurredAt": "2026-08-16T14:36:00-04:00"
}| Field | Description |
|---|---|
contactId or contactExternalId | Required, one of the two |
type | CALL, EMAIL, NOTE, MEETING or LINKEDIN |
direction | INBOUND or OUTBOUND, optional |
subject | Optional title line |
body | Required |
occurredAt | ISO 8601 with offset. Defaults to now. Backdate to keep the timeline honest. |
offeringId | Link to an offering |
asUserEmail | Record it as logged by this member |
Returns 201:
{ "communication": { "id": "cmtluhfc00w8hig01xiceouo7", "contactId": "cmr8...", "type": "LINKEDIN", "direction": "INBOUND", "subject": "Accepted the InMail, asked for toys", "occurredAt": "2026-08-16T18:36:00.000Z" } }Read a timeline
Requires read:communications (or *).
GET /api/v1/communications?contactExternalId=hs_contact_123&limit=50 HTTP/1.1
Authorization: Bearer alk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx| Parameter | Description |
|---|---|
contactId, contactExternalId | Filter to one contact |
type | One of the five types |
updatedSince | ISO 8601, only entries that occurred at or after this moment |
limit, cursor | Page size 1 to 1000 (default 100) and the previous page's nextCursor |
Rows are newest first by occurredAt and embed the contact's id, name and externalId.