Create a new contact
curl --request POST \
--url https://app.closerx.ai/api/v2/contact/ \
--header 'Company-Name: <company-name>' \
--header 'Content-Type: application/json' \
--header 'api_key: <api-key>' \
--data '
{
"first_name": "Amandeep (testingg)",
"last_name": "Singhh",
"contact_number": "+919999728776",
"id": "",
"email": "amanhxe@gmal.com",
"company_name": "softvel",
"industry": "IT",
"custom1": null,
"custom2": null,
"custom3": null,
"custom4": null,
"tags": [
{
"tag_name": "agent_hangup"
}
]
}
'import requests
url = "https://app.closerx.ai/api/v2/contact/"
payload = {
"first_name": "Amandeep (testingg)",
"last_name": "Singhh",
"contact_number": "+919999728776",
"id": "",
"email": "amanhxe@gmal.com",
"company_name": "softvel",
"industry": "IT",
"custom1": None,
"custom2": None,
"custom3": None,
"custom4": None,
"tags": [{ "tag_name": "agent_hangup" }]
}
headers = {
"Company-Name": "<company-name>",
"api_key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Company-Name': '<company-name>',
api_key: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
first_name: 'Amandeep (testingg)',
last_name: 'Singhh',
contact_number: '+919999728776',
id: '',
email: 'amanhxe@gmal.com',
company_name: 'softvel',
industry: 'IT',
custom1: null,
custom2: null,
custom3: null,
custom4: null,
tags: [{tag_name: 'agent_hangup'}]
})
};
fetch('https://app.closerx.ai/api/v2/contact/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.closerx.ai/api/v2/contact/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'first_name' => 'Amandeep (testingg)',
'last_name' => 'Singhh',
'contact_number' => '+919999728776',
'id' => '',
'email' => 'amanhxe@gmal.com',
'company_name' => 'softvel',
'industry' => 'IT',
'custom1' => null,
'custom2' => null,
'custom3' => null,
'custom4' => null,
'tags' => [
[
'tag_name' => 'agent_hangup'
]
]
]),
CURLOPT_HTTPHEADER => [
"Company-Name: <company-name>",
"Content-Type: application/json",
"api_key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.closerx.ai/api/v2/contact/"
payload := strings.NewReader("{\n \"first_name\": \"Amandeep (testingg)\",\n \"last_name\": \"Singhh\",\n \"contact_number\": \"+919999728776\",\n \"id\": \"\",\n \"email\": \"amanhxe@gmal.com\",\n \"company_name\": \"softvel\",\n \"industry\": \"IT\",\n \"custom1\": null,\n \"custom2\": null,\n \"custom3\": null,\n \"custom4\": null,\n \"tags\": [\n {\n \"tag_name\": \"agent_hangup\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Company-Name", "<company-name>")
req.Header.Add("api_key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.closerx.ai/api/v2/contact/")
.header("Company-Name", "<company-name>")
.header("api_key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"first_name\": \"Amandeep (testingg)\",\n \"last_name\": \"Singhh\",\n \"contact_number\": \"+919999728776\",\n \"id\": \"\",\n \"email\": \"amanhxe@gmal.com\",\n \"company_name\": \"softvel\",\n \"industry\": \"IT\",\n \"custom1\": null,\n \"custom2\": null,\n \"custom3\": null,\n \"custom4\": null,\n \"tags\": [\n {\n \"tag_name\": \"agent_hangup\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.closerx.ai/api/v2/contact/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Company-Name"] = '<company-name>'
request["api_key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"first_name\": \"Amandeep (testingg)\",\n \"last_name\": \"Singhh\",\n \"contact_number\": \"+919999728776\",\n \"id\": \"\",\n \"email\": \"amanhxe@gmal.com\",\n \"company_name\": \"softvel\",\n \"industry\": \"IT\",\n \"custom1\": null,\n \"custom2\": null,\n \"custom3\": null,\n \"custom4\": null,\n \"tags\": [\n {\n \"tag_name\": \"agent_hangup\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Success",
"data": {
"id": 4503,
"contact_number": "+919999728776",
"email": "amanhxe@gmal.com",
"first_name": "Amandeep (testingg)",
"last_name": "Singhh",
"company_name": "softvel",
"industry": "IT",
"custom1": null,
"custom2": null,
"custom3": null,
"custom4": null,
"isactive": true,
"address": null,
"contact_id": null,
"tags": [
{
"id": 14,
"tag_name": "agent_hangup"
}
]
}
}{
"success": true,
"message": "<string>",
"data": {}
}Contact
Add Contact
Creates a new contact with personal, company, and tag information.
POST
/
v2
/
contact
/
Create a new contact
curl --request POST \
--url https://app.closerx.ai/api/v2/contact/ \
--header 'Company-Name: <company-name>' \
--header 'Content-Type: application/json' \
--header 'api_key: <api-key>' \
--data '
{
"first_name": "Amandeep (testingg)",
"last_name": "Singhh",
"contact_number": "+919999728776",
"id": "",
"email": "amanhxe@gmal.com",
"company_name": "softvel",
"industry": "IT",
"custom1": null,
"custom2": null,
"custom3": null,
"custom4": null,
"tags": [
{
"tag_name": "agent_hangup"
}
]
}
'import requests
url = "https://app.closerx.ai/api/v2/contact/"
payload = {
"first_name": "Amandeep (testingg)",
"last_name": "Singhh",
"contact_number": "+919999728776",
"id": "",
"email": "amanhxe@gmal.com",
"company_name": "softvel",
"industry": "IT",
"custom1": None,
"custom2": None,
"custom3": None,
"custom4": None,
"tags": [{ "tag_name": "agent_hangup" }]
}
headers = {
"Company-Name": "<company-name>",
"api_key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Company-Name': '<company-name>',
api_key: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
first_name: 'Amandeep (testingg)',
last_name: 'Singhh',
contact_number: '+919999728776',
id: '',
email: 'amanhxe@gmal.com',
company_name: 'softvel',
industry: 'IT',
custom1: null,
custom2: null,
custom3: null,
custom4: null,
tags: [{tag_name: 'agent_hangup'}]
})
};
fetch('https://app.closerx.ai/api/v2/contact/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.closerx.ai/api/v2/contact/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'first_name' => 'Amandeep (testingg)',
'last_name' => 'Singhh',
'contact_number' => '+919999728776',
'id' => '',
'email' => 'amanhxe@gmal.com',
'company_name' => 'softvel',
'industry' => 'IT',
'custom1' => null,
'custom2' => null,
'custom3' => null,
'custom4' => null,
'tags' => [
[
'tag_name' => 'agent_hangup'
]
]
]),
CURLOPT_HTTPHEADER => [
"Company-Name: <company-name>",
"Content-Type: application/json",
"api_key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.closerx.ai/api/v2/contact/"
payload := strings.NewReader("{\n \"first_name\": \"Amandeep (testingg)\",\n \"last_name\": \"Singhh\",\n \"contact_number\": \"+919999728776\",\n \"id\": \"\",\n \"email\": \"amanhxe@gmal.com\",\n \"company_name\": \"softvel\",\n \"industry\": \"IT\",\n \"custom1\": null,\n \"custom2\": null,\n \"custom3\": null,\n \"custom4\": null,\n \"tags\": [\n {\n \"tag_name\": \"agent_hangup\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Company-Name", "<company-name>")
req.Header.Add("api_key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.closerx.ai/api/v2/contact/")
.header("Company-Name", "<company-name>")
.header("api_key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"first_name\": \"Amandeep (testingg)\",\n \"last_name\": \"Singhh\",\n \"contact_number\": \"+919999728776\",\n \"id\": \"\",\n \"email\": \"amanhxe@gmal.com\",\n \"company_name\": \"softvel\",\n \"industry\": \"IT\",\n \"custom1\": null,\n \"custom2\": null,\n \"custom3\": null,\n \"custom4\": null,\n \"tags\": [\n {\n \"tag_name\": \"agent_hangup\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.closerx.ai/api/v2/contact/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Company-Name"] = '<company-name>'
request["api_key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"first_name\": \"Amandeep (testingg)\",\n \"last_name\": \"Singhh\",\n \"contact_number\": \"+919999728776\",\n \"id\": \"\",\n \"email\": \"amanhxe@gmal.com\",\n \"company_name\": \"softvel\",\n \"industry\": \"IT\",\n \"custom1\": null,\n \"custom2\": null,\n \"custom3\": null,\n \"custom4\": null,\n \"tags\": [\n {\n \"tag_name\": \"agent_hangup\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Success",
"data": {
"id": 4503,
"contact_number": "+919999728776",
"email": "amanhxe@gmal.com",
"first_name": "Amandeep (testingg)",
"last_name": "Singhh",
"company_name": "softvel",
"industry": "IT",
"custom1": null,
"custom2": null,
"custom3": null,
"custom4": null,
"isactive": true,
"address": null,
"contact_id": null,
"tags": [
{
"id": 14,
"tag_name": "agent_hangup"
}
]
}
}{
"success": true,
"message": "<string>",
"data": {}
}Authorizations
Headers
The schema name for multi-tenancy
Body
application/json
Example:
"Amandeep (testingg)"
Example:
"Singhh"
Example:
"+919999728776"
Example:
""
Example:
"amanhxe@gmal.com"
Example:
"softvel"
Example:
"IT"
Example:
null
Example:
null
Example:
null
Example:
null
Show child attributes
Show child attributes
⌘I
