This API creates or updates contacts and entities in your CRM system. It automatically handles B2C and B2B modes, validates data against your organization settings, and provides comprehensive field mapping for developers. The API will create new records or update existing ones based on email matching.
💡 Pro Tip
Force an error by omitting the first_name or email field from the API call to see full field map and required fields. This is extremely helpful for understanding all available fields and their requirements before making successful API calls.
Request Endpoint: https://app.zyntrohq.com/apis/public/createContact.php
Request Method: POST
Request Payload:
{
"api_key": "your_zyntro_api_key",
"org_id": "your_organization_id",
"member_id": "your_member_id",
"email": "[email protected]",
"first_name": "John",
"last_name": "Doe",
"full_name": "John Doe",
"salutation": "Mr",
"contact_status": "Active",
"contact_source": "Website Form",
"contact_role_label": "Decision Maker",
"contact_stage_id": "stage_id_123",
"contact_owner": "member_id_456",
"entity_name": "Acme Corporation",
"entity_label": "Company",
"entity_status": "Active",
"entity_location": "New York, NY",
"entity_website": "https://acme.com",
"entity_tags": ["enterprise", "technology"],
"entity_socials": {
"linkedin": "https://linkedin.com/company/acme",
"twitter": "https://twitter.com/acme"
},
"secondary_email": "[email protected]",
"secondary_phone": "+1-555-0123",
"address": "123 Business St",
"address_line2": "Suite 100",
"city": "New York",
"state": "NY",
"zip": "10001",
"country": "United States",
"country_code": "US",
"timezone": "America/New_York",
"is_test_contact": 0,
"do_not_call": 0,
"do_not_automate": 0,
"email_verified": 1,
"phone_verified": 0,
"auto_engage": 1,
"email_optout": 0,
"sms_optout": 0,
"visible_to_others": 1,
"editable_by_others": 1
}Success Response (JSON):
{
"status": "success",
"data": {
"contact_id": "contact_unique_id",
"entity_id": "entity_unique_id"
},
"log": "Contact does not exist. Data will be inserted, Inserted new entity, Inserted new contact"
}Error Response (JSON):
{
"status": "error",
"data": [
"Required field first_name is missing",
"Required field email is missing"
],
"debug": [
"Contact does not exist. Data will be inserted"
],
"required_fields": [
"api_key",
"org_id",
"member_id",
"email",
"first_name",
"contact_status",
"contact_source",
"contact_stage_id",
"entity_name",
"entity_label",
"entity_status"
],
"field_map": {
"email": {
"required": true,
"internal_field": "cont_primary_email",
"type": "string",
"description": "Email address of the contact"
},
"first_name": {
"required": true,
"internal_field": "cont_fname",
"type": "string",
"description": "First name of the contact"
}
}
}Required Fields:
- api_key: Zyntro API authentication key
- org_id: Organization identifier (UUID format)
- member_id: Member identifier (UUID format)
- email: Contact's primary email address
- first_name: Contact's first name
- contact_status: Contact status (must match organization settings)
- contact_source: Contact source (must match organization settings)
- contact_stage_id: Pipeline stage ID (auto-assigned if not provided)
B2B Required Fields (when CRM mode is not 'b2c'):
- entity_name: Name of the entity/company
- entity_label: Entity label (must match organization settings)
- entity_status: Entity status (must match organization settings)
Optional Contact Fields:
- last_name: Contact's last name
- full_name: Contact's full name
- salutation: Salutation (Mr, Mrs, Ms, Dr, Prof, etc.)
- contact_role_label: Contact role (Decision Maker, Supporter, Influencer, Other)
- contact_owner: Member ID of contact owner (defaults to member_id)
- secondary_email: Secondary email address
- secondary_phone: Secondary phone number
- address: Street address
- address_line2: Address line 2
- city: City
- state: State or province
- zip: Zip/postal code
- country: Country name
- country_code: ISO2 country code
- timezone: IANA timezone (e.g., America/New_York)
- is_test_contact: Boolean (0/1) - Is this a test contact
- do_not_call: Boolean (0/1) - Do not call
- do_not_automate: Boolean (0/1) - Do not automate
- email_verified: Boolean (0/1) - Email verified
- phone_verified: Boolean (0/1) - Phone verified
- auto_engage: Boolean (0/1) - Auto engage
- email_optout: Boolean (0/1) - Email opt-out
- sms_optout: Boolean (0/1) - SMS opt-out
- visible_to_others: Boolean (0/1) - Visible to others
- editable_by_others: Boolean (0/1) - Editable by others
Optional Entity Fields (B2B Mode Only):
- entity_location: Entity location
- entity_website: Entity website URL
- entity_tags: Array of entity tags
- entity_socials: Object with social media channels and URLs
- entity_logo: URL for entity logo
- entity_profile: JSON object for entity profile
- entity_score: Float value between 0-100 for entity scoring
Custom Fields:
- Custom fields are dynamically added based on your organization's configuration
- Each custom field includes field tag, type, required status, and description
- Custom fields can be associated with either contacts or entities
- Use the fetchCRMFieldHeaders API to get available custom fields
Notes:
- This is a public API and requires an API Key. You can get your API Key from inside your Zyntro Account under Me > API Keys
- Ensure that the api_key, org_id, and member_id are valid and correspond to your Zyntro account credentials
- The org_id should correspond to an existing organization within your account
- The member_id should correspond to an existing member within the organization
- Organization must be active and have CRM settings configured
- Contact status, contact source, entity labels, and entity status must match your organization's configured values
- If contact_stage_id is not provided, the first stage of your pipeline will be automatically assigned
- Use fetchPipelineStages API to get available stage IDs
- Use fetchCRMFieldHeaders API to get available custom fields and their requirements
- On error, the API returns a complete field map with all available fields and their requirements
- The API automatically handles duplicate detection based on email address
- Entity fields are only required when CRM mode is not 'b2c'