contacts
curl --request GET \
--url https://swiftchats.axis96.xyz/api/contacts \
--header 'Authorization: Bearer <token>'import requests
url = "https://swiftchats.axis96.xyz/api/contacts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://swiftchats.axis96.xyz/api/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://swiftchats.axis96.xyz/api/contacts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <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"
"net/http"
"io"
)
func main() {
url := "https://swiftchats.axis96.xyz/api/contacts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://swiftchats.axis96.xyz/api/contacts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://swiftchats.axis96.xyz/api/contacts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": 1,
"uuid": "2a8ccb5e-0392-491f-90be-b4d02c24754e",
"organization_id": 7,
"first_name": "Jennifer",
"last_name": "Hudson",
"phone": "254720055819",
"email": "[email protected]",
"avatar": null,
"address": "{\"street\":\"Kimathi\",\"city\":\"Nairobi\",\"state\":\"Nairobi\",\"zip\":\"00516\",\"country\":\"Kenya\"}",
"contact_group_id": 1,
"is_favorite": 1,
"created_by": 5,
"created_at": "2024-04-06 19:52:17",
"updated_at": "2024-04-06 19:54:00",
"deleted_at": null,
"full_name": "Jennifer Hudson"
},
{
"id": 2,
"uuid": "c4a9223d-c6eb-43d8-b690-723cebe19ed7",
"organization_id": 7,
"first_name": "Jack",
"last_name": "Reacher",
"phone": "254717798628",
"email": "[email protected]",
"avatar": null,
"address": "{\"street\":\"Ngong Rd\",\"city\":\"Nakuru\",\"state\":\"Naivasha\",\"zip\":\"002372\",\"country\":\"Tanzania\"}",
"contact_group_id": 1,
"is_favorite": 0,
"created_by": 5,
"created_at": "2024-04-06 19:55:17",
"updated_at": "2024-04-06 19:55:57",
"deleted_at": null,
"full_name": "Jack Reacher"
},
{
"id": 4,
"uuid": "477cd721-1e24-4690-8d11-1b80b8343820",
"organization_id": 7,
"first_name": "Alex",
"last_name": "Bridgertone",
"phone": "254718068796",
"email": "[email protected]",
"avatar": null,
"address": "{\"street\":null,\"city\":null,\"state\":null,\"zip\":null,\"country\":null}",
"contact_group_id": null,
"is_favorite": 0,
"created_by": 0,
"created_at": "2024-04-09 09:36:26",
"updated_at": "2024-04-09 09:36:26",
"deleted_at": null,
"full_name": "Alex Bridgertone"
},
{
"id": 5,
"uuid": "f38565ee-1c72-4929-bfde-304d6cb7c9b5",
"organization_id": 7,
"first_name": "Kevin",
"last_name": "Kelly",
"phone": "254720707125",
"email": "[email protected]",
"avatar": null,
"address": "{\"street\":null,\"city\":null,\"state\":null,\"zip\":null,\"country\":null}",
"contact_group_id": null,
"is_favorite": 0,
"created_by": 0,
"created_at": "2024-04-09 09:39:03",
"updated_at": "2024-04-09 10:19:41",
"deleted_at": null,
"full_name": "Kevin Kelly"
},
{
"id": 6,
"uuid": "945d8b4f-a580-4743-bdfa-f0095059b37a",
"organization_id": 7,
"first_name": "Marvin",
"last_name": "Osumba",
"phone": "254725578277",
"email": "[email protected]",
"avatar": null,
"address": "{\"street\":null,\"city\":null,\"state\":null,\"zip\":null,\"country\":null}",
"contact_group_id": null,
"is_favorite": 0,
"created_by": 0,
"created_at": "2024-04-09 10:21:50",
"updated_at": "2024-04-09 10:30:06",
"deleted_at": null,
"full_name": "Marvin Osumba"
},
{
"id": 7,
"uuid": "50e5162b-17a5-47d1-8595-48d52b0e3583",
"organization_id": 7,
"first_name": "Jeffrey",
"last_name": "Mwangi",
"phone": "254722562087",
"email": "[email protected]",
"avatar": null,
"address": "{\"street\":null,\"city\":null,\"state\":null,\"zip\":null,\"country\":null}",
"contact_group_id": null,
"is_favorite": 0,
"created_by": 0,
"created_at": "2024-04-09 10:25:06",
"updated_at": "2024-04-09 10:25:06",
"deleted_at": null,
"full_name": "Jeffrey Mwangi"
},
{
"id": 8,
"uuid": "eeb71d1d-8e63-42a9-b523-39feeb7b936c",
"organization_id": 7,
"first_name": "Juma",
"last_name": "Waweru",
"phone": "254711232323",
"email": "[email protected]",
"avatar": null,
"address": "{\"street\":null,\"city\":null,\"state\":null,\"zip\":null,\"country\":null}",
"contact_group_id": 3,
"is_favorite": 0,
"created_by": 5,
"created_at": "2024-04-09 13:11:24",
"updated_at": "2024-04-09 13:11:24",
"deleted_at": null,
"full_name": "Juma Waweru"
},
{
"id": 9,
"uuid": "a75c3442-25d5-4656-93d5-d54e1f03c7e6",
"organization_id": 7,
"first_name": "Jeffrey",
"last_name": "Mwangi",
"phone": "254722562088",
"email": "[email protected]",
"avatar": null,
"address": "{\"street\":null,\"city\":null,\"state\":null,\"zip\":null,\"country\":null}",
"contact_group_id": null,
"is_favorite": 0,
"created_by": 0,
"created_at": "2024-04-09 16:27:52",
"updated_at": "2024-04-09 16:27:52",
"deleted_at": null,
"full_name": "Jeffrey Mwangi"
},
{
"id": 10,
"uuid": "3e2b2ce2-f4cb-4aa8-9f35-5014ed7c9b59",
"organization_id": 7,
"first_name": null,
"last_name": null,
"phone": "254720055819",
"email": null,
"avatar": null,
"address": null,
"contact_group_id": null,
"is_favorite": 0,
"created_by": 0,
"created_at": null,
"updated_at": null,
"deleted_at": null,
"full_name": " "
},
{
"id": 11,
"uuid": "f9599c47-e7b7-4a92-b71c-0f2e3e29fe0d",
"organization_id": 7,
"first_name": null,
"last_name": null,
"phone": "254720055819",
"email": null,
"avatar": null,
"address": null,
"contact_group_id": null,
"is_favorite": 0,
"created_by": 0,
"created_at": null,
"updated_at": null,
"deleted_at": null,
"full_name": " "
}
],
"links": {
"first": "http://whatsappsender.test/api/contacts?page=1",
"last": "http://whatsappsender.test/api/contacts?page=2",
"prev": null,
"next": "http://whatsappsender.test/api/contacts?page=2"
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 2,
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "http://whatsappsender.test/api/contacts?page=1",
"label": "1",
"active": true
},
{
"url": "http://whatsappsender.test/api/contacts?page=2",
"label": "2",
"active": false
},
{
"url": "http://whatsappsender.test/api/contacts?page=2",
"label": "Next »",
"active": false
}
],
"path": "http://whatsappsender.test/api/contacts",
"per_page": 10,
"to": 10,
"total": 12
}
}Contacts
Get Contacts
GET
/
api
/
contacts
contacts
curl --request GET \
--url https://swiftchats.axis96.xyz/api/contacts \
--header 'Authorization: Bearer <token>'import requests
url = "https://swiftchats.axis96.xyz/api/contacts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://swiftchats.axis96.xyz/api/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://swiftchats.axis96.xyz/api/contacts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <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"
"net/http"
"io"
)
func main() {
url := "https://swiftchats.axis96.xyz/api/contacts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://swiftchats.axis96.xyz/api/contacts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://swiftchats.axis96.xyz/api/contacts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": 1,
"uuid": "2a8ccb5e-0392-491f-90be-b4d02c24754e",
"organization_id": 7,
"first_name": "Jennifer",
"last_name": "Hudson",
"phone": "254720055819",
"email": "[email protected]",
"avatar": null,
"address": "{\"street\":\"Kimathi\",\"city\":\"Nairobi\",\"state\":\"Nairobi\",\"zip\":\"00516\",\"country\":\"Kenya\"}",
"contact_group_id": 1,
"is_favorite": 1,
"created_by": 5,
"created_at": "2024-04-06 19:52:17",
"updated_at": "2024-04-06 19:54:00",
"deleted_at": null,
"full_name": "Jennifer Hudson"
},
{
"id": 2,
"uuid": "c4a9223d-c6eb-43d8-b690-723cebe19ed7",
"organization_id": 7,
"first_name": "Jack",
"last_name": "Reacher",
"phone": "254717798628",
"email": "[email protected]",
"avatar": null,
"address": "{\"street\":\"Ngong Rd\",\"city\":\"Nakuru\",\"state\":\"Naivasha\",\"zip\":\"002372\",\"country\":\"Tanzania\"}",
"contact_group_id": 1,
"is_favorite": 0,
"created_by": 5,
"created_at": "2024-04-06 19:55:17",
"updated_at": "2024-04-06 19:55:57",
"deleted_at": null,
"full_name": "Jack Reacher"
},
{
"id": 4,
"uuid": "477cd721-1e24-4690-8d11-1b80b8343820",
"organization_id": 7,
"first_name": "Alex",
"last_name": "Bridgertone",
"phone": "254718068796",
"email": "[email protected]",
"avatar": null,
"address": "{\"street\":null,\"city\":null,\"state\":null,\"zip\":null,\"country\":null}",
"contact_group_id": null,
"is_favorite": 0,
"created_by": 0,
"created_at": "2024-04-09 09:36:26",
"updated_at": "2024-04-09 09:36:26",
"deleted_at": null,
"full_name": "Alex Bridgertone"
},
{
"id": 5,
"uuid": "f38565ee-1c72-4929-bfde-304d6cb7c9b5",
"organization_id": 7,
"first_name": "Kevin",
"last_name": "Kelly",
"phone": "254720707125",
"email": "[email protected]",
"avatar": null,
"address": "{\"street\":null,\"city\":null,\"state\":null,\"zip\":null,\"country\":null}",
"contact_group_id": null,
"is_favorite": 0,
"created_by": 0,
"created_at": "2024-04-09 09:39:03",
"updated_at": "2024-04-09 10:19:41",
"deleted_at": null,
"full_name": "Kevin Kelly"
},
{
"id": 6,
"uuid": "945d8b4f-a580-4743-bdfa-f0095059b37a",
"organization_id": 7,
"first_name": "Marvin",
"last_name": "Osumba",
"phone": "254725578277",
"email": "[email protected]",
"avatar": null,
"address": "{\"street\":null,\"city\":null,\"state\":null,\"zip\":null,\"country\":null}",
"contact_group_id": null,
"is_favorite": 0,
"created_by": 0,
"created_at": "2024-04-09 10:21:50",
"updated_at": "2024-04-09 10:30:06",
"deleted_at": null,
"full_name": "Marvin Osumba"
},
{
"id": 7,
"uuid": "50e5162b-17a5-47d1-8595-48d52b0e3583",
"organization_id": 7,
"first_name": "Jeffrey",
"last_name": "Mwangi",
"phone": "254722562087",
"email": "[email protected]",
"avatar": null,
"address": "{\"street\":null,\"city\":null,\"state\":null,\"zip\":null,\"country\":null}",
"contact_group_id": null,
"is_favorite": 0,
"created_by": 0,
"created_at": "2024-04-09 10:25:06",
"updated_at": "2024-04-09 10:25:06",
"deleted_at": null,
"full_name": "Jeffrey Mwangi"
},
{
"id": 8,
"uuid": "eeb71d1d-8e63-42a9-b523-39feeb7b936c",
"organization_id": 7,
"first_name": "Juma",
"last_name": "Waweru",
"phone": "254711232323",
"email": "[email protected]",
"avatar": null,
"address": "{\"street\":null,\"city\":null,\"state\":null,\"zip\":null,\"country\":null}",
"contact_group_id": 3,
"is_favorite": 0,
"created_by": 5,
"created_at": "2024-04-09 13:11:24",
"updated_at": "2024-04-09 13:11:24",
"deleted_at": null,
"full_name": "Juma Waweru"
},
{
"id": 9,
"uuid": "a75c3442-25d5-4656-93d5-d54e1f03c7e6",
"organization_id": 7,
"first_name": "Jeffrey",
"last_name": "Mwangi",
"phone": "254722562088",
"email": "[email protected]",
"avatar": null,
"address": "{\"street\":null,\"city\":null,\"state\":null,\"zip\":null,\"country\":null}",
"contact_group_id": null,
"is_favorite": 0,
"created_by": 0,
"created_at": "2024-04-09 16:27:52",
"updated_at": "2024-04-09 16:27:52",
"deleted_at": null,
"full_name": "Jeffrey Mwangi"
},
{
"id": 10,
"uuid": "3e2b2ce2-f4cb-4aa8-9f35-5014ed7c9b59",
"organization_id": 7,
"first_name": null,
"last_name": null,
"phone": "254720055819",
"email": null,
"avatar": null,
"address": null,
"contact_group_id": null,
"is_favorite": 0,
"created_by": 0,
"created_at": null,
"updated_at": null,
"deleted_at": null,
"full_name": " "
},
{
"id": 11,
"uuid": "f9599c47-e7b7-4a92-b71c-0f2e3e29fe0d",
"organization_id": 7,
"first_name": null,
"last_name": null,
"phone": "254720055819",
"email": null,
"avatar": null,
"address": null,
"contact_group_id": null,
"is_favorite": 0,
"created_by": 0,
"created_at": null,
"updated_at": null,
"deleted_at": null,
"full_name": " "
}
],
"links": {
"first": "http://whatsappsender.test/api/contacts?page=1",
"last": "http://whatsappsender.test/api/contacts?page=2",
"prev": null,
"next": "http://whatsappsender.test/api/contacts?page=2"
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 2,
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "http://whatsappsender.test/api/contacts?page=1",
"label": "1",
"active": true
},
{
"url": "http://whatsappsender.test/api/contacts?page=2",
"label": "2",
"active": false
},
{
"url": "http://whatsappsender.test/api/contacts?page=2",
"label": "Next »",
"active": false
}
],
"path": "http://whatsappsender.test/api/contacts",
"per_page": 10,
"to": 10,
"total": 12
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
200 - application/json
OK
The response is of type object.
⌘I
