Create a Contact
curl --request POST \
--url https://api.getmalakai.com/contacts \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'x-access-token: <x-access-token>' \
--data '
{
"contacts": [
{}
],
"contacts[].contact_name": "<string>",
"contacts[].contact_email": "<string>",
"contacts[].contact_number": [
"<string>"
],
"contacts[].tags": [
"<string>"
]
}
'import requests
url = "https://api.getmalakai.com/contacts"
payload = {
"contacts": [{}],
"contacts[].contact_name": "<string>",
"contacts[].contact_email": "<string>",
"contacts[].contact_number": ["<string>"],
"contacts[].tags": ["<string>"]
}
headers = {
"Authorization": "<authorization>",
"x-access-token": "<x-access-token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: '<authorization>',
'x-access-token': '<x-access-token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
contacts: [{}],
'contacts[].contact_name': '<string>',
'contacts[].contact_email': '<string>',
'contacts[].contact_number': ['<string>'],
'contacts[].tags': ['<string>']
})
};
fetch('https://api.getmalakai.com/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://api.getmalakai.com/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' => [
[
]
],
'contacts[].contact_name' => '<string>',
'contacts[].contact_email' => '<string>',
'contacts[].contact_number' => [
'<string>'
],
'contacts[].tags' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json",
"x-access-token: <x-access-token>"
],
]);
$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://api.getmalakai.com/contacts"
payload := strings.NewReader("{\n \"contacts\": [\n {}\n ],\n \"contacts[].contact_name\": \"<string>\",\n \"contacts[].contact_email\": \"<string>\",\n \"contacts[].contact_number\": [\n \"<string>\"\n ],\n \"contacts[].tags\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("x-access-token", "<x-access-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://api.getmalakai.com/contacts")
.header("Authorization", "<authorization>")
.header("x-access-token", "<x-access-token>")
.header("Content-Type", "application/json")
.body("{\n \"contacts\": [\n {}\n ],\n \"contacts[].contact_name\": \"<string>\",\n \"contacts[].contact_email\": \"<string>\",\n \"contacts[].contact_number\": [\n \"<string>\"\n ],\n \"contacts[].tags\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getmalakai.com/contacts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["x-access-token"] = '<x-access-token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"contacts\": [\n {}\n ],\n \"contacts[].contact_name\": \"<string>\",\n \"contacts[].contact_email\": \"<string>\",\n \"contacts[].contact_number\": [\n \"<string>\"\n ],\n \"contacts[].tags\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"responseCode": 2000,
"message": "Contacts processing completed",
"data": {
"saved": [],
"updated": [
{
"id": "d9f3733d-1854-4e3a-9c2c-270469d90abc",
"user_id": "7xd2312345",
"contact_name": "John Doe",
"contact_number": [
"+921234567891"
],
"contact_email": "johndoe332@gmail.com",
"tags": [],
"created_at": "2024-11-21T10:50:10.843Z",
"updated_at": "2025-07-17T07:29:18.368Z"
}
]
}
}
Contacts
Create a Contact
Create one or more new contacts in your address book.
POST
contacts
Create a Contact
curl --request POST \
--url https://api.getmalakai.com/contacts \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'x-access-token: <x-access-token>' \
--data '
{
"contacts": [
{}
],
"contacts[].contact_name": "<string>",
"contacts[].contact_email": "<string>",
"contacts[].contact_number": [
"<string>"
],
"contacts[].tags": [
"<string>"
]
}
'import requests
url = "https://api.getmalakai.com/contacts"
payload = {
"contacts": [{}],
"contacts[].contact_name": "<string>",
"contacts[].contact_email": "<string>",
"contacts[].contact_number": ["<string>"],
"contacts[].tags": ["<string>"]
}
headers = {
"Authorization": "<authorization>",
"x-access-token": "<x-access-token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: '<authorization>',
'x-access-token': '<x-access-token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
contacts: [{}],
'contacts[].contact_name': '<string>',
'contacts[].contact_email': '<string>',
'contacts[].contact_number': ['<string>'],
'contacts[].tags': ['<string>']
})
};
fetch('https://api.getmalakai.com/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://api.getmalakai.com/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' => [
[
]
],
'contacts[].contact_name' => '<string>',
'contacts[].contact_email' => '<string>',
'contacts[].contact_number' => [
'<string>'
],
'contacts[].tags' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json",
"x-access-token: <x-access-token>"
],
]);
$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://api.getmalakai.com/contacts"
payload := strings.NewReader("{\n \"contacts\": [\n {}\n ],\n \"contacts[].contact_name\": \"<string>\",\n \"contacts[].contact_email\": \"<string>\",\n \"contacts[].contact_number\": [\n \"<string>\"\n ],\n \"contacts[].tags\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("x-access-token", "<x-access-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://api.getmalakai.com/contacts")
.header("Authorization", "<authorization>")
.header("x-access-token", "<x-access-token>")
.header("Content-Type", "application/json")
.body("{\n \"contacts\": [\n {}\n ],\n \"contacts[].contact_name\": \"<string>\",\n \"contacts[].contact_email\": \"<string>\",\n \"contacts[].contact_number\": [\n \"<string>\"\n ],\n \"contacts[].tags\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getmalakai.com/contacts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["x-access-token"] = '<x-access-token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"contacts\": [\n {}\n ],\n \"contacts[].contact_name\": \"<string>\",\n \"contacts[].contact_email\": \"<string>\",\n \"contacts[].contact_number\": [\n \"<string>\"\n ],\n \"contacts[].tags\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"responseCode": 2000,
"message": "Contacts processing completed",
"data": {
"saved": [],
"updated": [
{
"id": "d9f3733d-1854-4e3a-9c2c-270469d90abc",
"user_id": "7xd2312345",
"contact_name": "John Doe",
"contact_number": [
"+921234567891"
],
"contact_email": "johndoe332@gmail.com",
"tags": [],
"created_at": "2024-11-21T10:50:10.843Z",
"updated_at": "2025-07-17T07:29:18.368Z"
}
]
}
}
Headers
string
required
Your API key for authentication. Prefix with
Bearer .string
required
Your access token for authentication.
Body
The request body must contain acontacts array, where each object represents a contact to be created.
object[]
required
An array of contact objects to be created.
string
required
Full name of the contact.
string
required
Primary and unique email address for the contact.
string[]
required
Array of phone numbers linked to the contact.
string[]
Optional tags to organize the contact.
Request Example
{
"contacts": [
{
"contact_name": "John Doe",
"contact_email": "john.doe@example.com",
"contact_number": [
"1234567890",
"0987654321"
],
"tags": [
"tag1",
"tag2"
]
}
]
}
Response
string
Status of the request in the form of a short message.
object[]
List of the created contact objects, each including a unique
id.{
"responseCode": 2000,
"message": "Contacts processing completed",
"data": {
"saved": [],
"updated": [
{
"id": "d9f3733d-1854-4e3a-9c2c-270469d90abc",
"user_id": "7xd2312345",
"contact_name": "John Doe",
"contact_number": [
"+921234567891"
],
"contact_email": "johndoe332@gmail.com",
"tags": [],
"created_at": "2024-11-21T10:50:10.843Z",
"updated_at": "2025-07-17T07:29:18.368Z"
}
]
}
}
⌘I