---
title: "Add a manual log entry"
method: POST
path: "/v1.0/logType"
tags: ["Lead Manual Log"]
---

# Add a manual log entry

`POST /v1.0/logType`

Creates a manual log entry (logCall, logEmail or logText) for the target lead.

Notes:
- Persistence is asynchronous. The response returns the new entry's ID once the write is enqueued; the entry becomes readable after a short delay.
- Caller must have access to the lead (owner, shared agent, or assigned lender), and the lead must not be trashed. Otherwise 404 LEAD_NOT_EXIST.
- leadId, logType and content are required for all channels.
- content is silently truncated to 5000 characters.
- outboundOrInbound must be exactly 'outbound' or 'inbound' when supplied; omitted values default to 'outbound'.
- For logCall: leadPhoneNumber is required (max 20 characters). callingOutcome is optional (max 20 characters); values outside the known set are silently normalized to 'Talked' during persistence.
- For logEmail: emailSubject / toEmail / fromEmail are optional and accepted as-is.

## Headers

- `Authorization` string, required
- `Content-Type` string, required

## Request body

- LogTypeRequest — Manual log entry payload.
  - `leadId` integer, required — ID of the lead to attach this log to. Must be accessible to the caller.
  - `logType` 'logCall' | 'logEmail' | 'logText', required — Channel of the manual log entry.
  - `leadPhoneNumber` string — Phone number that was called. Required when logType = logCall. Max 20 characters.
  - `callingOutcome` 'Talked' | 'VoiceMessage' | 'NoAnswer' | 'BadNumber' | 'DNCNumber' | 'DNCContact' — Outcome of the call. Only meaningful when logType = logCall. Max 20 characters.
  - `content` string, required — Free-text body of the log entry: call notes, email body, or SMS content. Silently truncated to 5000 characters.
  - `outboundOrInbound` 'outbound' | 'inbound' — Direction of the communication from the agent's point of view. 'outbound' = agent -> lead; 'inbound' = lead -> agent. Defaults to 'outbound' when omitted.
  - `isPin` boolean — Whether to pin this entry to the top of the lead's timeline.
  - `emailSubject` string — Email subject. Only meaningful when logType = logEmail; ignored otherwise.
  - `toEmail` string — Recipient email address. Only meaningful when logType = logEmail; ignored otherwise.
  - `fromEmail` string — Sender email address. Only meaningful when logType = logEmail; ignored otherwise.

## Response `200`

Entry accepted for persistence. The response contains the newly assigned ID.

- LogTypeSingleResponse — Wrapped response for GET /v1.0/logType/{id} and POST /v1.0/logType. The manual log entry is returned under the 'logType' key.
  - `logType` LogTypeResponse — Manual log entry.
    - `id` integer — ID of the manual log entry.
    - `leadId` integer — ID of the lead this entry belongs to.
    - `leadPhoneNumber` string — Phone number associated with the call. Only populated for logCall entries.
    - `callingOutcome` 'Talked' | 'VoiceMessage' | 'NoAnswer' | 'BadNumber' | 'DNCNumber' | 'DNCContact' — Outcome of the call. Only populated for logCall entries.
    - `content` string — Body of the log entry: call notes, email body, or SMS content.
    - `createTime` string — Time the entry was logged, formatted as 'yyyy-MM-dd HH:mm:ss' in UTC.
    - `outboundOrInbound` 'outbound' | 'inbound' — Direction of the communication from the agent's point of view. 'outbound' = agent -> lead; 'inbound' = lead -> agent.
    - `isPin` boolean — Whether this entry is pinned to the top of the lead's timeline.
    - `agentId` integer — User ID of the agent who created the entry.
    - `emailSubject` string — Email subject. Only populated for logEmail entries.
    - `toEmail` string — Recipient email address. Only populated for logEmail entries.
    - `fromEmail` string — Sender email address. Only populated for logEmail entries.

## Other responses

- `400` — Invalid parameter (20012 INVALID_PARAMETER): missing leadId, blank content, invalid logType, invalid outboundOrInbound, or logCall without leadPhoneNumber. Or parameter too long (20043 PARAMETER_TOO_LONG): leadPhoneNumber > 20 chars, or callingOutcome > 20 chars.
- `401` — Missing or invalid authentication token.
- `404` — Lead does not exist, is trashed, or is not accessible (20006 LEAD_NOT_EXIST).
- `500` — Internal server error.

---

[API](https://skmtc.dev/lofty/apis/lofty-service-open-apis.md) · [All operations](https://skmtc.dev/lofty/apis/lofty-service-open-apis/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/lofty/lofty-service-open-apis/revisions/23e640467118/schema)
