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
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
Activity type (e.g., call, email, email_sent, email_replied, meeting, note, task_completed, ai_action). Free-form — custom types are allowed.
Short human-readable title (max 500 chars)
Full description or body (markdown supported)
UUID of the related contact
Polymorphic entity type (e.g., campaign, task, list) when the activity relates to something other than a contact or deal
UUID of the polymorphic entity
Human-readable name of the entity (for timeline display)
Arbitrary structured JSON for type-specific data (call duration, email subject, attendees, etc.). Max 8 KB serialized.
Response
Newly created activity UUID
UUID of the creating user
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
Status Code Description 400 missing_required_fieldtype is missing400 metadata_too_largeSerialized metadata exceeds 8 KB 401 invalid_keyInvalid or expired API key 403 insufficient_permissionsMissing activities:write permission 404 contact_not_foundReferenced contact_id does not exist 404 deal_not_foundReferenced deal_id does not exist 429 rate_limitedRate limit exceeded