Contacts
Address Book Contacts

Address Book Contacts

Fetch all contacts inside a specific address book. Results are paginated — 100 per page by default.


Endpoint

POST /v1/address-books/contacts/

Authentication: Bearer API key


Query Parameters

ParameterTypeDefaultDescription
pageinteger1Page number
page_sizeinteger100Results per page (max 500)

Request Body

{
  "id": 1
}
FieldTypeRequiredDescription
idintegerYesAddress book ID from the Address Books endpoint

Response

200 OK

{
  "address_book": {
    "id": 1,
    "name": "Premium Customers"
  },
  "total": 342,
  "page": 1,
  "page_size": 100,
  "total_pages": 4,
  "next": "https://api.talkntalk.africa/v1/address-books/contacts/?page=2&page_size=100",
  "previous": null,
  "results": [
    {
      "id": 101,
      "first_name": "Jane",
      "last_name": "Doe",
      "phone": "+254700000001",
      "email": "jane@example.com",
      "notes": "",
      "created_at": "2026-03-01T10:00:00+00:00"
    },
    {
      "id": 102,
      "first_name": "John",
      "last_name": "Mwangi",
      "phone": "+254711000002",
      "email": "",
      "notes": "VIP",
      "created_at": "2026-03-05T08:30:00+00:00"
    }
  ]
}
FieldTypeDescription
address_book.idintegerThe address book ID
address_book.namestringThe address book name
totalintegerTotal contacts across all pages
pageintegerCurrent page number
page_sizeintegerNumber of results in this page
total_pagesintegerTotal number of pages
nextstring | nullURL of the next page, or null if on the last page
previousstring | nullURL of the previous page, or null if on the first page
results[].idintegerContact ID
results[].first_namestringFirst name (may be empty)
results[].last_namestringLast name (may be empty)
results[].phonestringPhone number in E.164 format
results[].emailstringEmail address (may be empty)
results[].notesstringOptional notes
results[].created_atstring (ISO 8601)When the contact was added

Code Examples

curl -X POST "https://api.talkntalk.africa/v1/address-books/contacts/?page=1&page_size=100" \
  -H "Authorization: Bearer tk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"id": 1}'

Error Responses

StatusMeaning
400 Bad Requestid field missing from request body
401 UnauthorizedMissing or invalid API key
404 Not FoundAddress book does not exist or does not belong to your organisation
{
  "detail": "Field 'id' is required."
}
{
  "detail": "Address book not found."
}