Create one or more contacts
curl --request POST \
--url https://api.greentick.ai/v1/contacts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"phoneNumber": "+91 98765 43210",
"firstName": "<string>",
"lastName": "<string>",
"notes": "<string>",
"attributes": [
{
"id": "<string>",
"value": "<string>"
}
],
"labels": [
"668f1a2b3c4d5e6f7a8b9c10"
]
}
'import requests
url = "https://api.greentick.ai/v1/contacts"
payload = {
"phoneNumber": "+91 98765 43210",
"firstName": "<string>",
"lastName": "<string>",
"notes": "<string>",
"attributes": [
{
"id": "<string>",
"value": "<string>"
}
],
"labels": ["668f1a2b3c4d5e6f7a8b9c10"]
}
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({
phoneNumber: '+91 98765 43210',
firstName: '<string>',
lastName: '<string>',
notes: '<string>',
attributes: [{id: '<string>', value: '<string>'}],
labels: ['668f1a2b3c4d5e6f7a8b9c10']
})
};
fetch('https://api.greentick.ai/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://api.greentick.ai/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([
'phoneNumber' => '+91 98765 43210',
'firstName' => '<string>',
'lastName' => '<string>',
'notes' => '<string>',
'attributes' => [
[
'id' => '<string>',
'value' => '<string>'
]
],
'labels' => [
'668f1a2b3c4d5e6f7a8b9c10'
]
]),
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://api.greentick.ai/v1/contacts"
payload := strings.NewReader("{\n \"phoneNumber\": \"+91 98765 43210\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"notes\": \"<string>\",\n \"attributes\": [\n {\n \"id\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"labels\": [\n \"668f1a2b3c4d5e6f7a8b9c10\"\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://api.greentick.ai/v1/contacts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"phoneNumber\": \"+91 98765 43210\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"notes\": \"<string>\",\n \"attributes\": [\n {\n \"id\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"labels\": [\n \"668f1a2b3c4d5e6f7a8b9c10\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.greentick.ai/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 \"phoneNumber\": \"+91 98765 43210\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"notes\": \"<string>\",\n \"attributes\": [\n {\n \"id\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"labels\": [\n \"668f1a2b3c4d5e6f7a8b9c10\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": false,
"code": "INVALID_TO",
"message": "to (E.164 phone) is required"
}{
"success": false,
"code": "INVALID_TO",
"message": "to (E.164 phone) is required"
}Contacts
Create one or more contacts
POST
/
contacts
Create one or more contacts
curl --request POST \
--url https://api.greentick.ai/v1/contacts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"phoneNumber": "+91 98765 43210",
"firstName": "<string>",
"lastName": "<string>",
"notes": "<string>",
"attributes": [
{
"id": "<string>",
"value": "<string>"
}
],
"labels": [
"668f1a2b3c4d5e6f7a8b9c10"
]
}
'import requests
url = "https://api.greentick.ai/v1/contacts"
payload = {
"phoneNumber": "+91 98765 43210",
"firstName": "<string>",
"lastName": "<string>",
"notes": "<string>",
"attributes": [
{
"id": "<string>",
"value": "<string>"
}
],
"labels": ["668f1a2b3c4d5e6f7a8b9c10"]
}
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({
phoneNumber: '+91 98765 43210',
firstName: '<string>',
lastName: '<string>',
notes: '<string>',
attributes: [{id: '<string>', value: '<string>'}],
labels: ['668f1a2b3c4d5e6f7a8b9c10']
})
};
fetch('https://api.greentick.ai/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://api.greentick.ai/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([
'phoneNumber' => '+91 98765 43210',
'firstName' => '<string>',
'lastName' => '<string>',
'notes' => '<string>',
'attributes' => [
[
'id' => '<string>',
'value' => '<string>'
]
],
'labels' => [
'668f1a2b3c4d5e6f7a8b9c10'
]
]),
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://api.greentick.ai/v1/contacts"
payload := strings.NewReader("{\n \"phoneNumber\": \"+91 98765 43210\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"notes\": \"<string>\",\n \"attributes\": [\n {\n \"id\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"labels\": [\n \"668f1a2b3c4d5e6f7a8b9c10\"\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://api.greentick.ai/v1/contacts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"phoneNumber\": \"+91 98765 43210\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"notes\": \"<string>\",\n \"attributes\": [\n {\n \"id\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"labels\": [\n \"668f1a2b3c4d5e6f7a8b9c10\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.greentick.ai/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 \"phoneNumber\": \"+91 98765 43210\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"notes\": \"<string>\",\n \"attributes\": [\n {\n \"id\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"labels\": [\n \"668f1a2b3c4d5e6f7a8b9c10\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": false,
"code": "INVALID_TO",
"message": "to (E.164 phone) is required"
}{
"success": false,
"code": "INVALID_TO",
"message": "to (E.164 phone) is required"
}Authorizations
Create an API key in GreenTick Developer settings. Send it as Authorization: Bearer gt_live_… (Bearer prefix required).
Body
application/json
- Option 1 · object
- Option 2 · object[]
- Option 3 · object
E.164 is recommended. GreenTick stores digits including country code.
Example:
"+91 98765 43210"
Maximum string length:
100Maximum string length:
100Show child attributes
Show child attributes
Label definition IDs from GET /labels
Example:
["668f1a2b3c4d5e6f7a8b9c10"]
Response
Contacts created

