List saved contacts
GET
/api/v1/mailbox/address-book/contactsContacts in one address book (book, default default).
Errors
| Status | When |
|---|---|
401 |
No token, or the session expired or was signed out. Sign in again with POST /mailbox-auth/login. |
403 |
The account has a temporary password: until POST /security/password succeeds, every other call answers this with error_code: password_change_required. |
404 |
Address book not found. |
Parameters
| Name | In | Type | Description |
|---|---|---|---|
book | query | string |
Request
GET
/api/v1/mailbox/address-book/contactscurl -X GET 'https://courier.mailyte.com/api/v1/mailbox/address-book/contacts' \
-H 'Authorization: Bearer MAILBOX_TOKEN'const response = await fetch('https://courier.mailyte.com/api/v1/mailbox/address-book/contacts', {
method: 'GET',
headers: {
Authorization: 'Bearer MAILBOX_TOKEN',
},
});
const { data } = await response.json();import requests
response = requests.get(
"https://courier.mailyte.com/api/v1/mailbox/address-book/contacts",
headers={"Authorization": "Bearer MAILBOX_TOKEN"},
)
data = response.json()["data"]<?php
$response = Http::withToken('MAILBOX_TOKEN')
->get('https://courier.mailyte.com/api/v1/mailbox/address-book/contacts');
$data = $response->json('data');require "net/http"
require "json"
uri = URI("https://courier.mailyte.com/api/v1/mailbox/address-book/contacts")
request = Net::HTTP::Get.new(uri)
request["Authorization"] = "Bearer MAILBOX_TOKEN"
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }Response
Successful Response
dataarray<object>idstringetagstringbookstringread_onlybooleanuidstring or nullfull_namestring or nullfirst_namestring or nulllast_namestring or nullemailsarray<object>addressstringtypestring or null
phonesarray<object>numberstringtypestring or null
organizationstring or nulltitlestring or nulladdressstring or nullnotestring or nullbirthdaystring or nullYYYY-MM-DD.
200
application/json{
"type": "success",
"msg": "Contacts retrieved successfully",
"data": [
{
"id": "5d41402a.vcf",
"etag": "\"c0ffee\"",
"book": "default",
"read_only": false,
"uid": "5d41402a",
"full_name": "Tunde Bello",
"first_name": "Tunde",
"last_name": "Bello",
"emails": [
{
"address": "tunde@example.com",
"type": "work"
}
],
"phones": [
{
"number": "+234 803 000 0000",
"type": "mobile"
}
],
"organization": "Example Ltd",
"title": "CFO",
"address": null,
"note": null,
"birthday": null
}
]
}Returned inside the standard envelope.
Errors
| Status | When |
|---|---|
401 | No token, or the session expired or was signed out. Sign in again with `POST /mailbox-auth/login`. |
403 | The account has a temporary password: until `POST /security/password` succeeds, every other call answers this with `error_code: password_change_required`. |
404 | Address book not found. |
422 | Validation Error |
Every status, with what causes it and what to do, is on the error reference.