Skip to content

Sharing

Configures sharing settings for calendars, address books, and files.

This object can be configured from the WebUI under Settings › Files & Sharing › Sharing

Type: Boolean · default: false

Whether authenticated users can query the directory via WebDAV and JMAP

Type: UnsignedInt · default: 10 · min: 1

Specifies the maximum number of sharees that can be added to a single shared item (calendar, address book or file)

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

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 sysSharingGet permission.

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

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 sysSharingUpdate permission.

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

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

Terminal window
stalwart-cli get Sharing
Terminal window
stalwart-cli update Sharing --field allowDirectoryQueries=false