Skip to main content

Log calls from an external dialer with the lemlist API

Connect Trellus, Nooks, or any other dialer to lemlist so its calls complete call tasks, run your call status automations, and reach your timeline, stats, and CRM.

If your team calls from an external dialer (Trellus, Nooks, or another one) while using lemlist call steps, the dialer can log its calls in lemlist through the public API. A call logged this way is handled exactly like a call made with the lemlist dialer: it can complete the call task, run your call status automations, and it appears in the timeline, on the Calls page, in the call stats, in outgoing webhooks, and in your CRM.

Before, a dialer could only close a task with PATCH /tasks, without a call status, duration, recording, or note.

What to tell your dialer vendor: use POST /api/calls, documented in the Calls section of the lemlist API reference.


Limitations

  • The Calls API is available on the Email Pro plan and above. Below Email Pro, requests return 402.

  • Nothing changes in the lemlist app: this is API only.

  • The call status must be one of your team's call statuses. An unknown status is refused.

  • A default status only counts the call as answered. To mark the lead interested or pause campaigns, use a status your team configured that way.

  • A call logged on a contact alone (without taskId or leadId) is logged and pushed to the CRM, but runs no campaign automation.

  • The recording URL must be a public https URL.

  • PATCH /api/calls/{id} only works on calls logged through the API. It cannot update calls from the lemlist dialer, Aircall, Ringover, or calls logged manually.

  • API calls are counted in the call stats, not in the billed call minutes.

  • The Calls API is not available as a lemAgent or MCP tool yet.


The Calls API routes

Route

What it does

POST /api/calls

Logs a call.

GET /api/call-statuses

Lists your team's call statuses, so the dialer can map its own outcomes once.

PATCH /api/calls/{id}

Completes a call later, for example when the recording arrives a few minutes after the call, or to fix a status.

GET /api/calls/{id}

Reads a call back. Works on any call of the team.


Set up call logging from your dialer

Phase 1: Map the dialer's outcomes to your call statuses

  1. Call GET /api/call-statuses to get your team's call statuses.

  2. Map each outcome of the dialer to one of these statuses. Use statuses that mark the lead interested or pause campaigns where you want those automations to run.

Phase 2: Log each call

Send POST /api/calls after each call. A call can include:

  • The rep who made the call (userId). The call is credited to this rep, not to the first user of the team.

  • The direction, the from and to numbers, and the start date (it can be in the past).

  • The duration, the call status, and a note.

  • A recording URL and a transcript.

  • An externalId: the dialer's own call id. It is required, so a retry never creates a duplicate.

lemlist finds the contact by taskId, leadId, contactId, email, or phone.

Phase 3: Complete call tasks from the dialer

Include the taskId of the lemlist call task. The task is completed with the call status and the campaign moves on, as if the rep had done it in lemlist.

Phase 4: Add the recording later if needed

If the recording is only ready a few minutes after the call, send it with PATCH /api/calls/{id}.

✅ Verify: the call appears in the contact's timeline and on the Calls page, and the call task is done if you sent a taskId.


What happens to a call logged through the API

  • The call status runs the same automations as in the app: Interested or Not interested, pauses, a verdict on the phone number, and the CRM outcome.

  • The recording is copied to lemlist: it plays in the call modal and feeds the AI summary. The transcript is copied too.

  • Numbers are standardized when they can be read, and kept as sent otherwise. An anonymous caller or an extension is never refused, so the Calls table and HubSpot can show anonymous.

  • The call reaches your CRM following your Calls activities mapping: a Call in HubSpot with the from and to numbers, a completed Task with its Call Result in Salesforce, a call activity in Pipedrive.


Practical example

Your reps run lemlist campaigns with call steps but dial from Trellus. Trellus calls GET /api/call-statuses once and maps its "Meeting booked" outcome to your Interested status. After each call, it sends POST /api/calls with the taskId, the rep's userId, and its own call id as externalId. The task is completed, the lead is marked interested, and the call shows up in HubSpot under the right rep. When the recording is ready, Trellus adds it with PATCH /api/calls/{id}.


Troubleshooting

Error

Cause

Fix

400

Unknown call status, or an invalid field (the message names the field).

Use a status from GET /api/call-statuses (the error lists the valid ones), or correct the named field.

400

userId is not in the team.

Send the id of a user of this team.

400

The recording URL is private.

Send a public https URL.

402

The team is below the Email Pro plan.

The Calls API needs the Email Pro plan or above.

404

Contact not found.

Check the taskId, leadId, contactId, email, or phone you sent.

404 CALLS_API_CALL_NOT_UPDATABLE

PATCH was sent for a call not logged through the API.

Only update calls your dialer logged with POST /api/calls.

409

The task is already done.

Log the call without the taskId, or check why the task was already completed.

409 CALLS_API_LOG_IN_PROGRESS

Two identical calls were sent at the same time.

Replay the request.


If your case is different

Did this answer your question?