curl --request POST \
--url https://api.clinikehr.com/v1/clinics/{clinic_id}/crm/contacts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"owner_staff_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"phone": "<string>",
"company": "<string>",
"pipeline_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stage_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": "<string>",
"referral_source_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"interest": "<string>",
"desired_service_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"desired_provider_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"estimated_value_cents": 123,
"marketing_opt_in": true,
"sms_opt_in": true,
"tags": [
"<string>"
],
"custom_fields": {}
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
owner_staff_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
first_name: '<string>',
last_name: '<string>',
email: '<string>',
phone: '<string>',
company: '<string>',
pipeline_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
stage_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
source: '<string>',
referral_source_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
interest: '<string>',
desired_service_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
desired_provider_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
estimated_value_cents: 123,
marketing_opt_in: true,
sms_opt_in: true,
tags: ['<string>'],
custom_fields: {}
})
};
fetch('https://api.clinikehr.com/v1/clinics/{clinic_id}/crm/contacts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.clinikehr.com/v1/clinics/{clinic_id}/crm/contacts"
payload = {
"owner_staff_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"phone": "<string>",
"company": "<string>",
"pipeline_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stage_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": "<string>",
"referral_source_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"interest": "<string>",
"desired_service_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"desired_provider_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"estimated_value_cents": 123,
"marketing_opt_in": True,
"sms_opt_in": True,
"tags": ["<string>"],
"custom_fields": {}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"owner_staff_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"record_type": "lead",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"phone": "<string>",
"company": "<string>",
"lifecycle_stage": "lead",
"pipeline_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stage_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"source": "<string>",
"referral_source_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"referred_by_contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"interest": "<string>",
"desired_service_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"desired_provider_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"estimated_value_cents": 123,
"currency": "<string>",
"priority": "low",
"score": 123,
"marketing_opt_in": true,
"sms_opt_in": true,
"consent_at": "2023-11-07T05:31:56Z",
"consent_source": "<string>",
"do_not_contact": true,
"unsubscribed_at": "2023-11-07T05:31:56Z",
"tags": [
"<string>"
],
"custom_fields": {},
"converted_patient_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"converted_at": "2023-11-07T05:31:56Z",
"lost_reason": "<string>",
"last_activity_at": "2023-11-07T05:31:56Z",
"next_task_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}Create a contact
Permission: crm.contacts:write Create a CRM contact. Never starts outreach. Mirrors db/actions/crm.ts createCrmContact’s own validation, defaults, and default-pipeline/stage resolution. is_email_domain_blocked is checked server-side on any email. Both crm_contacts outreach triggers (an Agent Studio automation, a marketing-journey enrollment) are suppressed unconditionally for this write.
curl --request POST \
--url https://api.clinikehr.com/v1/clinics/{clinic_id}/crm/contacts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"owner_staff_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"phone": "<string>",
"company": "<string>",
"pipeline_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stage_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": "<string>",
"referral_source_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"interest": "<string>",
"desired_service_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"desired_provider_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"estimated_value_cents": 123,
"marketing_opt_in": true,
"sms_opt_in": true,
"tags": [
"<string>"
],
"custom_fields": {}
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
owner_staff_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
first_name: '<string>',
last_name: '<string>',
email: '<string>',
phone: '<string>',
company: '<string>',
pipeline_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
stage_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
source: '<string>',
referral_source_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
interest: '<string>',
desired_service_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
desired_provider_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
estimated_value_cents: 123,
marketing_opt_in: true,
sms_opt_in: true,
tags: ['<string>'],
custom_fields: {}
})
};
fetch('https://api.clinikehr.com/v1/clinics/{clinic_id}/crm/contacts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.clinikehr.com/v1/clinics/{clinic_id}/crm/contacts"
payload = {
"owner_staff_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"phone": "<string>",
"company": "<string>",
"pipeline_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stage_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": "<string>",
"referral_source_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"interest": "<string>",
"desired_service_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"desired_provider_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"estimated_value_cents": 123,
"marketing_opt_in": True,
"sms_opt_in": True,
"tags": ["<string>"],
"custom_fields": {}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"owner_staff_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"record_type": "lead",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"phone": "<string>",
"company": "<string>",
"lifecycle_stage": "lead",
"pipeline_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stage_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"source": "<string>",
"referral_source_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"referred_by_contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"interest": "<string>",
"desired_service_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"desired_provider_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"estimated_value_cents": 123,
"currency": "<string>",
"priority": "low",
"score": 123,
"marketing_opt_in": true,
"sms_opt_in": true,
"consent_at": "2023-11-07T05:31:56Z",
"consent_source": "<string>",
"do_not_contact": true,
"unsubscribed_at": "2023-11-07T05:31:56Z",
"tags": [
"<string>"
],
"custom_fields": {},
"converted_patient_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"converted_at": "2023-11-07T05:31:56Z",
"lost_reason": "<string>",
"last_activity_at": "2023-11-07T05:31:56Z",
"next_task_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
A unique value you choose for this request, such as a UUID. Sending the same key again returns the first answer instead of doing the work twice, so a timed-out request is safe to retry. Reusing a key for a different request is refused with 409 idempotency_key_conflict, and retrying while the first request is still running with 409 idempotency_key_reused. See Retries and idempotency.
1Path Parameters
Body
lead, prospect, waitlist, referral, contact lead, inquiry, prospect, waitlist, customer, lost low, normal, high Response
OK.
Withheld, by NAME: clinic_id (implicit in the path), unsubscribe_token, migrated_from_patient_id, custom_color, created_by, confirmed_opt_in_at, marketing_authorization_id.
Show child attributes
Show child attributes