Contacts API

List and create CRM contacts.

Base path: /api/v1/crm/contacts

List contacts

GET /api/v1/crm/contacts?page=1&limit=50&search=Acme&status=active
ParameterTypeNotes
pageintegerDefault 1
limitintegerDefault 50, maximum 100
searchstringTokenized contact search
statusstring, repeatableactive, inactive, blocked, or pending

Example:

curl "https://workspace.leenops.com/api/v1/crm/contacts?search=Acme&limit=10" \
  -H "Authorization: Bearer $LEENOPS_API_KEY"

The response contains data and pagination.

Create a contact

POST /api/v1/crm/contacts
Content-Type: application/json

Requires contacts.write.

{
  "email": "john@example.com",
  "first_name": "John",
  "last_name": "Smith",
  "phone": "+32 2 555 01 23",
  "job_title": "Operations Director",
  "company_name": "Acme Corp",
  "contact_type": "prospect",
  "status": "active",
  "tags": ["api-test"],
  "country": "Belgium",
  "city": "Brussels"
}

email is the only required field.

Accepted optional fields:

FieldValidation
first_name, last_nameMaximum 120 characters
phoneMaximum 50 characters
job_titleMaximum 180 characters
company_idUUID, empty string, or null
company_nameMaximum 255 characters
contact_typenew, engaged, qualified, customer, inactive, lead, prospect, partner, or vendor
statusactive, inactive, blocked, or pending
lead_source, industryMaximum 180 characters
notesMaximum 10,000 characters
tagsAt most 50 strings, each at most 100 characters
custom_fieldsJSON object
external_idMaximum 255 characters
country, state, cityMaximum 120 characters
social_linkedinMaximum 500 characters

The body is strict: unknown fields such as company are rejected. Use company_id or company_name.

The current create handler returns the created contact object directly with HTTP 201, rather than wrapping it in { "data": ... }.

Update and delete

There is currently no /api/v1/crm/contacts/{id} REST route. Update and delete contacts through the application or an authorized MCP tool.