Search contacts
Contacts by name, email or company, with phone numbers and addresses.
GET https://cotlet.dev/api/v1/nextcloud/contacts/search
read
Searches your address books and returns matching contacts with name, company, emails and phone numbers. Use it before add_contact to avoid duplicates. An empty query lists the first contacts of the address book.
Parameters
| Name | Type | Description |
|---|---|---|
| query string | string | Part of a name, email or company. |
| address_book string | string | Address book name. Default: 'contacts'. |
| limit integer | integer | Maximum results. Default: 50. |
Request
curl https://cotlet.dev/api/v1/nextcloud/contacts/search \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("nextcloud", "search_contacts") const result = await cotlet.call('nextcloud', 'search_contacts'); cotlet call nextcloud search_contacts Example response
{
"contacts": [
{
"contact_id": "c7f2e1a0-3b44-4d6e-8a19-2f5d9c0b7e31",
"name": "Maria Silva",
"company": "Brightly",
"emails": [
"maria@brightly.example"
],
"phones": [
"+351 21 000 0000"
],
"address_book": "contacts"
}
]
}