curl --request POST \
--url https://api.salescaptain.com/v1/create-contact \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"company_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"contact_name": "John Doe",
"contact_phone": "+14155551234",
"contact_email": "[email protected]"
}
'{
"message": "Contact created successfully!",
"contact": {
"data": {
"contact_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"name": "John Doe",
"phone": "+14155551234",
"email": "[email protected]",
"conversation_id": "c8b7a6d5-e4f3-2c1b-0a9e-8d7c6b5a4f3e",
"created_at": "2024-03-13T10:30:00.000Z",
"updated_at": "2024-03-13T10:30:00.000Z",
"custom_fields": [
{
"cf_name": "Industry",
"cf_value": "Technology"
},
{
"cf_name": "Budget",
"cf_value": "50000"
}
]
}
}
}Contacts
Create contact
Creates a new contact for a specific company. At least one of contact_phone or contact_email must be provided. User must have ‘contacts’ access role to create contacts.
POST
/
v1
/
create-contact
curl --request POST \
--url https://api.salescaptain.com/v1/create-contact \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"company_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"contact_name": "John Doe",
"contact_phone": "+14155551234",
"contact_email": "[email protected]"
}
'{
"message": "Contact created successfully!",
"contact": {
"data": {
"contact_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"name": "John Doe",
"phone": "+14155551234",
"email": "[email protected]",
"conversation_id": "c8b7a6d5-e4f3-2c1b-0a9e-8d7c6b5a4f3e",
"created_at": "2024-03-13T10:30:00.000Z",
"updated_at": "2024-03-13T10:30:00.000Z",
"custom_fields": [
{
"cf_name": "Industry",
"cf_value": "Technology"
},
{
"cf_name": "Budget",
"cf_value": "50000"
}
]
}
}
}Authorizations
Authentication token required for accessing protected endpoints. The token should be obtained from the main SalesCaptain authentication service.
Body
application/json
Unique identifier for the company
Example:
"a1b2c3d4-e5f6-7890-abcd-ef1234567890"
Full name of the contact
Example:
"John Doe"
Phone number of the contact (required if no email provided)
Example:
"+14155551234"
Email address of the contact (required if no phone provided)
Example:
Optional list of custom fields to set for the contact
Show child attributes
Show child attributes

