Add contacts to an existing listing
curl --request POST \
--url https://{subdomain}.mihu.ai/api/v1/listings/{uuid}/contacts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"contacts": [
{
"name": "John",
"surname": "Doe",
"phone_number": "+1234567890",
"email": "john@example.com",
"timezone": "America/New_York",
"country_code": "US",
"primary_language": "en",
"company": "Acme Corp",
"city": "New York",
"lead_source": "website"
}
]
}
'import requests
url = "https://{subdomain}.mihu.ai/api/v1/listings/{uuid}/contacts"
payload = { "contacts": [
{
"name": "John",
"surname": "Doe",
"phone_number": "+1234567890",
"email": "john@example.com",
"timezone": "America/New_York",
"country_code": "US",
"primary_language": "en",
"company": "Acme Corp",
"city": "New York",
"lead_source": "website"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
contacts: [
{
name: 'John',
surname: 'Doe',
phone_number: '+1234567890',
email: 'john@example.com',
timezone: 'America/New_York',
country_code: 'US',
primary_language: 'en',
company: 'Acme Corp',
city: 'New York',
lead_source: 'website'
}
]
})
};
fetch('https://{subdomain}.mihu.ai/api/v1/listings/{uuid}/contacts', 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://{subdomain}.mihu.ai/api/v1/listings/{uuid}/contacts",
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([
'contacts' => [
[
'name' => 'John',
'surname' => 'Doe',
'phone_number' => '+1234567890',
'email' => 'john@example.com',
'timezone' => 'America/New_York',
'country_code' => 'US',
'primary_language' => 'en',
'company' => 'Acme Corp',
'city' => 'New York',
'lead_source' => 'website'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://{subdomain}.mihu.ai/api/v1/listings/{uuid}/contacts"
payload := strings.NewReader("{\n \"contacts\": [\n {\n \"name\": \"John\",\n \"surname\": \"Doe\",\n \"phone_number\": \"+1234567890\",\n \"email\": \"john@example.com\",\n \"timezone\": \"America/New_York\",\n \"country_code\": \"US\",\n \"primary_language\": \"en\",\n \"company\": \"Acme Corp\",\n \"city\": \"New York\",\n \"lead_source\": \"website\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://{subdomain}.mihu.ai/api/v1/listings/{uuid}/contacts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"contacts\": [\n {\n \"name\": \"John\",\n \"surname\": \"Doe\",\n \"phone_number\": \"+1234567890\",\n \"email\": \"john@example.com\",\n \"timezone\": \"America/New_York\",\n \"country_code\": \"US\",\n \"primary_language\": \"en\",\n \"company\": \"Acme Corp\",\n \"city\": \"New York\",\n \"lead_source\": \"website\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.mihu.ai/api/v1/listings/{uuid}/contacts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"contacts\": [\n {\n \"name\": \"John\",\n \"surname\": \"Doe\",\n \"phone_number\": \"+1234567890\",\n \"email\": \"john@example.com\",\n \"timezone\": \"America/New_York\",\n \"country_code\": \"US\",\n \"primary_language\": \"en\",\n \"company\": \"Acme Corp\",\n \"city\": \"New York\",\n \"lead_source\": \"website\"\n }\n ]\n}"
response = http.request(request)
puts response.read_bodyListings
Add contacts to an existing listing
Adds one or more contacts to the listing’s pool. Existing contacts are matched by phone number first, then email; matched contacts are updated, and new contacts are created. Additional fields are stored as custom contact fields. If the listing is running, tasks are created for newly added eligible contacts.
POST
/
api
/
v1
/
listings
/
{uuid}
/
contacts
Add contacts to an existing listing
curl --request POST \
--url https://{subdomain}.mihu.ai/api/v1/listings/{uuid}/contacts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"contacts": [
{
"name": "John",
"surname": "Doe",
"phone_number": "+1234567890",
"email": "john@example.com",
"timezone": "America/New_York",
"country_code": "US",
"primary_language": "en",
"company": "Acme Corp",
"city": "New York",
"lead_source": "website"
}
]
}
'import requests
url = "https://{subdomain}.mihu.ai/api/v1/listings/{uuid}/contacts"
payload = { "contacts": [
{
"name": "John",
"surname": "Doe",
"phone_number": "+1234567890",
"email": "john@example.com",
"timezone": "America/New_York",
"country_code": "US",
"primary_language": "en",
"company": "Acme Corp",
"city": "New York",
"lead_source": "website"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
contacts: [
{
name: 'John',
surname: 'Doe',
phone_number: '+1234567890',
email: 'john@example.com',
timezone: 'America/New_York',
country_code: 'US',
primary_language: 'en',
company: 'Acme Corp',
city: 'New York',
lead_source: 'website'
}
]
})
};
fetch('https://{subdomain}.mihu.ai/api/v1/listings/{uuid}/contacts', 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://{subdomain}.mihu.ai/api/v1/listings/{uuid}/contacts",
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([
'contacts' => [
[
'name' => 'John',
'surname' => 'Doe',
'phone_number' => '+1234567890',
'email' => 'john@example.com',
'timezone' => 'America/New_York',
'country_code' => 'US',
'primary_language' => 'en',
'company' => 'Acme Corp',
'city' => 'New York',
'lead_source' => 'website'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://{subdomain}.mihu.ai/api/v1/listings/{uuid}/contacts"
payload := strings.NewReader("{\n \"contacts\": [\n {\n \"name\": \"John\",\n \"surname\": \"Doe\",\n \"phone_number\": \"+1234567890\",\n \"email\": \"john@example.com\",\n \"timezone\": \"America/New_York\",\n \"country_code\": \"US\",\n \"primary_language\": \"en\",\n \"company\": \"Acme Corp\",\n \"city\": \"New York\",\n \"lead_source\": \"website\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://{subdomain}.mihu.ai/api/v1/listings/{uuid}/contacts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"contacts\": [\n {\n \"name\": \"John\",\n \"surname\": \"Doe\",\n \"phone_number\": \"+1234567890\",\n \"email\": \"john@example.com\",\n \"timezone\": \"America/New_York\",\n \"country_code\": \"US\",\n \"primary_language\": \"en\",\n \"company\": \"Acme Corp\",\n \"city\": \"New York\",\n \"lead_source\": \"website\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.mihu.ai/api/v1/listings/{uuid}/contacts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"contacts\": [\n {\n \"name\": \"John\",\n \"surname\": \"Doe\",\n \"phone_number\": \"+1234567890\",\n \"email\": \"john@example.com\",\n \"timezone\": \"America/New_York\",\n \"country_code\": \"US\",\n \"primary_language\": \"en\",\n \"company\": \"Acme Corp\",\n \"city\": \"New York\",\n \"lead_source\": \"website\"\n }\n ]\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Use a Bearer token to access these API endpoints. Example: "Bearer {your-token}"
Path Parameters
Body
application/json
Contacts to add. Matched by phone_number (priority 1) then email (priority 2). If found, existing contact is updated with new data; otherwise a new contact is created.
Show child attributes
Show child attributes
Response
Success
⌘I
