Skip to main content
POST
/
api
/
v1
/
listings
Create a new listing with rule and bulk contacts
curl --request POST \
  --url https://{subdomain}.mihu.ai/api/v1/listings \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "My Call List",
  "agent_uuid": "550e8400-e29b-41d4-a716-446655440000",
  "contacts": [
    {
      "name": "John",
      "surname": "Doe",
      "phone_number": "+1234567890",
      "email": "john@example.com",
      "timezone": "America/New_York",
      "country_code": "US",
      "primary_language": "en",
      "preferred_contact_time": "morning",
      "preferred_contact_channel": "whatsapp",
      "company": "Acme Corp",
      "city": "New York",
      "lead_source": "website",
      "notes": "VIP customer"
    }
  ],
  "description": "<string>",
  "campaign_type": "call",
  "start_date": "2026-02-22",
  "end_date": "2026-03-22",
  "contact_template_setting_id": 123,
  "rule": {
    "uuid": "<string>",
    "name": "Default Rule",
    "max_calls_per_day": 3,
    "max_total_calls": 10,
    "retry_interval_minutes": 120,
    "start_time": "09:00",
    "end_time": "18:00",
    "type": "call"
  },
  "auto_start": true
}
'
import requests

url = "https://{subdomain}.mihu.ai/api/v1/listings"

payload = {
"name": "My Call List",
"agent_uuid": "550e8400-e29b-41d4-a716-446655440000",
"contacts": [
{
"name": "John",
"surname": "Doe",
"phone_number": "+1234567890",
"email": "john@example.com",
"timezone": "America/New_York",
"country_code": "US",
"primary_language": "en",
"preferred_contact_time": "morning",
"preferred_contact_channel": "whatsapp",
"company": "Acme Corp",
"city": "New York",
"lead_source": "website",
"notes": "VIP customer"
}
],
"description": "<string>",
"campaign_type": "call",
"start_date": "2026-02-22",
"end_date": "2026-03-22",
"contact_template_setting_id": 123,
"rule": {
"uuid": "<string>",
"name": "Default Rule",
"max_calls_per_day": 3,
"max_total_calls": 10,
"retry_interval_minutes": 120,
"start_time": "09:00",
"end_time": "18:00",
"type": "call"
},
"auto_start": True
}
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({
name: 'My Call List',
agent_uuid: '550e8400-e29b-41d4-a716-446655440000',
contacts: [
{
name: 'John',
surname: 'Doe',
phone_number: '+1234567890',
email: 'john@example.com',
timezone: 'America/New_York',
country_code: 'US',
primary_language: 'en',
preferred_contact_time: 'morning',
preferred_contact_channel: 'whatsapp',
company: 'Acme Corp',
city: 'New York',
lead_source: 'website',
notes: 'VIP customer'
}
],
description: '<string>',
campaign_type: 'call',
start_date: '2026-02-22',
end_date: '2026-03-22',
contact_template_setting_id: 123,
rule: {
uuid: '<string>',
name: 'Default Rule',
max_calls_per_day: 3,
max_total_calls: 10,
retry_interval_minutes: 120,
start_time: '09:00',
end_time: '18:00',
type: 'call'
},
auto_start: true
})
};

