Skip to main content
POST
/
v1
/
activities
Create Activity
curl --request POST \
  --url https://api.example.com/v1/activities \
  --header 'Content-Type: application/json' \
  --data '
{
  "type": "<string>",
  "title": "<string>",
  "description": "<string>",
  "contact_id": "<string>",
  "deal_id": "<string>",
  "entity_type": "<string>",
  "entity_id": "<string>",
  "entity_name": "<string>",
  "metadata": {}
}
'
{
  "data": {
    "activity": {
      "id": "<string>",
      "type": "<string>",
      "title": "<string>",
      "description": "<string>",
      "contact_id": "<string>",
      "deal_id": "<string>",
      "entity_type": "<string>",
      "entity_id": "<string>",
      "entity_name": "<string>",
      "metadata": {},
      "created_by_user_id": "<string>",
      "created_date": "<string>"
    }
  }
}
Use this endpoint to record any user or agent action — a call, a sent email, a meeting, a handwritten note — so it appears on the contact and deal timeline.

Request

Headers

Authorization: Bearer wbk_your_api_key_here
Content-Type: application/json
Requires an API key with the activities:write permission. Fires the activity.created webhook event.

Body Parameters

type
string
required
Activity type (e.g., call, email, email_sent, email_replied, meeting, note, task_completed, ai_action). Free-form — custom types are allowed.
title
string
Short human-readable title (max 500 chars)
description
string
Full description or body (markdown supported)
contact_id
string
UUID of the related contact
deal_id
string
UUID of the related deal
entity_type
string
Polymorphic entity type (e.g., campaign, task, list) when the activity relates to something other than a contact or deal
entity_id
string
UUID of the polymorphic entity
entity_name
string
Human-readable name of the entity (for timeline display)
metadata
object
Arbitrary structured JSON for type-specific data (call duration, email subject, attendees, etc.). Max 8 KB serialized.

Response

data
object
curl -X POST https://data.leadlex.com/functions/v1/api-gateway/v1/activities \
  -H "Authorization: Bearer wbk_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "call",
    "title": "Discovery call with Jane",
    "description": "Discussed Q2 outsourcing plans; next step is proposal.",
    "contact_id": "123e4567-e89b-12d3-a456-426614174000",
    "deal_id": "3f8e1d2c-4b5a-6d7e-8f9a-0b1c2d3e4f5a",
    "metadata": {"duration_minutes": 32, "direction": "outbound"}
  }'

Example Response

{
  "data": {
    "activity": {
      "id": "act_7f3c4d2a-1b8e-4a9c-9d6f-2e5b8c7a1f3d",
      "type": "call",
      "title": "Discovery call with Jane",
      "description": "Discussed Q2 outsourcing plans; next step is proposal.",
      "contact_id": "123e4567-e89b-12d3-a456-426614174000",
      "deal_id": "3f8e1d2c-4b5a-6d7e-8f9a-0b1c2d3e4f5a",
      "entity_type": null,
      "entity_id": null,
      "entity_name": null,
      "metadata": { "duration_minutes": 32, "direction": "outbound" },
      "created_by_user_id": "9a8b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d",
      "created_date": "2026-04-17T14:23:05Z"
    }
  }
}

Errors

StatusCodeDescription
400missing_required_fieldtype is missing
400metadata_too_largeSerialized metadata exceeds 8 KB
401invalid_keyInvalid or expired API key
403insufficient_permissionsMissing activities:write permission
404contact_not_foundReferenced contact_id does not exist
404deal_not_foundReferenced deal_id does not exist
429rate_limitedRate limit exceeded