Skip to main content
POST
https://api-v2.getomni.ai
/
api
/
v1
/
activity
const options = {
  method: "POST",
  headers: {
    "x-api-key": "<your-api-key>",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    leadId: "a9d0a790-201b-47e9-84ed-cc7eed1270c5",
    eventType: "sales_call",
    title: "Intro call – SBA loan interest",
    description:
      "Successful intro call. Borrower runs Pacific Coast Container Haulers (drayage at Port of Long Beach). In business 4 years, ~8 employees, ~$1.2M revenue. Interested in SBA 7(a) to refinance equipment and add a truck (~$180–220K). Next step: collect last two years of tax returns.",
    metadata: {
      durationMinutes: 25,
      outcome: "positive",
      loanType: "SBA",
      nextStep: "Request last 2 years of tax returns",
      followUpDays: 2,
    },
  }),
};

fetch("https://api-v2.getomni.ai/api/v1/activity", options)
  .then((response) => response.json())
  .then((response) => console.log(response))
  .catch((err) => console.error(err));
{
  "success": true,
  "actionLogId": "7de43760-d12d-4bcc-931a-f728ef1a3e3b"
}
This endpoint creates an activity entry on a lead’s timeline. Activities are visible in the timeline and available to the AI agent for context. Use it to log events such as sales calls, document errors, status changes, or any custom event from your system.

Authentication

Requires the x-api-key header with a valid workspace API key.

Request Body

leadId
string
required
The Omni lead ID. The lead must exist and belong to your workspace.
eventType
string
required
Event type label (e.g. “sales_call”, “document_error”, “status_change”). Shown as a badge on the timeline card.
title
string
required
Short summary shown as the main title on the timeline card.
description
string
Longer description or notes. Rendered as body text on the card; long text is clipped with a “Read more” expand.
metadata
object
Freeform key-value object for additional context (e.g. durationMinutes, outcome, nextStep). Rendered in a “Details” section on the card.

Response

success
boolean
Whether the request succeeded
actionLogId
string
The ID of the created action log entry
const options = {
  method: "POST",
  headers: {
    "x-api-key": "<your-api-key>",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    leadId: "a9d0a790-201b-47e9-84ed-cc7eed1270c5",
    eventType: "sales_call",
    title: "Intro call – SBA loan interest",
    description:
      "Successful intro call. Borrower runs Pacific Coast Container Haulers (drayage at Port of Long Beach). In business 4 years, ~8 employees, ~$1.2M revenue. Interested in SBA 7(a) to refinance equipment and add a truck (~$180–220K). Next step: collect last two years of tax returns.",
    metadata: {
      durationMinutes: 25,
      outcome: "positive",
      loanType: "SBA",
      nextStep: "Request last 2 years of tax returns",
      followUpDays: 2,
    },
  }),
};

fetch("https://api-v2.getomni.ai/api/v1/activity", options)
  .then((response) => response.json())
  .then((response) => console.log(response))
  .catch((err) => console.error(err));
{
  "success": true,
  "actionLogId": "7de43760-d12d-4bcc-931a-f728ef1a3e3b"
}