Skip to main content
Version: 0.16

AddressBook

Configures address book and contact storage settings.

This object can be configured from the WebUI under Settings › Calendar & Contacts › Address Book

Fields

defaultDisplayName

Type: String? · default: "Stalwart Address Book"

Specifies the default display name for a contact when it is created

defaultHrefName

Type: String? · default: "default"

Specifies the default href name for a contact when it is created

maxVCardSize

Type: Size · default: 524288

Specifies the maximum size of a vCard file that can be uploaded to the server

maxAddressBooks

Type: UnsignedInt? · default: 250 · min: 1

The default maximum number of address books a user can create

maxContacts

Type: UnsignedInt? · min: 1

The default maximum number of contact cards a user can create

JMAP API

The AddressBook singleton is available via the urn:stalwart:jmap capability.

x:AddressBook/get

This is a standard Foo/get method as defined in RFC 8620, Section 5.1.

For singletons, the ids argument should be the literal singleton (or null to return the single instance).

This method requires the sysAddressBookGet permission.

curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:AddressBook/get",
{
"ids": [
"singleton"
]
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'

x:AddressBook/set

This is a standard Foo/set method as defined in RFC 8620, Section 5.3.

For singletons, only the update argument with id singleton is accepted; create and destroy arguments are rejected.

This method requires the sysAddressBookUpdate permission.

curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:AddressBook/set",
{
"update": {
"singleton": {
"defaultDisplayName": "updated value"
}
}
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'

CLI

stalwart-cli wraps the same JMAP calls. See the CLI reference for installation, authentication, and general usage.

Fetch

stalwart-cli get address-book

Update

stalwart-cli update address-book --field description='Updated'