Skip to main content

Fetch phonebooks

Endpoint: https://BASE_URL/api/phonebooks?api_key=YourAPIKey Request Type: GET
{
    "data": [
        {
            "id": "f9c28de9-ab5a-4513-9c9f-338be8e1c390",
            "name": "labore",
            "total_number_of_contacts": 0,
            "date_created": "2021-07-01 14:44:42",
            "last_updated": "2021-07-01 14:44:42"
        },
        {
            "id": "0d974867-7fc8-4dd9-b069-6ca33dc12930",
            "name": "numquam",
            "total_number_of_contacts": 0,
            "date_created": "2021-07-01 14:44:33",
            "last_updated": "2021-07-01 14:44:33"
        },
        {
            "id": "b8bd4d35-1dba-4ffb-9fd6-8ecd672801fd",
            "name": "totam",
            "total_number_of_contacts": 0,
            "date_created": "2021-07-01 14:44:16",
            "last_updated": "2021-07-01 14:44:16"
        },
        {
            "id": "2d9f4a02-85b8-45e5-9f5b-30f93ef472e2",
            "name": "adeyinka",
            "total_number_of_contacts": 0,
            "date_created": "2021-06-29 12:23:42",
            "last_updated": "2021-06-29 12:23:42"
        },
        {
            "id": "779c2bbe-130b-4ea8-a30e-1e81f7e4d4d9",
            "name": "testerboos",
            "total_number_of_contacts": 0,
            "date_created": "2021-06-28 15:50:06",
            "last_updated": "2021-06-28 15:50:06"
        },
        {
            "id": "04c3ebcc-3a7e-485a-88c1-68e731386f77",
            "name": "omnis",
            "total_number_of_contacts": 22,
            "date_created": "2021-06-25 15:11:56",
            "last_updated": "2021-06-30 12:02:23"
        },
        {
            "id": "145d23bd-daef-4403-8236-73f648c63387",
            "name": "bosun",
            "total_number_of_contacts": 0,
            "date_created": "2021-06-25 12:59:10",
            "last_updated": "2021-06-25 12:59:10"
        },
        {
            "id": "67503708-0725-49eb-9bc6-feee9faea58a",
            "name": "test",
            "total_number_of_contacts": 776,
            "date_created": "2021-06-25 12:58:45",
            "last_updated": "2021-07-01 15:39:35"
        }
    ],
    "links": {
        "first": "https://BASE_URL/api/phonebooks?page=1",
        "last": "https://BASE_URL/api/phonebooks?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "path": "https://BASE_URL/api/phonebooks",
        "per_page": 15,
        "to": 8,
        "total": 8
    }
}

Create a phonebook

Endpoint: https://BASE_URL/api/phonebooks Request Type: POST Body params:
OptionsRequiredDescription
api*keyyes_string*
Your API key (It can be found on your Termii dashboard)
phonebook*nameyes_string*
The name of the phonebook
descriptionnostring
A description of the contacts stored in the phonebook
{
"api_key": "Your API Key",
"phonebook_name":"Phone test",
"description":"Phonebook for test"
}
Response
   {
      "message": "Phonebook added successfully"
  }

Update phonebook

Endpoint: https://BASE_URL/api/phonebooks/{phonebook_id} Request Type: PATCH
OptionsRequiredDescription
api_keyyesstring
Your API key (It can be found on your Termii dashboard)
phonebook_nameyesstring
The name of the phonebook
{
"api_key": "Your API Key",
"phonebook_name":"Phone test",
"description":"Phonebook for test"
}
Response:
{
      "message": "Phonebook Updated Successfully"
}

Delete Phonebook

Endpoint: https://BASE_URL/api/phonebooks/{phonebook_id}?api_key=YourAPIKey Request Type: DELETE Response
   {
        "message": "Phonebook deleted successfully"
  }