Customers
Create Customer
Creates a customer. first_name and phone are required.
POST
/
api
/
v1
/
contacts
Create Customer
curl --request POST \
--url https://app.chatflows.io/api/v1/contacts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"first_name": "Jane",
"last_name": "Doe",
"phone": "+919876543210",
"email": "[email protected]",
"type": "lead",
"contact_status_id": 1,
"contact_source_id": 1,
"is_active": true,
"group_ids": [
1
],
"label_ids": [
1
],
"custom_fields": {
"company": "Acme"
}
}
'import requests
url = "https://app.chatflows.io/api/v1/contacts"
payload = {
"first_name": "Jane",
"last_name": "Doe",
"phone": "+919876543210",
"email": "[email protected]",
"type": "lead",
"contact_status_id": 1,
"contact_source_id": 1,
"is_active": True,
"group_ids": [1],
"label_ids": [1],
"custom_fields": { "company": "Acme" }
}
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({
first_name: 'Jane',
last_name: 'Doe',
phone: '+919876543210',
email: '[email protected]',
type: 'lead',
contact_status_id: 1,
contact_source_id: 1,
is_active: true,
group_ids: [1],
label_ids: [1],
custom_fields: {company: 'Acme'}
})
};
fetch('https://app.chatflows.io/api/v1/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://app.chatflows.io/api/v1/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([
'first_name' => 'Jane',
'last_name' => 'Doe',
'phone' => '+919876543210',
'email' => '[email protected]',
'type' => 'lead',
'contact_status_id' => 1,
'contact_source_id' => 1,
'is_active' => true,
'group_ids' => [
1
],
'label_ids' => [
1
],
'custom_fields' => [
'company' => 'Acme'
]
]),
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://app.chatflows.io/api/v1/contacts"
payload := strings.NewReader("{\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"phone\": \"+919876543210\",\n \"email\": \"[email protected]\",\n \"type\": \"lead\",\n \"contact_status_id\": 1,\n \"contact_source_id\": 1,\n \"is_active\": true,\n \"group_ids\": [\n 1\n ],\n \"label_ids\": [\n 1\n ],\n \"custom_fields\": {\n \"company\": \"Acme\"\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://app.chatflows.io/api/v1/contacts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"phone\": \"+919876543210\",\n \"email\": \"[email protected]\",\n \"type\": \"lead\",\n \"contact_status_id\": 1,\n \"contact_source_id\": 1,\n \"is_active\": true,\n \"group_ids\": [\n 1\n ],\n \"label_ids\": [\n 1\n ],\n \"custom_fields\": {\n \"company\": \"Acme\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.chatflows.io/api/v1/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 \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"phone\": \"+919876543210\",\n \"email\": \"[email protected]\",\n \"type\": \"lead\",\n \"contact_status_id\": 1,\n \"contact_source_id\": 1,\n \"is_active\": true,\n \"group_ids\": [\n 1\n ],\n \"label_ids\": [\n 1\n ],\n \"custom_fields\": {\n \"company\": \"Acme\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 1,
"first_name": "Jane",
"last_name": "Doe",
"display_name": "Jane Doe",
"phone": "+919876543210",
"email": "[email protected]",
"type": "lead",
"is_active": true,
"contact_status_id": 1,
"contact_source_id": 1,
"group_ids": [
1
],
"label_ids": [
1
],
"custom_fields": {
"company": "Acme"
},
"created_at": "2026-06-26T10:00:00+00:00",
"updated_at": "2026-06-26T10:00:00+00:00"
}
}{
"message": "Missing API token.",
"error_code": "unauthenticated",
"status": 401
}{
"message": "Subscription required or expired.",
"error_code": "subscription_required",
"status": 402
}{
"message": "This token is missing the required scope: contacts:write.",
"error_code": "insufficient_scope",
"status": 403
}{
"message": "You have reached your contacts limit.",
"error_code": "limit_reached",
"status": 422
}{
"message": "API request quota exhausted for this billing period.",
"error_code": "quota_exhausted",
"status": 429
}Returns
422 with limit_reached if you’ve reached your plan’s customer limit.Authorizations
Body
application/json
⌘I
Create Customer
curl --request POST \
--url https://app.chatflows.io/api/v1/contacts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"first_name": "Jane",
"last_name": "Doe",
"phone": "+919876543210",
"email": "[email protected]",
"type": "lead",
"contact_status_id": 1,
"contact_source_id": 1,
"is_active": true,
"group_ids": [
1
],
"label_ids": [
1
],
"custom_fields": {
"company": "Acme"
}
}
'import requests
url = "https://app.chatflows.io/api/v1/contacts"
payload = {
"first_name": "Jane",
"last_name": "Doe",
"phone": "+919876543210",
"email": "[email protected]",
"type": "lead",
"contact_status_id": 1,
"contact_source_id": 1,
"is_active": True,
"group_ids": [1],
"label_ids": [1],
"custom_fields": { "company": "Acme" }
}
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({
first_name: 'Jane',
last_name: 'Doe',
phone: '+919876543210',
email: '[email protected]',
type: 'lead',
contact_status_id: 1,
contact_source_id: 1,
is_active: true,
group_ids: [1],
label_ids: [1],
custom_fields: {company: 'Acme'}
})
};
fetch('https://app.chatflows.io/api/v1/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://app.chatflows.io/api/v1/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([
'first_name' => 'Jane',
'last_name' => 'Doe',
'phone' => '+919876543210',
'email' => '[email protected]',
'type' => 'lead',
'contact_status_id' => 1,
'contact_source_id' => 1,
'is_active' => true,
'group_ids' => [
1
],
'label_ids' => [
1
],
'custom_fields' => [
'company' => 'Acme'
]
]),
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://app.chatflows.io/api/v1/contacts"
payload := strings.NewReader("{\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"phone\": \"+919876543210\",\n \"email\": \"[email protected]\",\n \"type\": \"lead\",\n \"contact_status_id\": 1,\n \"contact_source_id\": 1,\n \"is_active\": true,\n \"group_ids\": [\n 1\n ],\n \"label_ids\": [\n 1\n ],\n \"custom_fields\": {\n \"company\": \"Acme\"\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://app.chatflows.io/api/v1/contacts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"phone\": \"+919876543210\",\n \"email\": \"[email protected]\",\n \"type\": \"lead\",\n \"contact_status_id\": 1,\n \"contact_source_id\": 1,\n \"is_active\": true,\n \"group_ids\": [\n 1\n ],\n \"label_ids\": [\n 1\n ],\n \"custom_fields\": {\n \"company\": \"Acme\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.chatflows.io/api/v1/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 \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"phone\": \"+919876543210\",\n \"email\": \"[email protected]\",\n \"type\": \"lead\",\n \"contact_status_id\": 1,\n \"contact_source_id\": 1,\n \"is_active\": true,\n \"group_ids\": [\n 1\n ],\n \"label_ids\": [\n 1\n ],\n \"custom_fields\": {\n \"company\": \"Acme\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 1,
"first_name": "Jane",
"last_name": "Doe",
"display_name": "Jane Doe",
"phone": "+919876543210",
"email": "[email protected]",
"type": "lead",
"is_active": true,
"contact_status_id": 1,
"contact_source_id": 1,
"group_ids": [
1
],
"label_ids": [
1
],
"custom_fields": {
"company": "Acme"
},
"created_at": "2026-06-26T10:00:00+00:00",
"updated_at": "2026-06-26T10:00:00+00:00"
}
}{
"message": "Missing API token.",
"error_code": "unauthenticated",
"status": 401
}{
"message": "Subscription required or expired.",
"error_code": "subscription_required",
"status": 402
}{
"message": "This token is missing the required scope: contacts:write.",
"error_code": "insufficient_scope",
"status": 403
}{
"message": "You have reached your contacts limit.",
"error_code": "limit_reached",
"status": 422
}{
"message": "API request quota exhausted for this billing period.",
"error_code": "quota_exhausted",
"status": 429
}
