Contacts live in groups. Create a group first, then add contacts to it using the group uid. You can then send to a whole group from your dashboard.
Contact groups
Create a group
POST
/api/v3/contactsCreates a new contact group and returns it with its uid.
Body parameters
| Parameter | Required | Description |
|---|---|---|
namestring | Required | The name of the group. |
Example request
curl -X POST "https://app.nkomosms.com/api/v3/contacts" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"name": "Parents 2026"
}'<?php
$ch = curl_init('https://app.nkomosms.com/api/v3/contacts');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_TOKEN',
'Content-Type: application/json',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Parents 2026',
]),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
if (($response['status'] ?? '') === 'success') {
print_r($response['data']);
} else {
echo $response['message'] ?? 'Request failed';
}// Node.js 18 or newer (fetch is built in)
const res = await fetch('https://app.nkomosms.com/api/v3/contacts', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_TOKEN',
'Content-Type': 'application/json',
Accept: 'application/json',
},
body: JSON.stringify({
"name": "Parents 2026"
}),
});
const result = await res.json();
if (result.status === 'success') {
console.log(result.data);
} else {
console.error(result.message);
}import requests
response = requests.post(
"https://app.nkomosms.com/api/v3/contacts",
headers={"Authorization": "Bearer YOUR_API_TOKEN", "Accept": "application/json"},
json={
"name": "Parents 2026"
},
timeout=30,
)
result = response.json()
if result["status"] == "success":
print(result["data"])
else:
print(result["message"])Response
{
"status": "success",
"data": "…"
}Error response
{
"status": "error",
"message": "A human-readable description of the error."
}View a group
POST
/api/v3/contacts/{group_id}/showReturns one contact group.
Path parameters
| Parameter | Required | Description |
|---|---|---|
group_idstring | Required | The contact group uid. |
Example request
curl -X POST "https://app.nkomosms.com/api/v3/contacts/6065ecdc9184a/show" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"<?php
$ch = curl_init('https://app.nkomosms.com/api/v3/contacts/6065ecdc9184a/show');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_TOKEN',
'Accept: application/json',
],
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
if (($response['status'] ?? '') === 'success') {
print_r($response['data']);
} else {
echo $response['message'] ?? 'Request failed';
}// Node.js 18 or newer (fetch is built in)
const res = await fetch('https://app.nkomosms.com/api/v3/contacts/6065ecdc9184a/show', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_TOKEN',
Accept: 'application/json',
},
});
const result = await res.json();
if (result.status === 'success') {
console.log(result.data);
} else {
console.error(result.message);
}import requests
response = requests.post(
"https://app.nkomosms.com/api/v3/contacts/6065ecdc9184a/show",
headers={"Authorization": "Bearer YOUR_API_TOKEN", "Accept": "application/json"},
timeout=30,
)
result = response.json()
if result["status"] == "success":
print(result["data"])
else:
print(result["message"])Response
{
"status": "success",
"data": "…"
}Error response
{
"status": "error",
"message": "A human-readable description of the error."
}Rename a group
PATCH
/api/v3/contacts/{group_id}Changes the name of a group.
Path parameters
| Parameter | Required | Description |
|---|---|---|
group_idstring | Required | The contact group uid. |
Body parameters
| Parameter | Required | Description |
|---|---|---|
namestring | Required | The new name. |
Example request
curl -X PATCH "https://app.nkomosms.com/api/v3/contacts/6065ecdc9184a" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"name": "Parents 2026 (JHS)"
}'<?php
$ch = curl_init('https://app.nkomosms.com/api/v3/contacts/6065ecdc9184a');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_TOKEN',
'Content-Type: application/json',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Parents 2026 (JHS)',
]),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
if (($response['status'] ?? '') === 'success') {
print_r($response['data']);
} else {
echo $response['message'] ?? 'Request failed';
}// Node.js 18 or newer (fetch is built in)
const res = await fetch('https://app.nkomosms.com/api/v3/contacts/6065ecdc9184a', {
method: 'PATCH',
headers: {
Authorization: 'Bearer YOUR_API_TOKEN',
'Content-Type': 'application/json',
Accept: 'application/json',
},
body: JSON.stringify({
"name": "Parents 2026 (JHS)"
}),
});
const result = await res.json();
if (result.status === 'success') {
console.log(result.data);
} else {
console.error(result.message);
}import requests
response = requests.patch(
"https://app.nkomosms.com/api/v3/contacts/6065ecdc9184a",
headers={"Authorization": "Bearer YOUR_API_TOKEN", "Accept": "application/json"},
json={
"name": "Parents 2026 (JHS)"
},
timeout=30,
)
result = response.json()
if result["status"] == "success":
print(result["data"])
else:
print(result["message"])Response
{
"status": "success",
"data": "…"
}Error response
{
"status": "error",
"message": "A human-readable description of the error."
}Delete a group
DELETE
/api/v3/contacts/{group_id}Deletes a group.
Path parameters
| Parameter | Required | Description |
|---|---|---|
group_idstring | Required | The contact group uid. |
Example request
curl -X DELETE "https://app.nkomosms.com/api/v3/contacts/6065ecdc9184a" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"<?php
$ch = curl_init('https://app.nkomosms.com/api/v3/contacts/6065ecdc9184a');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_TOKEN',
'Accept: application/json',
],
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
if (($response['status'] ?? '') === 'success') {
print_r($response['data']);
} else {
echo $response['message'] ?? 'Request failed';
}// Node.js 18 or newer (fetch is built in)
const res = await fetch('https://app.nkomosms.com/api/v3/contacts/6065ecdc9184a', {
method: 'DELETE',
headers: {
Authorization: 'Bearer YOUR_API_TOKEN',
Accept: 'application/json',
},
});
const result = await res.json();
if (result.status === 'success') {
console.log(result.data);
} else {
console.error(result.message);
}import requests
response = requests.delete(
"https://app.nkomosms.com/api/v3/contacts/6065ecdc9184a",
headers={"Authorization": "Bearer YOUR_API_TOKEN", "Accept": "application/json"},
timeout=30,
)
result = response.json()
if result["status"] == "success":
print(result["data"])
else:
print(result["message"])Response
{
"status": "success",
"data": null
}Error response
{
"status": "error",
"message": "A human-readable description of the error."
}List your groups
GET
/api/v3/contactsReturns your contact groups in pages.
Example request
curl -X GET "https://app.nkomosms.com/api/v3/contacts" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"<?php
$ch = curl_init('https://app.nkomosms.com/api/v3/contacts');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_TOKEN',
'Accept: application/json',
],
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
if (($response['status'] ?? '') === 'success') {
print_r($response['data']);
} else {
echo $response['message'] ?? 'Request failed';
}// Node.js 18 or newer (fetch is built in)
const res = await fetch('https://app.nkomosms.com/api/v3/contacts', {
method: 'GET',
headers: {
Authorization: 'Bearer YOUR_API_TOKEN',
Accept: 'application/json',
},
});
const result = await res.json();
if (result.status === 'success') {
console.log(result.data);
} else {
console.error(result.message);
}import requests
response = requests.get(
"https://app.nkomosms.com/api/v3/contacts",
headers={"Authorization": "Bearer YOUR_API_TOKEN", "Accept": "application/json"},
timeout=30,
)
result = response.json()
if result["status"] == "success":
print(result["data"])
else:
print(result["message"])Response
{
"status": "success",
"data": "…"
}Error response
{
"status": "error",
"message": "A human-readable description of the error."
}Contacts
Add a contact
POST
/api/v3/contacts/{group_id}/storeAdds a contact to a group.
Path parameters
| Parameter | Required | Description |
|---|---|---|
group_idstring | Required | The contact group uid. |
Body parameters
| Parameter | Required | Description |
|---|---|---|
PHONEnumber | Required | The contact's phone number, for example 233552690110. |
FIRST_NAME, LAST_NAME, …string | Optional | Any other fields set up on the group. Field names are in capital letters. |
Example request
curl -X POST "https://app.nkomosms.com/api/v3/contacts/6065ecdc9184a/store" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"PHONE": "233552690110",
"FIRST_NAME": "Ama",
"LAST_NAME": "Mensah"
}'<?php
$ch = curl_init('https://app.nkomosms.com/api/v3/contacts/6065ecdc9184a/store');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_TOKEN',
'Content-Type: application/json',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'PHONE' => '233552690110',
'FIRST_NAME' => 'Ama',
'LAST_NAME' => 'Mensah',
]),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
if (($response['status'] ?? '') === 'success') {
print_r($response['data']);
} else {
echo $response['message'] ?? 'Request failed';
}// Node.js 18 or newer (fetch is built in)
const res = await fetch('https://app.nkomosms.com/api/v3/contacts/6065ecdc9184a/store', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_TOKEN',
'Content-Type': 'application/json',
Accept: 'application/json',
},
body: JSON.stringify({
"PHONE": "233552690110",
"FIRST_NAME": "Ama",
"LAST_NAME": "Mensah"
}),
});
const result = await res.json();
if (result.status === 'success') {
console.log(result.data);
} else {
console.error(result.message);
}import requests
response = requests.post(
"https://app.nkomosms.com/api/v3/contacts/6065ecdc9184a/store",
headers={"Authorization": "Bearer YOUR_API_TOKEN", "Accept": "application/json"},
json={
"PHONE": "233552690110",
"FIRST_NAME": "Ama",
"LAST_NAME": "Mensah"
},
timeout=30,
)
result = response.json()
if result["status"] == "success":
print(result["data"])
else:
print(result["message"])Response
{
"status": "success",
"data": "…"
}Error response
{
"status": "error",
"message": "A human-readable description of the error."
}View a contact
POST
/api/v3/contacts/{group_id}/search/{uid}Returns one contact.
Path parameters
| Parameter | Required | Description |
|---|---|---|
group_idstring | Required | The contact group uid. |
uidstring | Required | The contact uid. |
Example request
curl -X POST "https://app.nkomosms.com/api/v3/contacts/6065ecdc9184a/search/606732aec8705" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"<?php
$ch = curl_init('https://app.nkomosms.com/api/v3/contacts/6065ecdc9184a/search/606732aec8705');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_TOKEN',
'Accept: application/json',
],
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
if (($response['status'] ?? '') === 'success') {
print_r($response['data']);
} else {
echo $response['message'] ?? 'Request failed';
}// Node.js 18 or newer (fetch is built in)
const res = await fetch('https://app.nkomosms.com/api/v3/contacts/6065ecdc9184a/search/606732aec8705', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_TOKEN',
Accept: 'application/json',
},
});
const result = await res.json();
if (result.status === 'success') {
console.log(result.data);
} else {
console.error(result.message);
}import requests
response = requests.post(
"https://app.nkomosms.com/api/v3/contacts/6065ecdc9184a/search/606732aec8705",
headers={"Authorization": "Bearer YOUR_API_TOKEN", "Accept": "application/json"},
timeout=30,
)
result = response.json()
if result["status"] == "success":
print(result["data"])
else:
print(result["message"])Response
{
"status": "success",
"data": "…"
}Error response
{
"status": "error",
"message": "A human-readable description of the error."
}Update a contact
PATCH
/api/v3/contacts/{group_id}/update/{uid}Changes a contact's number or fields.
Path parameters
| Parameter | Required | Description |
|---|---|---|
group_idstring | Required | The contact group uid. |
uidstring | Required | The contact uid. |
Body parameters
| Parameter | Required | Description |
|---|---|---|
PHONEnumber | Required | The contact's phone number, for example 233552690110. |
FIRST_NAME, LAST_NAME, …string | Optional | Any other fields set up on the group. Field names are in capital letters. |
Example request
curl -X PATCH "https://app.nkomosms.com/api/v3/contacts/6065ecdc9184a/update/606732aec8705" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"PHONE": "233552690110",
"FIRST_NAME": "Ama",
"LAST_NAME": "Owusu"
}'<?php
$ch = curl_init('https://app.nkomosms.com/api/v3/contacts/6065ecdc9184a/update/606732aec8705');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_TOKEN',
'Content-Type: application/json',
'Accept: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'PHONE' => '233552690110',
'FIRST_NAME' => 'Ama',
'LAST_NAME' => 'Owusu',
]),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
if (($response['status'] ?? '') === 'success') {
print_r($response['data']);
} else {
echo $response['message'] ?? 'Request failed';
}// Node.js 18 or newer (fetch is built in)
const res = await fetch('https://app.nkomosms.com/api/v3/contacts/6065ecdc9184a/update/606732aec8705', {
method: 'PATCH',
headers: {
Authorization: 'Bearer YOUR_API_TOKEN',
'Content-Type': 'application/json',
Accept: 'application/json',
},
body: JSON.stringify({
"PHONE": "233552690110",
"FIRST_NAME": "Ama",
"LAST_NAME": "Owusu"
}),
});
const result = await res.json();
if (result.status === 'success') {
console.log(result.data);
} else {
console.error(result.message);
}import requests
response = requests.patch(
"https://app.nkomosms.com/api/v3/contacts/6065ecdc9184a/update/606732aec8705",
headers={"Authorization": "Bearer YOUR_API_TOKEN", "Accept": "application/json"},
json={
"PHONE": "233552690110",
"FIRST_NAME": "Ama",
"LAST_NAME": "Owusu"
},
timeout=30,
)
result = response.json()
if result["status"] == "success":
print(result["data"])
else:
print(result["message"])Response
{
"status": "success",
"data": "…"
}Error response
{
"status": "error",
"message": "A human-readable description of the error."
}Delete a contact
DELETE
/api/v3/contacts/{group_id}/delete/{uid}Removes a contact from a group.
Path parameters
| Parameter | Required | Description |
|---|---|---|
group_idstring | Required | The contact group uid. |
uidstring | Required | The contact uid. |
Example request
curl -X DELETE "https://app.nkomosms.com/api/v3/contacts/6065ecdc9184a/delete/606732aec8705" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"<?php
$ch = curl_init('https://app.nkomosms.com/api/v3/contacts/6065ecdc9184a/delete/606732aec8705');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_TOKEN',
'Accept: application/json',
],
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
if (($response['status'] ?? '') === 'success') {
print_r($response['data']);
} else {
echo $response['message'] ?? 'Request failed';
}// Node.js 18 or newer (fetch is built in)
const res = await fetch('https://app.nkomosms.com/api/v3/contacts/6065ecdc9184a/delete/606732aec8705', {
method: 'DELETE',
headers: {
Authorization: 'Bearer YOUR_API_TOKEN',
Accept: 'application/json',
},
});
const result = await res.json();
if (result.status === 'success') {
console.log(result.data);
} else {
console.error(result.message);
}import requests
response = requests.delete(
"https://app.nkomosms.com/api/v3/contacts/6065ecdc9184a/delete/606732aec8705",
headers={"Authorization": "Bearer YOUR_API_TOKEN", "Accept": "application/json"},
timeout=30,
)
result = response.json()
if result["status"] == "success":
print(result["data"])
else:
print(result["message"])Response
{
"status": "success",
"data": "…"
}Error response
{
"status": "error",
"message": "A human-readable description of the error."
}List contacts in a group
POST
/api/v3/contacts/{group_id}/allReturns the contacts in a group in pages.
Path parameters
| Parameter | Required | Description |
|---|---|---|
group_idstring | Required | The contact group uid. |
Example request
curl -X POST "https://app.nkomosms.com/api/v3/contacts/6065ecdc9184a/all" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"<?php
$ch = curl_init('https://app.nkomosms.com/api/v3/contacts/6065ecdc9184a/all');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_TOKEN',
'Accept: application/json',
],
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
if (($response['status'] ?? '') === 'success') {
print_r($response['data']);
} else {
echo $response['message'] ?? 'Request failed';
}// Node.js 18 or newer (fetch is built in)
const res = await fetch('https://app.nkomosms.com/api/v3/contacts/6065ecdc9184a/all', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_TOKEN',
Accept: 'application/json',
},
});
const result = await res.json();
if (result.status === 'success') {
console.log(result.data);
} else {
console.error(result.message);
}import requests
response = requests.post(
"https://app.nkomosms.com/api/v3/contacts/6065ecdc9184a/all",
headers={"Authorization": "Bearer YOUR_API_TOKEN", "Accept": "application/json"},
timeout=30,
)
result = response.json()
if result["status"] == "success":
print(result["data"])
else:
print(result["message"])Response
{
"status": "success",
"data": "…"
}Error response
{
"status": "error",
"message": "A human-readable description of the error."
}Need help with your integration?
Message us on WhatsApp, call +233 55 269 0110 or email support@nkomosms.com. Send us the request you made and the response you got, but never your API token.