Lead data model

Updated:

View field support, webhooks, and list parameters for each integration on the Supported Integrations page.

FieldTypeRequiredDescription
idstringNo
created_atstring (date-time)No(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
updated_atstring (date-time)No(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
namestringNoThe lead's full name
first_namestringNo
last_namestringNo
user_idstringNo(reference to HrisEmployee)
creator_user_idstringNo(reference to HrisEmployee)
contact_idstringNo(reference to CrmContact)
company_idstringNo(reference to CrmCompany)
company_namestringNoThe name of the company the lead works for
is_activebooleanNo
addressobjectNo
address.address1stringNo
address.address2stringNo
address.citystringNo
address.regionstringNo
address.region_codestringNo
address.postal_codestringNo
address.countrystringNo
address.country_codestringNoISO 2-digit country code
emailsCrmEmail[]No
emails[].emailstringNo
emails[].typeenumNoValues: WORK, HOME, OTHER
telephonesCrmTelephone[]No
telephones[].telephonestringYes
telephones[].typeenumNoValues: WORK, HOME, OTHER, FAX, MOBILE
sourcestringNo
statusstringNo
titlestringNoThe job title of the lead
link_urlsstring[]No
metadataCrmMetadata[]NoCustom field values. Include only existing custom fields and only the ones being set; omit to leave them unchanged.
metadata[].idstringNoThe ID of the custom field definition (from the metadata/metadata endpoint).
metadata[].slugstringNoThe integration's API name of an existing custom field (e.g. Region__c in Salesforce). List valid slugs for this object with the metadata/metadata endpoint; unknown slugs are rejected by the integration.
metadata[].valueobjectNoThe field's value, typed by format: DATE as ISO-8601 (YYYY-MM-DD, or YYYY-MM-DDTHH:MM:SSZ for date-times); NUMBER, PRICE and CURRENCY as a number; BOOLEAN and YES_NO as true/false; MULTIPLE_SELECT as an array of option values; otherwise a string.
metadata[].namespacestringNo
metadata[].formatenumNoThe data type of the custom field, which determines how value is formatted. Values: TEXT, NUMBER, DATE, BOOLEAN, FILE, TEXTAREA, SINGLE_SELECT, MULTIPLE_SELECT, MEASUREMENT, PRICE, YES_NO, CURRENCY, URL
metadata[].extra_dataobjectNo

TypeScript

TypeScript
export type CrmLead = {
	id?: string;
	created_at?: string-time; // (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	updated_at?: string-time; // (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	name?: string; // The lead's full name
	first_name?: string;
	last_name?: string;
	user_id?: string; // (reference to HrisEmployee)
	creator_user_id?: string; // (reference to HrisEmployee)
	contact_id?: string; // (reference to CrmContact)
	company_id?: string; // (reference to CrmCompany)
	company_name?: string; // The name of the company the lead works for
	is_active?: boolean;
	address?: {
		address1?: string; 
		address2?: string; 
		city?: string; 
		region?: string; 
		region_code?: string; 
		postal_code?: string; 
		country?: string; 
		country_code?: string; // ISO 2-digit country code 
	};
	emails?: [];
	telephones?: [];
	source?: string;
	status?: string;
	title?: string; // The job title of the lead
	link_urls?: string[];
	metadata?: []; // Custom field values. Include only existing custom fields and only the ones being set; omit to leave them unchanged.
	raw?: any;
} 

Zod

Zod
import { z } from 'zod';

export const ZodCrmLead = z.object({
	id: z.string().optional(),
	created_at: z.string-time().optional().describe("(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	updated_at: z.string-time().optional().describe("(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	name: z.string().optional().describe("The lead's full name"),
	first_name: z.string().optional(),
	last_name: z.string().optional(),
	user_id: z.string().optional().describe("(reference to HrisEmployee)"),
	creator_user_id: z.string().optional().describe("(reference to HrisEmployee)"),
	contact_id: z.string().optional().describe("(reference to CrmContact)"),
	company_id: z.string().optional().describe("(reference to CrmCompany)"),
	company_name: z.string().optional().describe("The name of the company the lead works for"),
	is_active: z.boolean().optional(),
	address: z.object({
			address1: z.string().optional(),
			address2: z.string().optional(),
			city: z.string().optional(),
			region: z.string().optional(),
			region_code: z.string().optional(),
			postal_code: z.string().optional(),
			country: z.string().optional(),
			country_code: z.string().optional().describe("ISO 2-digit country code")
}).optional(),
	emails: z.array().optional(),
	telephones: z.array().optional(),
	source: z.string().optional(),
	status: z.string().optional(),
	title: z.string().optional().describe("The job title of the lead"),
	link_urls: z.array().optional(),
	metadata: z.array().optional().describe("Custom field values. Include only existing custom fields and only the ones being set; omit to leave them unchanged."),

});

Python

Python
import dataclasses

@dataclasses.dataclass
class PropertyCrmLeadAddress:
	address1: Optional[str]
	address2: Optional[str]
	city: Optional[str]
	region: Optional[str]
	region_code: Optional[str]
	postal_code: Optional[str]
	country: Optional[str]
	"""ISO 2-digit country code"""
	country_code: Optional[str]

@dataclasses.dataclass
class CrmLead:
	id: Optional[str]
	"""(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	created_at: Optional[str]
	"""(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	updated_at: Optional[str]
	"""The lead's full name"""
	name: Optional[str]
	first_name: Optional[str]
	last_name: Optional[str]
	"""(reference to HrisEmployee)"""
	user_id: Optional[str]
	"""(reference to HrisEmployee)"""
	creator_user_id: Optional[str]
	"""(reference to CrmContact)"""
	contact_id: Optional[str]
	"""(reference to CrmCompany)"""
	company_id: Optional[str]
	"""The name of the company the lead works for"""
	company_name: Optional[str]
	is_active: Optional[bool]
	address: Optional[PropertyCrmLeadAddress]
	emails: Optional[PropertyCrmLeadEmails]
	telephones: Optional[PropertyCrmLeadTelephones]
	source: Optional[str]
	status: Optional[str]
	"""The job title of the lead"""
	title: Optional[str]
	link_urls: Optional[List[List[str]]]
	"""Custom field values. Include only existing custom fields and only the ones being set; omit to leave them unchanged."""
	metadata: Optional[PropertyCrmLeadMetadata]
Are we missing anything? Let us know
Was this page helpful?