fetch('https://{subdomain}.mihu.ai/api/v1/listings', 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",
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([
'name' => 'My Call List',
'agent_uuid' => '550e8400-e29b-41d4-a716-446655440000',
'contacts' => [
[
'name' => 'John',
'surname' => 'Doe',
'phone_number' => '+1234567890',
'email' => 'john@example.com',
'timezone' => 'America/New_York',
'country_code' => 'US',
'primary_language' => 'en',
'preferred_contact_time' => 'morning',
'preferred_contact_channel' => 'whatsapp',
'company' => 'Acme Corp',
'city' => 'New York',
'lead_source' => 'website',
'notes' => 'VIP customer'
]
],
'description' => '<string>',
'campaign_type' => 'call',
'start_date' => '2026-02-22',
'end_date' => '2026-03-22',
'contact_template_setting_id' => 123,
'rule' => [
'uuid' => '<string>',
'name' => 'Default Rule',
'max_calls_per_day' => 3,
'max_total_calls' => 10,
'retry_interval_minutes' => 120,
'start_time' => '09:00',
'end_time' => '18:00',
'type' => 'call'
],
'auto_start' => true
]),
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"

payload := strings.NewReader("{\n \"name\": \"My Call List\",\n \"agent_uuid\": \"550e8400-e29b-41d4-a716-446655440000\",\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 \"preferred_contact_time\": \"morning\",\n \"preferred_contact_channel\": \"whatsapp\",\n \"company\": \"Acme Corp\",\n \"city\": \"New York\",\n \"lead_source\": \"website\",\n \"notes\": \"VIP customer\"\n }\n ],\n \"description\": \"<string>\",\n \"campaign_type\": \"call\",\n \"start_date\": \"2026-02-22\",\n \"end_date\": \"2026-03-22\",\n \"contact_template_setting_id\": 123,\n \"rule\": {\n \"uuid\": \"<string>\",\n \"name\": \"Default Rule\",\n \"max_calls_per_day\": 3,\n \"max_total_calls\": 10,\n \"retry_interval_minutes\": 120,\n \"start_time\": \"09:00\",\n \"end_time\": \"18:00\",\n \"type\": \"call\"\n },\n \"auto_start\": true\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")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"My Call List\",\n \"agent_uuid\": \"550e8400-e29b-41d4-a716-446655440000\",\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 \"preferred_contact_time\": \"morning\",\n \"preferred_contact_channel\": \"whatsapp\",\n \"company\": \"Acme Corp\",\n \"city\": \"New York\",\n \"lead_source\": \"website\",\n \"notes\": \"VIP customer\"\n }\n ],\n \"description\": \"<string>\",\n \"campaign_type\": \"call\",\n \"start_date\": \"2026-02-22\",\n \"end_date\": \"2026-03-22\",\n \"contact_template_setting_id\": 123,\n \"rule\": {\n \"uuid\": \"<string>\",\n \"name\": \"Default Rule\",\n \"max_calls_per_day\": 3,\n \"max_total_calls\": 10,\n \"retry_interval_minutes\": 120,\n \"start_time\": \"09:00\",\n \"end_time\": \"18:00\",\n \"type\": \"call\"\n },\n \"auto_start\": true\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://{subdomain}.mihu.ai/api/v1/listings")

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 \"name\": \"My Call List\",\n \"agent_uuid\": \"550e8400-e29b-41d4-a716-446655440000\",\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 \"preferred_contact_time\": \"morning\",\n \"preferred_contact_channel\": \"whatsapp\",\n \"company\": \"Acme Corp\",\n \"city\": \"New York\",\n \"lead_source\": \"website\",\n \"notes\": \"VIP customer\"\n }\n ],\n \"description\": \"<string>\",\n \"campaign_type\": \"call\",\n \"start_date\": \"2026-02-22\",\n \"end_date\": \"2026-03-22\",\n \"contact_template_setting_id\": 123,\n \"rule\": {\n \"uuid\": \"<string>\",\n \"name\": \"Default Rule\",\n \"max_calls_per_day\": 3,\n \"max_total_calls\": 10,\n \"retry_interval_minutes\": 120,\n \"start_time\": \"09:00\",\n \"end_time\": \"18:00\",\n \"type\": \"call\"\n },\n \"auto_start\": true\n}"

response = http.request(request)
puts response.read_body

Authorizations

Authorization
string
header
required

Use a Bearer token to access these API endpoints. Example: "Bearer {your-token}"

Body

application/json
name
string
required
Example:

"My Call List"

agent_uuid
string<uuid>
required

Agent UUID. The channel binding (agent_app) is resolved automatically from the agent's first configured channel.

Example:

"550e8400-e29b-41d4-a716-446655440000"

contacts
object[]
required

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.

description
string | null
campaign_type
enum<string>
Available options:
call,
text
Example:

"call"

start_date
string<date>
Example:

"2026-02-22"

end_date
string<date>
Example:

"2026-03-22"

contact_template_setting_id
integer | null
rule
object
auto_start
boolean

Auto-create tasks and start campaign

Example:

true

Response

Created