Skip to content

AppPassword

App password credential for programmatic access.

This object can be configured from the WebUI under Account › Credentials › App Passwords

Type: String · required

Description of the credential

Type: String · read-only · server-set · secret

Secret value of the credential

Type: UTCDateTime · read-only · server-set

Creation date of the credential

Type: UTCDateTime?

Expiration date of the credential

Type: CredentialPermissions · required

List of permissions assigned to this credential

Type: IpMask[]

List of allowed IP addresses or CIDR ranges for this credential

The AppPassword object is available via the urn:stalwart:jmap capability.

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

This method requires the sysAppPasswordGet permission.

Terminal window
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:AppPassword/get",
{
"ids": [
"id1"
]
},
"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.

Supports create, update, and destroy operations in a single call.

This operation requires the sysAppPasswordCreate permission.

Terminal window
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:AppPassword/set",
{
"create": {
"new1": {
"allowedIps": {},
"description": "Example",
"permissions": {
"@type": "Inherit"
}
}
}
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'

This operation requires the sysAppPasswordUpdate permission.

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

This operation requires the sysAppPasswordDestroy permission.

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

This is a standard Foo/query method as defined in RFC 8620, Section 5.5.

This method requires the sysAppPasswordQuery permission.

Terminal window
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:AppPassword/query",
{
"filter": {
"expiresAt": "2026-01-01T00:00:00Z"
}
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'

The x:AppPassword/query filter argument accepts the following conditions (combinable with AnyOf / AllOf / Not per RFC 8620):

ConditionKind
expiresAtdate

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

Terminal window
stalwart-cli get AppPassword id1
Terminal window
stalwart-cli create AppPassword \
--field description=Example \
--field 'permissions={"@type":"Inherit"}' \
--field 'allowedIps={}'
Terminal window
stalwart-cli query AppPassword
stalwart-cli query AppPassword --where expiresAt=2026-01-01T00:00:00Z
Terminal window
stalwart-cli update AppPassword id1 --field description='updated value'
Terminal window
stalwart-cli delete AppPassword --ids id1

Permission assignment mode for a credential.

List of permissions to assign to a credential.

Type: Permission[]

List of permissions to assign.