1. Authentication
All API requests require an authentication.
If authentication is invalid or omitted, then an error message will be returned with 401 status code.
Bearer authentication requires the generation of a token that you can create in "Access tokens" section of Cleanmail account.
Token will inherit of roles of the linked account.
curl -H "Authorization: Bearer xxxx" [url]
# replace xxxx by the token generated in your administration interface
The bearer authentication has no link with the account password.
You can update your password without consequence on your tokens.
You can create one token for each application with or without expiration dates.
If the account attached to the token is disabled or deleted, the requests will be rejected.
2. Authorizations
Each request is subject to specific rights.
Calling an API authenticated with an account which do not have required permissions will return a 403 error.
List of enabled permissions are contained in roles entities.
If new roles can be created on a specific domains for customization issues, some of them are predefined on the platform and reachable for all domains.
3. Filtering and sorting
Some of GET requests allow you to filter and sort the query result.
3.1. Filtering
Add a parameter to your query to filter the result of your request. Only one filter is allowed.
Example:
-
GET /domains?name=mydomain.net- Retrieve a domain whose name is exactly "mydomain.net" -
GET /domains?name=mydomain*- Retrieve a list of domains whose name starts with "mydomain" -
GET /domains?name=*mydomain- Retrieve a list of domains whose name ends with "mydomain" -
GET /domains?name=*mydomain*- Retrieve a list of domains whose name contains "mydomain"
3.2. Sorting
A generic parameter can be used to describe sorting rules. Specify the field name that you want to use for sorting the result and prefix it by negative sign to reverse order.sort
Example:
-
GET /domains?sort=-name- Retrieves a list of domains in descending order of name -
GET /domains?sort=id- Retrieves a list of domains in ascending order of id
4. Pagination
You can paginate your requests by passing additional GET and offset parameters in your query.pageSize
The count of the total number of available results is send in a header of the response.x-total-count
Example:
-
GET domains?offset=0&pageSize=10- Retrieve the list of the 10 firsts domains
5. Endpoints
5.1. AccessControls
5.1.1. Delete admin account
DELETE /security/admins/{adminId}
Description
Delete administrator account and all its accesses.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
adminId |
X |
null |
5.1.2. List admins
GET /security/admins
Description
Get list of administrators of domains, customers or brokers on which the logged-in user has the GRANT permission.
Parameters
Query Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
offset |
- |
0 |
||
pageSize |
- |
40 |
||
sort |
Define the sort applied on response. Prefix the field login by '-' to reverse the sort. |
- |
null |
|
search |
Filter by login, email, displayName |
- |
null |
Return Type
array[Admin]
5.1.3. Get admin
GET /security/admins/{adminId}
Description
Get administrator account and all the associated permissions.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
adminId |
X |
null |
5.1.4. List permissions
GET /security/permissions
Description
List all permissions which can be assigned to an administrator for a given scope. The returned permissions are limited to the current user’s permissions on the given object.
Parameters
Query Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
scope |
Restrict the list of permissions by scope. |
X |
null |
|
id |
X |
null |
Return Type
array[PermissionDTO]
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
200 |
OK |
List[PermissionDTO] |
5.1.5. Update admin
PATCH /security/admins/{adminId}
Description
Update an existing administrator account.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
adminId |
X |
null |
Body Parameter
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
AdminUpdate |
X |
5.2. AuthenticationTokens
5.2.1. Create token
POST /admins/{adminId}/tokens
Description
Create an authentication token for a give user.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
adminId |
X |
null |
Body Parameter
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
PersonalTokenAdd |
X |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
403 |
Only sysadmin or target user can call this endpoint. |
|
404 |
Resource does not exist. |
Example HTTP request
POST /admins/ByE3n/tokens HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2NzkwMSwiZXhwIjoxNzg4NDcxNTAxfQ.KK_dEAYwHii0OwXZ9jb7sbmEcN_E2g31TBxvJU-C75V1srt03KvU_eZOVaofCbhMw1MUyydYElW-7k252WDWIA
Content-Length: 45
Host: localhost:8080
{"name":"mytoken","expiration":1820003901943}
Example Curl request
$ curl 'http://localhost:8080/admins/ByE3n/tokens' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2NzkwMSwiZXhwIjoxNzg4NDcxNTAxfQ.KK_dEAYwHii0OwXZ9jb7sbmEcN_E2g31TBxvJU-C75V1srt03KvU_eZOVaofCbhMw1MUyydYElW-7k252WDWIA' \
-d '{"name":"mytoken","expiration":1820003901943}'
Example HTTP response
HTTP/1.1 201 Created
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
Content-Length: 153
{
"id" : "ByE3n",
"name" : "mytoken",
"value" : "7c8d95cda30045d2499e87883c1abd4a",
"expiration" : 1820003901943,
"createdAt" : 1788467901964
}
5.2.2. List of user’s tokens
GET /admins/{adminId}/tokens
Description
Returns the list of administrator’s tokens. Tokens' values are not reachable after creation.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
adminId |
X |
null |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
403 |
Only sysadmin or target user can call this endpoint. |
List[PersonalToken] |
404 |
Resource does not exist. |
List[PersonalToken] |
Example HTTP request
GET /admins/ByE3n/tokens HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2NzkwMCwiZXhwIjoxNzg4NDcxNTAwfQ.1NxM-MrmHlfpVEEG_AmURI0NbNQz2SNXAGFebnvSVE01p1DB17RkgGLk_---n2a92D7nOeFIRiwotfWJxJ_G_g
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/admins/ByE3n/tokens' -i -X GET \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2NzkwMCwiZXhwIjoxNzg4NDcxNTAwfQ.1NxM-MrmHlfpVEEG_AmURI0NbNQz2SNXAGFebnvSVE01p1DB17RkgGLk_---n2a92D7nOeFIRiwotfWJxJ_G_g'
Example HTTP response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
Content-Length: 185
[ {
"id" : "ByE3n",
"name" : "mytoken",
"expiration" : 1820003900000,
"createdAt" : 1788467900000
}, {
"id" : "By46n",
"name" : "mytoken2",
"createdAt" : 1788467900000
} ]
5.2.3. Delete a token
DELETE /admins/{adminId}/tokens/{id}
Description
Revoke a token of a given admin.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
adminId |
X |
null |
||
id |
X |
null |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
403 |
Only sysadmin or target user can call this endpoint. |
|
404 |
Resource does not exist. |
Example HTTP request
DELETE /admins/ByE3n/tokens/ByE3n HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzg5OSwiZXhwIjoxNzg4NDcxNDk5fQ.hppTZur61-Hg733ONIn-WbU50SUz7cZk53nMFFzpg_e2SVTbWe-s_iX5Cg4rewXy817bFtcU3T4edCGdttMQ5w
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/admins/ByE3n/tokens/ByE3n' -i -X DELETE \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzg5OSwiZXhwIjoxNzg4NDcxNDk5fQ.hppTZur61-Hg733ONIn-WbU50SUz7cZk53nMFFzpg_e2SVTbWe-s_iX5Cg4rewXy817bFtcU3T4edCGdttMQ5w'
Example HTTP response
HTTP/1.1 204 No Content
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
5.3. DomainAliases
5.3.1. Add domain alias
POST /domains/{domainId}/aliases
Description
Add new names to the existing aliases list. Returns the list of added elements
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
domainId |
X |
null |
Body Parameter
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
string |
X |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
404 |
A problem occured. The domain may not exist |
List[Alias] |
403 |
You do not have permission to execute this request. |
List[Alias] |
409 |
An alias or a domain may already exists with the given name |
List[Alias] |
Example HTTP request
POST /domains/Eygdk/aliases HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzc4NywiZXhwIjoxNzg4NDcxMzg3fQ.nYY3EyoeAyqzDilxXqB7NQtK2CVR2GwgzV_gpA6JsyKY9sLZjAqmiKjUduuKQBFp8H5TvR73y-WctdaMozTgtg
Content-Length: 27
Host: localhost:8080
["starks.net","wolves.net"]
Example Curl request
$ curl 'http://localhost:8080/domains/Eygdk/aliases' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzc4NywiZXhwIjoxNzg4NDcxMzg3fQ.nYY3EyoeAyqzDilxXqB7NQtK2CVR2GwgzV_gpA6JsyKY9sLZjAqmiKjUduuKQBFp8H5TvR73y-WctdaMozTgtg' \
-d '["starks.net","wolves.net"]'
Example HTTP response
HTTP/1.1 201 Created
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Access-Control-Expose-Headers: Content-Location
Location: http://localhost:8080/domains/Eygdk/aliases
Content-Type: application/json
Content-Length: 96
[ {
"id" : "ByE3n",
"name" : "starks.net"
}, {
"id" : "By46n",
"name" : "wolves.net"
} ]
5.3.2. Delete a domain alias
DELETE /domains/{domainId}/aliases/{aliasId}
Description
Delete an alias using its ID.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
domainId |
X |
null |
||
aliasId |
X |
null |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
400 |
A problem occured. Possible cause: at least one parameter might not match required format |
|
403 |
You do not have permission to execute this request. |
|
404 |
A problem occured. The domain and/or the alias may not exist |
Example HTTP request
DELETE /domains/Eygdk/aliases/ByE3n HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzc4MSwiZXhwIjoxNzg4NDcxMzgxfQ.qYkXkx8WYIXgBcH7I4bWUPReZaEaruTmvNZWUKI76cULusn__haAu7BEmAbQwW0gqYb1AwESbV-ki8WZsr4Y9g
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/domains/Eygdk/aliases/ByE3n' -i -X DELETE \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzc4MSwiZXhwIjoxNzg4NDcxMzgxfQ.qYkXkx8WYIXgBcH7I4bWUPReZaEaruTmvNZWUKI76cULusn__haAu7BEmAbQwW0gqYb1AwESbV-ki8WZsr4Y9g'
Example HTTP response
HTTP/1.1 204 No Content
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
5.3.3. List domain aliases
GET /domains/{domainId}/aliases
Description
Returns the aliases lists of the domain
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
domainId |
X |
null |
Query Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
sort |
Define the sort applied on response. Prefix the field name by '-' to reverse the sort. |
- |
null |
|
offset |
Index of the first alias to return, defaults to 0 |
- |
null |
|
pageSize |
Maximum number of aliases returned, defaults to 40 |
- |
null |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
404 |
A problem occured. The domain may not exist |
List[Alias] |
403 |
You do not have permission to execute this request. |
List[Alias] |
Example HTTP request
GET /domains/Eygdk/aliases HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzc5MSwiZXhwIjoxNzg4NDcxMzkxfQ.lPrm9IBsZnHOEfe0cpO89Z2qrDkiE6yeAlSQq66mWML8GUMHGFG8r03KdtXe8z1PX3kjvnUs2NrJhyu7vg_Slw
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/domains/Eygdk/aliases' -i -X GET \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzc5MSwiZXhwIjoxNzg4NDcxMzkxfQ.lPrm9IBsZnHOEfe0cpO89Z2qrDkiE6yeAlSQq66mWML8GUMHGFG8r03KdtXe8z1PX3kjvnUs2NrJhyu7vg_Slw'
Example HTTP response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Access-Control-Expose-Headers: X-Total-Count
X-Total-Count: 2
Content-Type: application/json
Content-Length: 98
[ {
"id" : "By46n",
"name" : "lanisters.net"
}, {
"id" : "ByE3n",
"name" : "lions.net"
} ]
5.3.4. Edit domain aliases
PUT /domains/{domainId}/aliases
Description
Replace the aliases of the domain by the given list of aliases. Returns the list of aliases
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
domainId |
X |
null |
Body Parameter
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
string |
X |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
404 |
A problem occured. The domain may not exist |
List[Alias] |
403 |
You do not have permission to execute this request. |
List[Alias] |
409 |
An alias may already exists with the given name |
List[Alias] |
Example HTTP request
PUT /domains/Eygdk/aliases HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzc4MiwiZXhwIjoxNzg4NDcxMzgyfQ.7juIKBE_86iD3Cu8UqtF2Q5_oJw5DbHudXzQ2ThscYsQJS7WUF3-wPwduK3uUanXXZ-bRmi__d8_bH9ZJpqOnQ
Content-Length: 29
Host: localhost:8080
["lanisters.net","lions.net"]
Example Curl request
$ curl 'http://localhost:8080/domains/Eygdk/aliases' -i -X PUT \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzc4MiwiZXhwIjoxNzg4NDcxMzgyfQ.7juIKBE_86iD3Cu8UqtF2Q5_oJw5DbHudXzQ2ThscYsQJS7WUF3-wPwduK3uUanXXZ-bRmi__d8_bH9ZJpqOnQ' \
-d '["lanisters.net","lions.net"]'
Example HTTP response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
Content-Length: 98
[ {
"id" : "ByE3n",
"name" : "lions.net"
}, {
"id" : "By46n",
"name" : "lanisters.net"
} ]
5.4. DomainPolicies
5.4.1. New policy
POST /domains/{domainId}/policies
Description
Create a new policy in a given domain. Only sysadmin can create a new policy.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
domainId |
X |
null |
Body Parameter
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
Policy |
X |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
403 |
Only users with sysadmin role can execute this request. |
|
409 |
A policy may already exists with the given name |
|
422 |
Operation cannot be done because of not met conditions. |
|
201 |
Created |
Example HTTP request
POST /domains/ByE3n/policies HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2NzkxMSwiZXhwIjoxNzg4NDcxNTExfQ.e9Nk40DbZkHP8TI8StbYW-n0FXCEGDp9qOGkFS9JxF6AaqpsEVaosSGIo_dn4P8Oqtta6dGN7FUswaZjjwzuuw
Content-Length: 516
Host: localhost:8080
{"name":"policyA","domainId":"ByE3n","quarantine":true,"retention":false,"archive":false,"mailSizeLimit":8,"spamScore":7.2,"incoming":true,"relayProps":{"relaySpam":true,"advertPrefix":"[PUB]","prefixSpam":"[SPAM]","relayBadHeaders":true,"relayBadAttachments":true,"spamScoreLimit":20.0},"quarantineProps":{"duration":31,"storeSpam":true,"storeVirus":true,"storeAdvert":true,"storeBlacklisted":true,"storeSenderVerify":true,"storeBadHeaders":true,"storeBadEncoding":true,"storeBadAttachments":true},"outgoing":false}
Example Curl request
$ curl 'http://localhost:8080/domains/ByE3n/policies' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2NzkxMSwiZXhwIjoxNzg4NDcxNTExfQ.e9Nk40DbZkHP8TI8StbYW-n0FXCEGDp9qOGkFS9JxF6AaqpsEVaosSGIo_dn4P8Oqtta6dGN7FUswaZjjwzuuw' \
-d '{"name":"policyA","domainId":"ByE3n","quarantine":true,"retention":false,"archive":false,"mailSizeLimit":8,"spamScore":7.2,"incoming":true,"relayProps":{"relaySpam":true,"advertPrefix":"[PUB]","prefixSpam":"[SPAM]","relayBadHeaders":true,"relayBadAttachments":true,"spamScoreLimit":20.0},"quarantineProps":{"duration":31,"storeSpam":true,"storeVirus":true,"storeAdvert":true,"storeBlacklisted":true,"storeSenderVerify":true,"storeBadHeaders":true,"storeBadEncoding":true,"storeBadAttachments":true},"outgoing":false}'
Example HTTP response
HTTP/1.1 201 Created
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Access-Control-Expose-Headers: Content-Location
Location: http://localhost:8080/policies/Eygdk
Content-Type: application/json
Content-Length: 779
{
"id" : "Eygdk",
"name" : "policyA",
"domainId" : "ByE3n",
"quarantine" : true,
"retention" : false,
"archive" : false,
"mailSizeLimit" : 8,
"spamScore" : 7.2,
"incoming" : true,
"relayProps" : {
"relaySpam" : true,
"relayAdvert" : true,
"advertPrefix" : "[PUB]",
"prefixSpam" : "[SPAM]",
"relayBadHeaders" : true,
"relayBadAttachments" : true,
"spamScoreLimit" : 20.0
},
"quarantineProps" : {
"duration" : 31,
"storeSpam" : true,
"storeVirus" : true,
"storeAdvert" : true,
"storeBlacklisted" : true,
"storeSenderVerify" : true,
"storeBadHeaders" : true,
"storeBadEncoding" : true,
"storeBadAttachments" : true
},
"retentionProps" : null,
"archiveProps" : null,
"outgoing" : false
}
5.4.2. Delete a policy
DELETE /policies/{policyId}
Description
Delete an existing policy. Only sysadmin can delete a policy.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
policyId |
X |
null |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
404 |
Policy not found with given id. |
|
400 |
A problem occured. Possible cause: the policy is affected to a domain or a user. |
|
403 |
Only users with sysadmin role can execute this request. |
Example HTTP request
DELETE /policies/Eygdk HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2NzkyNiwiZXhwIjoxNzg4NDcxNTI2fQ.W7sT1aw_Z9lavHZrDzffGFe9Gufg25IU9xRwI5UqhuicXxL8RAIohEFV-5jB9-X0z-96nFrMVtqcK62e7HkV1Q
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/policies/Eygdk' -i -X DELETE \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2NzkyNiwiZXhwIjoxNzg4NDcxNTI2fQ.W7sT1aw_Z9lavHZrDzffGFe9Gufg25IU9xRwI5UqhuicXxL8RAIohEFV-5jB9-X0z-96nFrMVtqcK62e7HkV1Q'
Example HTTP response
HTTP/1.1 204 No Content
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
5.4.3. Single domain policy
GET /policies/{policyId}
Description
Get all parameters of an existing policy
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
policyId |
X |
null |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
404 |
Policy not found with given id |
Example HTTP request
GET /policies/YyjPn HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2NzkxMywiZXhwIjoxNzg4NDcxNTEzfQ.Y6UrJqvx9_QDvgAaT4W5Kgs1oOeKKxcBtOQqkpyUR9PyIwzDwmcMXsswBdjH1MW9EATJTKVjk1jKe6lKzGAL9A
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/policies/YyjPn' -i -X GET \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2NzkxMywiZXhwIjoxNzg4NDcxNTEzfQ.Y6UrJqvx9_QDvgAaT4W5Kgs1oOeKKxcBtOQqkpyUR9PyIwzDwmcMXsswBdjH1MW9EATJTKVjk1jKe6lKzGAL9A'
Example HTTP response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
Content-Length: 1111
{
"id" : "YyjPn",
"name" : "DefaultTestPolicy",
"domainId" : "Eygdk",
"quarantine" : true,
"retention" : false,
"archive" : true,
"mailSizeLimit" : 6,
"spamScore" : 7.6,
"incoming" : true,
"relayProps" : {
"relaySpam" : false,
"relayAdvert" : true,
"advertPrefix" : "[ADVERT]",
"prefixSpam" : null,
"relayBadHeaders" : false,
"relayBadAttachments" : false,
"spamScoreLimit" : 7.6
},
"quarantineProps" : {
"duration" : 3,
"storeSpam" : true,
"storeVirus" : false,
"storeAdvert" : false,
"storeBlacklisted" : false,
"storeSenderVerify" : false,
"storeBadHeaders" : true,
"storeBadEncoding" : true,
"storeBadAttachments" : true
},
"retentionProps" : null,
"archiveProps" : {
"duration" : 12,
"archiveByCopy" : false,
"storeMailOut" : true,
"storeCleanMailIn" : true,
"storeSpam" : true,
"storeBadHeaders" : true,
"storeBadEncoding" : true,
"storeBadAttachments" : true,
"storeAdvert" : false,
"storeBlacklisted" : false,
"storeSenderVerify" : false
},
"outgoing" : false
}
5.4.4. List domain policies
GET /domains/{domainId}/policies
Description
Returns a list of policies of a given domain.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
domainId |
X |
null |
Query Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
sort |
Define the sort applied on response. Prefix the field name by '-' to reverse the sort. |
- |
null |
|
offset |
Index of the first domain to return, defaults to 0 |
- |
null |
|
pageSize |
Maximum number of domains returned, defaults to 40 |
- |
null |
Return Type
array[Policy]
Content Type
-
application/json
Example HTTP request
GET /domains/ByE3n/policies HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2NzkxNiwiZXhwIjoxNzg4NDcxNTE2fQ.1KJquM1bckMzZNSVj27C5JI14fGlJ7FEWniKkNkXJR6qtqDMMHSdoqYYxQRYby7NvdEEy_K-hTq_HyuPUEBgfg
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/domains/ByE3n/policies' -i -X GET \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2NzkxNiwiZXhwIjoxNzg4NDcxNTE2fQ.1KJquM1bckMzZNSVj27C5JI14fGlJ7FEWniKkNkXJR6qtqDMMHSdoqYYxQRYby7NvdEEy_K-hTq_HyuPUEBgfg'
Example HTTP response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Access-Control-Expose-Headers: X-Total-Count
X-Total-Count: 2
Content-Type: application/json
Content-Length: 1984
[ {
"id" : "Eygdk",
"name" : "policyB",
"domainId" : "ByE3n",
"quarantine" : true,
"retention" : false,
"archive" : false,
"mailSizeLimit" : 14,
"spamScore" : 5.0,
"incoming" : true,
"relayProps" : {
"relaySpam" : false,
"relayAdvert" : true,
"advertPrefix" : "",
"prefixSpam" : null,
"relayBadHeaders" : false,
"relayBadAttachments" : false,
"spamScoreLimit" : 5.0
},
"quarantineProps" : {
"duration" : 30,
"storeSpam" : true,
"storeVirus" : false,
"storeAdvert" : false,
"storeBlacklisted" : false,
"storeSenderVerify" : false,
"storeBadHeaders" : true,
"storeBadEncoding" : true,
"storeBadAttachments" : true
},
"retentionProps" : null,
"archiveProps" : null,
"outgoing" : false
}, {
"id" : "ByE3n",
"name" : "Politique-lannister.net",
"domainId" : "ByE3n",
"quarantine" : true,
"retention" : true,
"archive" : true,
"mailSizeLimit" : 5,
"spamScore" : 6.8,
"incoming" : true,
"relayProps" : {
"relaySpam" : true,
"relayAdvert" : true,
"advertPrefix" : "[AD]",
"prefixSpam" : null,
"relayBadHeaders" : true,
"relayBadAttachments" : true,
"spamScoreLimit" : 10.0
},
"quarantineProps" : {
"duration" : 31,
"storeSpam" : false,
"storeVirus" : false,
"storeAdvert" : false,
"storeBlacklisted" : false,
"storeSenderVerify" : false,
"storeBadHeaders" : false,
"storeBadEncoding" : false,
"storeBadAttachments" : false
},
"retentionProps" : {
"duration" : 5,
"storeMailOut" : false,
"storeCleanMailIn" : false
},
"archiveProps" : {
"duration" : 48,
"archiveByCopy" : false,
"storeMailOut" : false,
"storeCleanMailIn" : false,
"storeSpam" : false,
"storeBadHeaders" : false,
"storeBadEncoding" : false,
"storeBadAttachments" : false,
"storeAdvert" : false,
"storeBlacklisted" : false,
"storeSenderVerify" : false
},
"outgoing" : false
} ]
5.4.5. Edit a policy
PATCH /policies/{policyId}
Description
Edit properties of an existing policy. Apply changes only on specified fields in request. Attributes which are not provided will not be updated. Only sysadmin can update a policy.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
policyId |
X |
null |
Body Parameter
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
Policy |
X |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
400 |
A problem occured. Possible cause: the policy name does not match required format |
|
403 |
Only users with sysadmin role can execute this request. |
|
422 |
Operation cannot be done because of not met conditions. |
|
404 |
Policy not found with given id |
Example HTTP request
PATCH /policies/ByE3n HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2NzkyOCwiZXhwIjoxNzg4NDcxNTI4fQ.UURPfn0RvUisSLB8R4s22K6GOJjcAtimp7ctOeWMoUMVtUL79I8dVqE7gOP5GnISDB2rLR8VIzuQhS-eFmzVXw
Content-Length: 18
Host: localhost:8080
{"name":"policyC"}
Example Curl request
$ curl 'http://localhost:8080/policies/ByE3n' -i -X PATCH \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2NzkyOCwiZXhwIjoxNzg4NDcxNTI4fQ.UURPfn0RvUisSLB8R4s22K6GOJjcAtimp7ctOeWMoUMVtUL79I8dVqE7gOP5GnISDB2rLR8VIzuQhS-eFmzVXw' \
-d '{"name":"policyC"}'
Example HTTP response
HTTP/1.1 204 No Content
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
5.5. Domains
5.5.1. Create domain
POST /domains
Description
Create a new domain. System will create a default policy with the given data (quarantine, archive, retention). Next, use policies API to set default values of different services.
Parameters
Body Parameter
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
DomainAdd |
X |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
400 |
A problem occurred. Possible cause: the domain name does not match required format |
|
403 |
Authorisation failure. You may have reached the limitation of domain creation or you do not have the sysadmin role. |
|
409 |
A domain may already exists with the given name |
|
422 |
Operation cannot be done because of not met conditions. |
|
201 |
Created |
Example HTTP request
POST /domains HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2NzgzMiwiZXhwIjoxNzg4NDcxNDMyfQ.ROY8Bim6N1-wlzP1u9pSVeFyTfVrsqVONHpqH6uMRRXRfLCqsEPEgb16j1jUwN0bHKJUkgiCiyYnB_KtDZLNow
Content-Length: 464
Host: localhost:8080
{"name":"got.com","status":"ENABLED","incoming":true,"outgoing":false,"quarantine":true,"retention":true,"archive":true,"defaultLanguage":"DE","autoProvisioningOn":true,"greylistingOn":true,"senderVerifyOn":true,"customerId":"ByE3n","externalId":"HBO-2019","outgoingSubnets":["92.123.51.204/31","92.23.81.244/31"],"platforms":[{"name":"platform","transportDest":"1.2.3.4","transportType":"SMTP","transportPort":25,"authType":"local","authData":"","default":true}]}
Example Curl request
$ curl 'http://localhost:8080/domains' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2NzgzMiwiZXhwIjoxNzg4NDcxNDMyfQ.ROY8Bim6N1-wlzP1u9pSVeFyTfVrsqVONHpqH6uMRRXRfLCqsEPEgb16j1jUwN0bHKJUkgiCiyYnB_KtDZLNow' \
-d '{"name":"got.com","status":"ENABLED","incoming":true,"outgoing":false,"quarantine":true,"retention":true,"archive":true,"defaultLanguage":"DE","autoProvisioningOn":true,"greylistingOn":true,"senderVerifyOn":true,"customerId":"ByE3n","externalId":"HBO-2019","outgoingSubnets":["92.123.51.204/31","92.23.81.244/31"],"platforms":[{"name":"platform","transportDest":"1.2.3.4","transportType":"SMTP","transportPort":25,"authType":"local","authData":"","default":true}]}'
Example HTTP response
HTTP/1.1 201 Created
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Access-Control-Expose-Headers: Content-Location
Location: http://localhost:8080/domains/Eygdk
Content-Type: application/json
Content-Length: 2441
{
"id" : "Eygdk",
"name" : "got.com",
"description" : null,
"status" : "ENABLED",
"wblistPriority" : "USER",
"defaultLanguage" : "DE",
"autoProvisioningOn" : true,
"senderVerifyOn" : true,
"greylistingOn" : true,
"externalId" : null,
"policy" : {
"id" : "Eygdk",
"name" : "Politique-got.com",
"domainId" : "Eygdk",
"quarantine" : true,
"retention" : true,
"archive" : true,
"mailSizeLimit" : 21,
"spamScore" : 5.0,
"incoming" : true,
"relayProps" : {
"relaySpam" : false,
"relayAdvert" : true,
"advertPrefix" : "",
"prefixSpam" : null,
"relayBadHeaders" : false,
"relayBadAttachments" : false,
"spamScoreLimit" : 5.0
},
"quarantineProps" : {
"duration" : 31,
"storeSpam" : true,
"storeVirus" : false,
"storeAdvert" : false,
"storeBlacklisted" : false,
"storeSenderVerify" : false,
"storeBadHeaders" : true,
"storeBadEncoding" : true,
"storeBadAttachments" : true
},
"retentionProps" : {
"duration" : 5,
"storeMailOut" : true,
"storeCleanMailIn" : true
},
"archiveProps" : {
"duration" : 48,
"archiveByCopy" : false,
"storeMailOut" : true,
"storeCleanMailIn" : true,
"storeSpam" : true,
"storeBadHeaders" : true,
"storeBadEncoding" : true,
"storeBadAttachments" : true,
"storeAdvert" : false,
"storeBlacklisted" : false,
"storeSenderVerify" : false
},
"outgoing" : false
},
"domainAliases" : [ ],
"activeUsersCount" : 0,
"policiesCount" : 1,
"quarantine" : true,
"retention" : true,
"archive" : true,
"incoming" : true,
"outgoingSubnets" : [ "92.123.51.204/31", "92.23.81.244/31" ],
"creationDate" : 1788467832745,
"deletionDate" : null,
"purgeDate" : null,
"outgoingProviders" : [ ],
"customer" : {
"id" : "ByE3n",
"brokerId" : "ByE3n",
"name" : "Alinto",
"description" : null,
"externalId" : null,
"createdAt" : 1788467832000
},
"platforms" : [ {
"id" : "Eygdk",
"name" : "platform",
"transportDest" : "1.2.3.4",
"transportType" : "SMTP",
"transportPort" : 25,
"fallbackTransportDest" : null,
"fallbackTransportType" : null,
"fallbackTransportPort" : null,
"apiType" : null,
"apiData" : null,
"authType" : "local",
"authData" : null,
"default" : true
} ]
}
5.5.2. Affect users access
PUT /domains/{domainId}/access
Description
Define list of permissions assigned to end users of a domain.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
domainId |
X |
null |
Body Parameter
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
string |
X |
5.5.3. Create admin access
POST /domains/{domainId}/admins
Description
Create a new administrator access on current domain.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
domainId |
X |
null |
Body Parameter
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
AdminAdd |
X |
5.5.4. Delete domain option
DELETE /domains/{domainId}/options/{optionName}
Description
Delete option value for domain scope. The value of the parent scope will be used
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
domainId |
X |
null |
||
optionName |
X |
null |
Content Type
-
application/json
Example HTTP request
DELETE /domains/Eygdk/options/DOMAIN_ADMIN HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2NzgyOCwiZXhwIjoxNzg4NDcxNDI4fQ.DKRPkrHBYq6P7_u-hQX3RKCwkDsHj-x0oJoqr5g8eapJiE_UlamYGw9s_Gg1BFpARjZpVMTKH_ER0V9KnpdfRQ
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/domains/Eygdk/options/DOMAIN_ADMIN' -i -X DELETE \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2NzgyOCwiZXhwIjoxNzg4NDcxNDI4fQ.DKRPkrHBYq6P7_u-hQX3RKCwkDsHj-x0oJoqr5g8eapJiE_UlamYGw9s_Gg1BFpARjZpVMTKH_ER0V9KnpdfRQ'
Example HTTP response
HTTP/1.1 204 No Content
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
5.5.5. Revoke admin access
DELETE /domains/{domainId}/admins/{adminId}
Description
Delete administrator access on current domain. If this admin has no other access, the account will be deleted.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
domainId |
X |
null |
||
adminId |
X |
null |
5.5.6. Delete a domain
DELETE /domains/{domainId}
Description
Delete an existing domain and its users. Domain is just tagged as deleted. All services are suspended. Domain will be really deleted after a quarantine delay. You can revert the deletion during this quarantine. Only sysadmin can delete a domain.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
domainId |
X |
null |
Header Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
X-Ignore-MX |
- |
null |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
403 |
Only users with sysadmin role can execute this request. |
|
404 |
Domain not found with given id |
|
422 |
Operation cannot be done because of not met conditions. |
Example HTTP request
DELETE /domains/Eygdk HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2NzgzMCwiZXhwIjoxNzg4NDcxNDMwfQ.PcCPRXpfDnrWa927450UJ-uHHxN0qeXneTtDmMze1MCnMUAxN0__Nj8NdAdywRMhCoLU5I-MunZJhx2a8zTLqw
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/domains/Eygdk' -i -X DELETE \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2NzgzMCwiZXhwIjoxNzg4NDcxNDMwfQ.PcCPRXpfDnrWa927450UJ-uHHxN0qeXneTtDmMze1MCnMUAxN0__Nj8NdAdywRMhCoLU5I-MunZJhx2a8zTLqw'
Example HTTP response
HTTP/1.1 204 No Content
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
5.5.7. Get admin
GET /domains/{domainId}/admins/{adminId}
Description
Get administrator account and all the associated permissions.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
domainId |
X |
null |
||
adminId |
X |
null |
5.5.8. Single domain
GET /domains/{domainId}
Description
Get an existing domain
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
domainId |
X |
null |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
404 |
Domain not found with given id |
Example HTTP request
GET /domains/Eygdk HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2NzgzNCwiZXhwIjoxNzg4NDcxNDM0fQ.nbbjnL7m_W_FIKyLnvQsCIuZ-XwcbiyFlZ26JJ8y4PKIA7-5-Xr6GSicVPc17xHeuA2VHqjybLflEBGgvuhUtA
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/domains/Eygdk' -i -X GET \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2NzgzNCwiZXhwIjoxNzg4NDcxNDM0fQ.nbbjnL7m_W_FIKyLnvQsCIuZ-XwcbiyFlZ26JJ8y4PKIA7-5-Xr6GSicVPc17xHeuA2VHqjybLflEBGgvuhUtA'
Example HTTP response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
Content-Length: 1823
{
"id" : "Eygdk",
"name" : "got.com",
"description" : null,
"status" : "ENABLED",
"wblistPriority" : "USER",
"defaultLanguage" : "EN",
"autoProvisioningOn" : false,
"senderVerifyOn" : true,
"greylistingOn" : true,
"externalId" : null,
"policy" : {
"id" : "Eygdk",
"name" : "Politique-got.com",
"domainId" : "Eygdk",
"quarantine" : false,
"retention" : false,
"archive" : false,
"mailSizeLimit" : 21,
"spamScore" : 5.0,
"incoming" : true,
"relayProps" : {
"relaySpam" : true,
"relayAdvert" : true,
"advertPrefix" : "",
"prefixSpam" : null,
"relayBadHeaders" : true,
"relayBadAttachments" : true,
"spamScoreLimit" : 10.0
},
"quarantineProps" : null,
"retentionProps" : null,
"archiveProps" : null,
"outgoing" : false
},
"domainAliases" : [ ],
"activeUsersCount" : 0,
"policiesCount" : 1,
"quarantine" : false,
"retention" : false,
"archive" : false,
"incoming" : true,
"outgoingSubnets" : [ ],
"creationDate" : 1788467834000,
"deletionDate" : null,
"purgeDate" : null,
"outgoingProviders" : [ {
"id" : "ByE3n",
"name" : "Microsoft",
"spfProvider" : "spf.protection.outlook.com",
"active" : true
} ],
"customer" : {
"id" : "ByE3n",
"brokerId" : "ByE3n",
"name" : "Alinto",
"description" : null,
"externalId" : null,
"createdAt" : 1788467834000
},
"platforms" : [ {
"id" : "Eygdk",
"name" : "platform",
"transportDest" : "1.2.3.4",
"transportType" : "SMTP",
"transportPort" : 25,
"fallbackTransportDest" : null,
"fallbackTransportType" : null,
"fallbackTransportPort" : null,
"apiType" : null,
"apiData" : null,
"authType" : "local",
"authData" : null,
"default" : true
} ]
}
5.5.9. List admins
GET /domains/{domainId}/admins
Description
List all administrators accounts defined on domain.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
domainId |
X |
null |
Query Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
offset |
- |
0 |
||
pageSize |
- |
40 |
||
sort |
Define the sort applied on response. Prefix the field login by '-' to reverse the sort. |
- |
null |
|
search |
Filter by login, email, displayName |
- |
null |
Return Type
array[Admin]
5.5.10. List domain options
GET /domains/{domainId}/options
Description
Returns a list of options defined for given domain
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
domainId |
X |
null |
Return Type
array[Option]
Content Type
-
application/json
Example HTTP request
GET /domains/Eygdk/options HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2NzgzMSwiZXhwIjoxNzg4NDcxNDMxfQ.u9VHuiWyG75nEPmIxegIJe8jA7A8mF1WfB1swIi3w7taaOP57jfno3StPia2jJQSKBSdw-0axVcjQ2Y3VFWo9w
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/domains/Eygdk/options' -i -X GET \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2NzgzMSwiZXhwIjoxNzg4NDcxNDMxfQ.u9VHuiWyG75nEPmIxegIJe8jA7A8mF1WfB1swIi3w7taaOP57jfno3StPia2jJQSKBSdw-0axVcjQ2Y3VFWo9w'
Example HTTP response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Access-Control-Expose-Headers: X-Total-Count
X-Total-Count: 3
Content-Type: application/json
Content-Length: 1094
[ {
"value" : null,
"parentValue" : "protect.winterfell.net",
"option" : {
"ptfScope" : true,
"urlScope" : false,
"customerScope" : true,
"domainScope" : true,
"userScope" : false,
"restricted" : true,
"group" : null,
"name" : "APP_URL",
"type" : "HOST",
"values" : null,
"description" : null
}
}, {
"value" : "domain_value",
"parentValue" : "value_by_default",
"option" : {
"ptfScope" : true,
"urlScope" : false,
"customerScope" : false,
"domainScope" : true,
"userScope" : false,
"restricted" : false,
"group" : null,
"name" : "DOMAIN_OPTION_EXAMPLE",
"type" : "STRING",
"values" : null,
"description" : null
}
}, {
"value" : "reporter@targaryen.net",
"parentValue" : "noreply@cleanmail.eu",
"option" : {
"ptfScope" : true,
"urlScope" : false,
"customerScope" : false,
"domainScope" : true,
"userScope" : false,
"restricted" : false,
"group" : null,
"name" : "DOMAIN_ADMIN",
"type" : "EMAIL",
"values" : null,
"description" : null
}
} ]
5.5.11. List domains
GET /domains
Description
Returns a list of domains. If the response does not contain a domain which does exist, the problem might caused by a missing security role on the searched domain.
Parameters
Query Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
offset |
Index of the first domain to return, defaults to 0 |
- |
null |
|
pageSize |
Maximum number of domains returned, defaults to 40 |
- |
null |
|
sort |
Define the sort applied on response. Prefix the field name by '-' to reverse the sort. |
- |
null |
|
name |
Filter domains by name |
- |
null |
|
status |
Filter domains by status |
- |
null |
|
customerId |
Filter domains by customer Id |
- |
null |
|
externalId |
Filter domains by external Id |
- |
null |
|
platformId |
Filter domains by platform id |
- |
null |
|
platformName |
Filter domains by platform name |
- |
null |
Return Type
array[Domain]
Content Type
-
application/json
Example HTTP request
GET /domains?name=stark.net HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2NzgzNSwiZXhwIjoxNzg4NDcxNDM1fQ.XrAc6_F7ZjRjYba5JWk5vpbtJawd4GFrRAPfKCJA9pFh_j5XC4OzBE8BhDK8Qx7NKfNmG3vl5EGNQzJcRg8yxA
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/domains?name=stark.net' -i -X GET \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2NzgzNSwiZXhwIjoxNzg4NDcxNDM1fQ.XrAc6_F7ZjRjYba5JWk5vpbtJawd4GFrRAPfKCJA9pFh_j5XC4OzBE8BhDK8Qx7NKfNmG3vl5EGNQzJcRg8yxA'
Example HTTP response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Access-Control-Expose-Headers: X-Total-Count
X-Total-Count: 1
Content-Type: application/json
Content-Length: 1831
[ {
"id" : "Eygdk",
"name" : "stark.net",
"description" : null,
"status" : "ENABLED",
"wblistPriority" : "USER",
"defaultLanguage" : "FR",
"autoProvisioningOn" : false,
"senderVerifyOn" : true,
"greylistingOn" : true,
"externalId" : null,
"policy" : {
"id" : "Eygdk",
"name" : "Politique-stark.net",
"domainId" : "Eygdk",
"quarantine" : false,
"retention" : false,
"archive" : false,
"mailSizeLimit" : 21,
"spamScore" : 5.0,
"incoming" : true,
"relayProps" : {
"relaySpam" : true,
"relayAdvert" : true,
"advertPrefix" : "",
"prefixSpam" : null,
"relayBadHeaders" : true,
"relayBadAttachments" : true,
"spamScoreLimit" : 10.0
},
"quarantineProps" : null,
"retentionProps" : null,
"archiveProps" : null,
"outgoing" : false
},
"domainAliases" : [ ],
"activeUsersCount" : 0,
"policiesCount" : 1,
"quarantine" : false,
"retention" : false,
"archive" : false,
"incoming" : true,
"outgoingSubnets" : [ ],
"creationDate" : 1788467835000,
"deletionDate" : null,
"purgeDate" : null,
"outgoingProviders" : [ {
"id" : "ByE3n",
"name" : "Microsoft",
"spfProvider" : "spf.protection.outlook.com",
"active" : true
} ],
"customer" : {
"id" : "ByE3n",
"brokerId" : "ByE3n",
"name" : "Alinto",
"description" : null,
"externalId" : null,
"createdAt" : 1788467835000
},
"platforms" : [ {
"id" : "Eygdk",
"name" : "platform",
"transportDest" : "1.2.3.4",
"transportType" : "SMTP",
"transportPort" : 25,
"fallbackTransportDest" : null,
"fallbackTransportType" : null,
"fallbackTransportPort" : null,
"apiType" : null,
"apiData" : null,
"authType" : "local",
"authData" : null,
"default" : true
} ]
} ]
5.5.12. List users access
GET /domains/{domainId}/access
Description
List all permissions assigned to end users of a domain.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
domainId |
X |
null |
Return Type
array[AclPermissionStatus]
Responses
| Code | Message | Datatype |
|---|---|---|
200 |
OK |
List[AclPermissionStatus] |
5.5.13. Define admin access
PUT /domains/{domainId}/admins/{adminId}/authorities
Description
Set administrator accesses on current domain.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
domainId |
X |
null |
||
adminId |
X |
null |
Body Parameter
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
string |
X |
5.5.14. Set domain option
POST /domains/{domainId}/options
Description
Set option value to a domain. The list of available options can be consulted in api GET /options
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
domainId |
X |
null |
Body Parameter
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
OptionAdd |
X |
Content Type
-
application/json
Example HTTP request
POST /domains/Eygdk/options HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2NzgzMywiZXhwIjoxNzg4NDcxNDMzfQ.EeOxCobYMaesEVeXHSB_YlsHav-eeJHY25IOshQXlp1Kt8rVPn5d3_xYFpYTJxIVBidENx3-jZsb2TYXSabSeg
Content-Length: 53
Host: localhost:8080
{"name":"DOMAIN_ADMIN","value":"admin@targaryen.net"}
Example Curl request
$ curl 'http://localhost:8080/domains/Eygdk/options' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2NzgzMywiZXhwIjoxNzg4NDcxNDMzfQ.EeOxCobYMaesEVeXHSB_YlsHav-eeJHY25IOshQXlp1Kt8rVPn5d3_xYFpYTJxIVBidENx3-jZsb2TYXSabSeg' \
-d '{"name":"DOMAIN_ADMIN","value":"admin@targaryen.net"}'
Example HTTP response
HTTP/1.1 201 Created
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
Content-Length: 370
{
"value" : "admin@targaryen.net",
"parentValue" : "support@cleanmail.tld",
"option" : {
"ptfScope" : true,
"urlScope" : false,
"customerScope" : false,
"domainScope" : true,
"userScope" : false,
"restricted" : false,
"group" : null,
"name" : "DOMAIN_ADMIN",
"type" : "EMAIL",
"values" : null,
"description" : null
}
}
5.5.15. Edit a domain
PATCH /domains/{domainId}
Description
Edit properties of an existing domain. Apply changes only on specified fields in request. Attributes which are not provided will not be updated.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
domainId |
X |
null |
Body Parameter
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
DomainUpdate |
X |
Header Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
X-Ignore-MX |
- |
null |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
400 |
A problem occured. Possible cause: the domain name does not match required format |
|
422 |
Operation cannot be done because of not met conditions. |
|
404 |
Domain not found with given id |
Example HTTP request
PATCH /domains/Eygdk HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2NzgyOSwiZXhwIjoxNzg4NDcxNDI5fQ.AH2oSCUQo4XgttVrpTD051ptwbgjyX3b7Pxw2FTwoHgqMFyna8SkMk359loPZ1X0OdVNJ3CMWmn5TV_d8uuiOA
Content-Length: 24
Host: localhost:8080
{"defaultLanguage":"ES"}
Example Curl request
$ curl 'http://localhost:8080/domains/Eygdk' -i -X PATCH \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2NzgyOSwiZXhwIjoxNzg4NDcxNDI5fQ.AH2oSCUQo4XgttVrpTD051ptwbgjyX3b7Pxw2FTwoHgqMFyna8SkMk359loPZ1X0OdVNJ3CMWmn5TV_d8uuiOA' \
-d '{"defaultLanguage":"ES"}'
Example HTTP response
HTTP/1.1 204 No Content
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
5.6. DomainsDKIM
5.6.1. Add DKIM
POST /domains/{domainId}/dkim
Description
Create DKIM entry and return public key.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
domainId |
X |
null |
Body Parameter
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
DkimDTO |
- |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
404 |
A problem occured. The domain may not exist. |
List[[string]] |
403 |
You do not have permission to execute this request. (sysadmin required) |
List[[string]] |
Example HTTP request
POST /domains/Eygdk/dkim HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2NzgxOCwiZXhwIjoxNzg4NDcxNDE4fQ.UMUJVWinBXdx7UXs9skoI7rzxRsepDM2CxM1lNuk3hKTiW74FCWdrkK-MsajNGRnEGKIko6AWhtX7t-IR3d0Kg
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/domains/Eygdk/dkim' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2NzgxOCwiZXhwIjoxNzg4NDcxNDE4fQ.UMUJVWinBXdx7UXs9skoI7rzxRsepDM2CxM1lNuk3hKTiW74FCWdrkK-MsajNGRnEGKIko6AWhtX7t-IR3d0Kg'
Example HTTP response
HTTP/1.1 201 Created
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
Content-Length: 442
[ "protect._domainkey.stark.com TXT v=DKIM1; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3I+77cuAz9vvYE/m9sk0YL6prxMO4wyAUUvHsA3db0GtADXtw2CCvrxfPoMwZDxCyAJa8IsodY7A6YJJLbMUki9u8B09UCNJ0HZBIX2xWDrJN4ackqd43FuAtmBWC+su6fdgFdWlqJjLeRIIWiS2yKB0EWQJxFQLSTKbRFosFvRvlrj2fAq8f9ucsunyilbRVvimmQokkWA8bNYMS4fUYNCwK+pPUVFbhQ7iC8529EVNRVOlVQGUr4QB8ezAEimdDp471BxdoI1Jg2cCE04IXWn/efe6+huxcwENUojVcqC43FmxysQcPKgy2OfXTUVEe0VppzKx3mrFxHsoJEF29QIDAQAB" ]
5.6.2. Delete domain DKIM
DELETE /domains/{domainId}/dkim
Description
Delete dkim informations of an existing domain.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
domainId |
X |
null |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
403 |
You do not have permission to execute this request. (sysadmin required) |
|
404 |
A problem occured. The domain may not exist |
Example HTTP request
DELETE /domains/Eygdk/dkim HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2NzgxNSwiZXhwIjoxNzg4NDcxNDE1fQ.UhpgiLFp8lWC-COY_wfw50rUEoLkZg8lFZklyjnUbH-aYs18AAlq3uZtGkilQiluuLiaKjfsWT2yfFtGh3HMYQ
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/domains/Eygdk/dkim' -i -X DELETE \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2NzgxNSwiZXhwIjoxNzg4NDcxNDE1fQ.UhpgiLFp8lWC-COY_wfw50rUEoLkZg8lFZklyjnUbH-aYs18AAlq3uZtGkilQiluuLiaKjfsWT2yfFtGh3HMYQ'
Example HTTP response
HTTP/1.1 204 No Content
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
5.6.3. Get DKIM
GET /domains/{domainId}/dkim
Description
Get the DKIM values of a domain
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
domainId |
X |
null |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
403 |
You do not have permission to execute this request. |
List[[string]] |
404 |
No DKIM values found. Or the domain may not exist |
List[[string]] |
Example HTTP request
GET /domains/Eygdk/dkim HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2NzgxNywiZXhwIjoxNzg4NDcxNDE3fQ.VVewwyfYKILvJ-f3fpaTizGu_2Osf9I1bFv28UBZyW5ptsNkX-C15aYYCgrwG4mW_l8Nd15gvUI2VOiNFY3L0Q
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/domains/Eygdk/dkim' -i -X GET \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2NzgxNywiZXhwIjoxNzg4NDcxNDE3fQ.VVewwyfYKILvJ-f3fpaTizGu_2Osf9I1bFv28UBZyW5ptsNkX-C15aYYCgrwG4mW_l8Nd15gvUI2VOiNFY3L0Q'
Example HTTP response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
Content-Length: 535
[ "protect._domainkey.stark.com TXT v=DKIM1; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC4AOcbCtlVjd6U5RoRwtVqwHmnXAGHYHgpbJZMC8Sj7u3EZ1ByNlLVmHAYKa4SW4jfG4+tf93S8HTOEWXYA037YnxiNVsNYCEMnVwlAYJplv5wunXDd7MDFxtrjdJmJcZ5HjlBcckD6OpKw+QhDRa+i4Pf98RlHDYyx7HGGoFCywIDAQAB", "protect._domainkey.winterfell.net TXT v=DKIM1; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC4AOcbCtlVjd6U5RoRwtVqwHmnXAGHYHgpbJZMC8Sj7u3EZ1ByNlLVmHAYKa4SW4jfG4+tf93S8HTOEWXYA037YnxiNVsNYCEMnVwlAYJplv5wunXDd7MDFxtrjdJmJcZ5HjlBcckD6OpKw+QhDRa+i4Pf98RlHDYyx7HGGoFCywIDAQAB" ]
5.6.4. Update domain DKIM
PUT /domains/{domainId}/dkim
Description
Replace DKIM values for a domain. Returns the dkim values
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
domainId |
X |
null |
Body Parameter
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
DkimDTO |
- |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
404 |
A problem occured. The domain may not exist. |
List[[string]] |
403 |
You do not have permission to execute this request. (sysadmin required) |
List[[string]] |
Example HTTP request
PUT /domains/Eygdk/dkim HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2NzgxNiwiZXhwIjoxNzg4NDcxNDE2fQ.DbUVVvqw9GM4bv67qDC5ffulEa8MZVyRQuioJCkKoZSys36M0vFWJtirj6G9NBTbSNs3lBx6GsgHrJgAf7D06Q
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/domains/Eygdk/dkim' -i -X PUT \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2NzgxNiwiZXhwIjoxNzg4NDcxNDE2fQ.DbUVVvqw9GM4bv67qDC5ffulEa8MZVyRQuioJCkKoZSys36M0vFWJtirj6G9NBTbSNs3lBx6GsgHrJgAf7D06Q'
Example HTTP response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
Content-Length: 442
[ "protect._domainkey.stark.com TXT v=DKIM1; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3E+JaCzPfJiL0PyOrRM7vRAN42KBzJow2oCtqyzcSi9S7UolwjK/Nu7wiD4aQhyScKW0oqSDcHjRhGRPWdkLZ9FSr8GIX0WQFWY7/eo4E72NnOylqhTNSXqk803tnxWMkGaCWe25/BGIn0BXd57SMowW4EbpWq3NCy2BGM/CqiADdzaQyvkOfVpn5JKB2uT4KL6nnWSxpRdjwwcV0hNmNF+rSf0xOtYFUkXrKBCjHSeQ+uH1QfTk6wYd58+Dm1SPtYI8MZmbwQkmDmyvdGkz5f9wd67tCucvRB9vU3utnYPVqQ9OVqLswWj2dYb8EYsEE6PGEuKB3nWRiuI4qLEAOQIDAQAB" ]
5.7. Emails
5.7.1. Delete attachment
DELETE /emails/attachments/{uid}/{filename}
Description
Delete uploaded file on server.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
uid |
X |
null |
||
filename |
X |
null |
5.7.2. Get all email attachments
GET /users/{userId}/emails/{folderPath}/{messageId}/attachments
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
userId |
X |
null |
||
folderPath |
X |
null |
||
messageId |
X |
null |
Query Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
dl |
dl |
- |
null |
5.7.3. Download email attachment part
GET /users/{userId}/emails/{folderPath}/{emailId}/attachments/{partId}
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
userId |
X |
null |
||
folderPath |
X |
null |
||
emailId |
X |
null |
||
partId |
X |
null |
Query Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
dl |
- |
null |
5.7.4. Download attachment
GET /emails/attachments/{uid}/{filename}
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
uid |
X |
null |
||
filename |
X |
null |
5.7.5. Get email
GET /users/{userIdOrEmail}/emails/{folderPath}/{fugluIdOrMailId}
Description
Get user’s email from a userId or Email and FugluId or mailId
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
userIdOrEmail |
Id of the user |
X |
null |
|
folderPath |
Id of the folder |
X |
null |
|
fugluIdOrMailId |
Id of the email. Can be the value of header X-Fuglu-Id or Message-ID |
X |
null |
Query Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
fields |
List of attended datas |
- |
null |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
200 |
Mail returned successfully |
|
403 |
Authorisation failure. |
|
404 |
The user or the mail not exist. |
|
500 |
Something went wrong. Possibly unable to connect to Imap. |
5.7.6. Get folders
GET /users/{userIdOrEmail}/emails/folders/{path}
Description
Get user’s IMAP folders.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
userIdOrEmail |
User id or email |
X |
null |
|
path |
Path of the parent folder. If not specified, the root is used. |
X |
null |
Query Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
fields |
Attended fields types. STATS returns messages counts and number of unread elements |
- |
null |
Return Type
array[ImapFolder]
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
200 |
Folders returned successfully |
List[ImapFolder] |
403 |
Authorisation failure. |
List[ImapFolder] |
404 |
The user not exist. |
List[ImapFolder] |
500 |
Something went wrong. Possibly unable to connect to Imap. |
List[ImapFolder] |
5.7.7. Get folders
GET /users/{userIdOrEmail}/emails/folders
Description
Get user’s IMAP folders.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
userIdOrEmail |
User id or email |
X |
null |
Query Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
fields |
Attended fields types. STATS returns messages counts and number of unread elements |
- |
null |
Return Type
array[ImapFolder]
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
200 |
Folders returned successfully |
List[ImapFolder] |
403 |
Authorisation failure. |
List[ImapFolder] |
404 |
The user not exist. |
List[ImapFolder] |
500 |
Something went wrong. Possibly unable to connect to Imap. |
List[ImapFolder] |
5.7.8. Get folder content
GET /users/{userIdOrEmail}/emails/{folderPath}
Description
Get all emails contained in a folder.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
userIdOrEmail |
User id or email |
X |
null |
|
folderPath |
Folder path |
X |
null |
Query Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
sort |
Define the sort applied on response. Prefix the field send_date by '-' to reverse the sort. |
- |
null |
|
offset |
Index of the first mail to return, defaults to 0 |
- |
null |
|
pageSize |
Maximum number of mails returned, defaults to 40 |
- |
null |
|
receivedAfter |
Determines the date from which the search is launched |
- |
null |
|
receivedBefore |
Determines the date until which the search is launched |
- |
null |
|
from |
Search on the sender |
- |
null |
|
to |
Search on the main recipients |
- |
null |
|
cc |
Search on the secondary recipients |
- |
null |
|
subject |
Search on the subject of the message |
- |
null |
|
body |
Search on the content of the message |
- |
null |
|
operator |
Operator to apply on the search (AND/OR/NOT) |
- |
AND |
|
id |
Search on the id of the message |
- |
null |
Return Type
array[ImapMessage]
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
200 |
Mails returned successfully |
List[ImapMessage] |
403 |
Authorisation failure. |
List[ImapMessage] |
404 |
The user or the folder not exist. |
List[ImapMessage] |
500 |
Something went wrong. Possibly unable to connect to Imap. |
List[ImapMessage] |
5.7.9. Release an email
POST /users/{userIdOrEmail}/emails/{folderPath}/{fugluId}/release
Description
Release an email via its folder (e.g. \"INBOX\") and its id. Id can be the value of the messageId or X-Fuglu-Id headers. The email will be sent to the final mailbox. If the message was store in the quarantine, the spam tag would be removed and send to its recipient. Note that releasing an email which contain virus is not allowed by default. To by-pass this control, add a X-Virus-Lover header to your request. Action is asynchrone.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
userIdOrEmail |
X |
null |
||
folderPath |
X |
null |
||
fugluId |
X |
null |
Header Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
X-Virus-Lover |
- |
null |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
202 |
Release request accepted and will be processed as soon as possible. |
|
404 |
The user or the couple folder/fugluId may not exist |
|
412 |
Release not allowed. The email you attempt to release is infected and no header X-Virus-Lover found in the request OR the header X-Virus-Lover is present in the request while the email is not infected |
|
403 |
Authorisation failure. You are not allowed to release this email. |
|
204 |
No Content |
5.7.10. Send email
POST /users/{userIdOrEmail}/emails/send
Description
Send an email with current logged in user as sender.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
userIdOrEmail |
User id or email |
X |
null |
Body Parameter
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
SmtpMessage |
X |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
400 |
Error in given parameters. |
|
200 |
OK |
5.7.11. Upload attachment
POST /emails/attachments
Description
Upload a file on server in order to attach it in an e-mail. The response of the upload give datas which will be used in the API for sending message. Files are automaticaly deleted on server when they are included in an e-mail during its sending.
Parameters
Body Parameter
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
UploadFileRequest |
- |
Responses
| Code | Message | Datatype |
|---|---|---|
200 |
OK |
5.8. FilteringRulesOnAttachments
5.8.1. Add attachment filter to domain
POST /domains/{domainId}/filters/attachments
Description
Add attachment filter rule to the domain. Returns the added element.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
domainId |
X |
null |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
404 |
Domain may not exist |
|
403 |
You do not have permission to execute this request. |
|
409 |
This item may already exists with same rules |
Example HTTP request
POST /domains/Eygdk/filters/attachments HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 105
Host: localhost:8080
{ "action": "ALLOW", "checkType": "CONTENTTYPE", "filter": ".xlsx" , "description": "Allow xslx files"}
Example Curl request
$ curl 'http://localhost:8080/domains/Eygdk/filters/attachments' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{ "action": "ALLOW", "checkType": "CONTENTTYPE", "filter": ".xlsx" , "description": "Allow xslx files"}'
Example HTTP response
HTTP/1.1 201 Created
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Access-Control-Expose-Headers: Content-Location
Location: http://localhost:8080/domains/Eygdk/filters/attachments
Content-Type: application/json
Content-Length: 209
{
"id" : "ByE3n",
"action" : "ALLOW",
"checkType" : "CONTENTTYPE",
"filter" : ".xlsx",
"scope" : "stark.net",
"priority" : 1,
"description" : "Allow xslx files",
"createdDate" : 1788467847825
}
5.8.2. Delete an attachment filter.
DELETE /filters/attachments/{attachmentId}
Description
Delete an existing attachment filter.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
attachmentId |
X |
null |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
400 |
A problem occured |
|
403 |
You do not have permission to execute this request. |
|
404 |
No attachment filter found with given id |
Example HTTP request
DELETE /filters/attachments/ByE3n HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzg1MiwiZXhwIjoxNzg4NDcxNDUyfQ.nEwew2Hwg7iT5CzdjMiIESuvx09e6ZpmLs5JWOlXelr8ExG9uWA7835bt3uY_tbQwXaAV0AxOwvONtw38B6wdw
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/filters/attachments/ByE3n' -i -X DELETE \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzg1MiwiZXhwIjoxNzg4NDcxNDUyfQ.nEwew2Hwg7iT5CzdjMiIESuvx09e6ZpmLs5JWOlXelr8ExG9uWA7835bt3uY_tbQwXaAV0AxOwvONtw38B6wdw'
Example HTTP response
HTTP/1.1 204 No Content
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
5.8.3. Get domain’s attachement filters
GET /domains/{domainId}/filters/attachments
Description
Returns attachments filter rules of the domain.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
domainId |
X |
null |
Query Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
offset |
Index of the first filter rule to return, defaults to 0 |
- |
null |
|
pageSize |
Maximum number of groups returned, defaults to 40 |
- |
null |
|
sort |
Define the sort applied on response. Prefix the field name by '-' to reverse the sort. |
- |
null |
|
action |
Filter the list by action |
- |
null |
Content Type
-
application/json
-
application/vnd.ms-excel
Responses
| Code | Message | Datatype |
|---|---|---|
404 |
Domain may not exist |
List[FilterAttachment] |
403 |
You do not have permission to execute this request. |
List[FilterAttachment] |
5.8.4. Edit an attachment filter.
PATCH /filters/attachments/{attachmentId}
Description
Edit properties of an existing attachment filter. Apply changes only on specified fields in request. Attributes which are not provided will not be updated.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
attachmentId |
X |
null |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
400 |
A problem occured |
|
403 |
You do not have permission to execute this request. |
|
404 |
No attachment filter found with given id |
Example HTTP request
PATCH /filters/attachments/ByE3n HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 73
Host: localhost:8080
{ "action": "DENY", "filter": ".xls" , "description": "Deny xls files"}
Example Curl request
$ curl 'http://localhost:8080/filters/attachments/ByE3n' -i -X PATCH \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{ "action": "DENY", "filter": ".xls" , "description": "Deny xls files"}'
Example HTTP response
HTTP/1.1 204 No Content
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
5.9. FilteringRulesOnSenders
5.9.1. Add entries
POST /wblist
Description
Add a list of rules. Returns the list of added elements.
Parameters
Body Parameter
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
FilterSenderItem |
X |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
403 |
You do not have permission to execute this request. |
List[FilterSender] |
409 |
An identical rule may already exists |
List[FilterSender] |
422 |
Operation cannot be done because of not met conditions. |
List[FilterSender] |
Example HTTP request
POST /wblist HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzk5OSwiZXhwIjoxNzg4NDcxNTk5fQ.joFtqfJ53t9yD7zGX4W-UJugmL8pqxOjEs5VGUwFUSenNJI9LeR5qrTUsd1JyhzDAcQjzhqZDBjrn4AVdg27pA
Content-Length: 229
Host: localhost:8080
[{"value":"daenerys@goodguys.fr","owner":"iswittercoming.net","type":"ALLOW","spfOn":true},{"value":"baelish@badguys.fr","owner":"notyet@iswittercoming.net","type":"BLOCK","expireAt":1793741999129,"description":"he's a traitor"}]
Example Curl request
$ curl 'http://localhost:8080/wblist' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzk5OSwiZXhwIjoxNzg4NDcxNTk5fQ.joFtqfJ53t9yD7zGX4W-UJugmL8pqxOjEs5VGUwFUSenNJI9LeR5qrTUsd1JyhzDAcQjzhqZDBjrn4AVdg27pA' \
-d '[{"value":"daenerys@goodguys.fr","owner":"iswittercoming.net","type":"ALLOW","spfOn":true},{"value":"baelish@badguys.fr","owner":"notyet@iswittercoming.net","type":"BLOCK","expireAt":1793741999129,"description":"he's a traitor"}]'
Example HTTP response
HTTP/1.1 201 Created
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
Content-Length: 444
[ {
"id" : "ByE3n",
"value" : "daenerys@goodguys.fr",
"owner" : "iswittercoming.net",
"type" : "ALLOW",
"createdDate" : 1788467999154,
"expireAt" : null,
"description" : null,
"spfOn" : true
}, {
"id" : "By46n",
"value" : "baelish@badguys.fr",
"owner" : "notyet@iswittercoming.net",
"type" : "BLOCK",
"createdDate" : 1788467999176,
"expireAt" : 1793741999129,
"description" : "he's a traitor",
"spfOn" : null
} ]
5.9.2. Add domain rule
POST /domains/{domainId}/wblist
Description
Add elements in domain filtering rules. Returns the list of added elements.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
domainId |
X |
null |
Body Parameter
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
FilterSenderAdd |
X |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
404 |
Domain may not exist |
List[FilterSender] |
403 |
You do not have permission to execute this request. |
List[FilterSender] |
409 |
An identical rule may already exist |
List[FilterSender] |
422 |
Operation cannot be done because of not met conditions. |
List[FilterSender] |
Example HTTP request
POST /domains/Eygdk/wblist HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzk5NywiZXhwIjoxNzg4NDcxNTk3fQ.NWXA-Yj7bxJQg38ThwKvz-4avSqwAeyZTSX9BNBYs7N5XPyGq_qz0WnTBZowVRhLjHiasgdkAufKB9AbUhrYgA
Content-Length: 164
Host: localhost:8080
[{"value":"daenerys@goodguys.fr","type":"ALLOW","spfOn":true},{"value":"baelish@badguys.fr","type":"BLOCK","expireAt":1793741997291,"description":"he's a traitor"}]
Example Curl request
$ curl 'http://localhost:8080/domains/Eygdk/wblist' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzk5NywiZXhwIjoxNzg4NDcxNTk3fQ.NWXA-Yj7bxJQg38ThwKvz-4avSqwAeyZTSX9BNBYs7N5XPyGq_qz0WnTBZowVRhLjHiasgdkAufKB9AbUhrYgA' \
-d '[{"value":"daenerys@goodguys.fr","type":"ALLOW","spfOn":true},{"value":"baelish@badguys.fr","type":"BLOCK","expireAt":1793741997291,"description":"he's a traitor"}]'
Example HTTP response
HTTP/1.1 201 Created
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Access-Control-Expose-Headers: Content-Location
Location: http://localhost:8080/domains/Eygdk/wblist
Content-Type: application/json
Content-Length: 419
[ {
"id" : "ByE3n",
"value" : "daenerys@goodguys.fr",
"owner" : "alive.net",
"type" : "ALLOW",
"createdDate" : 1788467997310,
"expireAt" : null,
"description" : null,
"spfOn" : true
}, {
"id" : "By46n",
"value" : "baelish@badguys.fr",
"owner" : "alive.net",
"type" : "BLOCK",
"createdDate" : 1788467997323,
"expireAt" : 1793741997291,
"description" : "he's a traitor",
"spfOn" : null
} ]
5.9.3. Add mailbox rule
POST /users/{userId}/wblist
Description
Add elements in mailbox filtering rules. Returns the list of added elements.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
userId |
X |
null |
Body Parameter
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
FilterSenderAdd |
X |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
404 |
User may not exist |
List[FilterSender] |
403 |
You do not have permission to execute this request. |
List[FilterSender] |
409 |
An identical rule may already exist |
List[FilterSender] |
422 |
Operation cannot be done because of not met conditions. |
List[FilterSender] |
Example HTTP request
POST /users/By46n/wblist HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzk5NCwiZXhwIjoxNzg4NDcxNTk0fQ.qCZT1K4E5zonr1XphT83iQ-Xyr6bh-1ErES12LOpH6ecScuMx8rSHWYcdC0a6hTMDuCx7Bq1odwC6Wa6xDe3zg
Content-Length: 164
Host: localhost:8080
[{"value":"daenerys@goodguys.fr","type":"ALLOW","spfOn":true},{"value":"baelish@badguys.fr","type":"BLOCK","expireAt":1793741994388,"description":"he's a traitor"}]
Example Curl request
$ curl 'http://localhost:8080/users/By46n/wblist' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzk5NCwiZXhwIjoxNzg4NDcxNTk0fQ.qCZT1K4E5zonr1XphT83iQ-Xyr6bh-1ErES12LOpH6ecScuMx8rSHWYcdC0a6hTMDuCx7Bq1odwC6Wa6xDe3zg' \
-d '[{"value":"daenerys@goodguys.fr","type":"ALLOW","spfOn":true},{"value":"baelish@badguys.fr","type":"BLOCK","expireAt":1793741994388,"description":"he's a traitor"}]'
Example HTTP response
HTTP/1.1 201 Created
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Access-Control-Expose-Headers: Content-Location
Location: http://localhost:8080/users/By46n/wblist
Content-Type: application/json
Content-Length: 451
[ {
"id" : "ByE3n",
"value" : "daenerys@goodguys.fr",
"owner" : "notyet@iswittercoming.net",
"type" : "ALLOW",
"createdDate" : 1788467994434,
"expireAt" : null,
"description" : null,
"spfOn" : true
}, {
"id" : "By46n",
"value" : "baelish@badguys.fr",
"owner" : "notyet@iswittercoming.net",
"type" : "BLOCK",
"createdDate" : 1788467994470,
"expireAt" : 1793741994388,
"description" : "he's a traitor",
"spfOn" : null
} ]
5.9.4. Delete domain rule
DELETE /domains/{domainId}/wblist/{wbItemId}
Description
Delete a domain’s rule.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
domainId |
X |
null |
||
wbItemId |
X |
null |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
404 |
A problem occured. The domain may not exist |
|
403 |
You do not have permission to execute this request. |
Example HTTP request
DELETE /domains/Eygdk/wblist/ByE3n HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzk5NSwiZXhwIjoxNzg4NDcxNTk1fQ.qm9l8CHZZmFqcJ7gVPpw9eMsHGcsXYPgz7kGBEuwce_mlUx2Xlgblb8hhr9oMHn-RvNOD20L4Iaz6z6nAd3VMg
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/domains/Eygdk/wblist/ByE3n' -i -X DELETE \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzk5NSwiZXhwIjoxNzg4NDcxNTk1fQ.qm9l8CHZZmFqcJ7gVPpw9eMsHGcsXYPgz7kGBEuwce_mlUx2Xlgblb8hhr9oMHn-RvNOD20L4Iaz6z6nAd3VMg'
Example HTTP response
HTTP/1.1 204 No Content
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
5.9.5. Delete mailbox rule
DELETE /users/{userId}/wblist/{wbItemId}
Description
Delete a mailbox rule.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
userId |
X |
null |
||
wbItemId |
X |
null |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
404 |
A problem occured. The user may not exist |
|
403 |
You do not have permission to execute this request. |
Example HTTP request
DELETE /users/By46n/wblist/ByE3n HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2ODAwNCwiZXhwIjoxNzg4NDcxNjA0fQ.SoMd9sY6tJ6cz0YWGqjEVLlQ4V332CQaGlr_qhoNnQFeD4bwvxwXhygIQ6HwSls2q-d8ZEfW8nzIghkAMF0ueA
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/users/By46n/wblist/ByE3n' -i -X DELETE \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2ODAwNCwiZXhwIjoxNzg4NDcxNjA0fQ.SoMd9sY6tJ6cz0YWGqjEVLlQ4V332CQaGlr_qhoNnQFeD4bwvxwXhygIQ6HwSls2q-d8ZEfW8nzIghkAMF0ueA'
Example HTTP response
HTTP/1.1 204 No Content
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
5.9.6. Get domain’s filter rules
GET /domains/{domainId}/wblist
Description
Returns senders which are defined in the allowlist and blocklist of the domain.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
domainId |
X |
null |
Query Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
offset |
Index of the first rule to return, defaults to 0 |
- |
null |
|
pageSize |
Maximum number of entities returned, defaults to 40 |
- |
null |
|
sort |
Define the sort applied on response. Prefix the field name by '-' to reverse the sort. |
- |
null |
|
type |
Filter the list by type, 'ALLOW' for allowlist and 'BLOCK' for blocklist |
- |
null |
|
value |
Filter the list by the sender value |
- |
null |
Content Type
-
application/json
-
application/vnd.ms-excel
Responses
| Code | Message | Datatype |
|---|---|---|
404 |
Domain may not exist |
List[FilterSender] |
403 |
You do not have permission to execute this request. |
List[FilterSender] |
Example HTTP request
GET /domains/Eygdk/wblist HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzk5NiwiZXhwIjoxNzg4NDcxNTk2fQ.-i8J5yAxC1hQYFpod7Gmbb0B2x4QJBjuEjW79WG8Mck6FH4A-5ThU5yMXXDcOowXynpR3qLbjchASAFj0sdVvg
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/domains/Eygdk/wblist' -i -X GET \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzk5NiwiZXhwIjoxNzg4NDcxNTk2fQ.-i8J5yAxC1hQYFpod7Gmbb0B2x4QJBjuEjW79WG8Mck6FH4A-5ThU5yMXXDcOowXynpR3qLbjchASAFj0sdVvg'
Example HTTP response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Access-Control-Expose-Headers: X-Total-Count
X-Total-Count: 5
Content-Type: application/json
Content-Length: 1001
[ {
"id" : "ByE3n",
"value" : "daenerys@goodguys.fr",
"owner" : "alive.net",
"type" : "ALLOW",
"createdDate" : 1788467996000,
"expireAt" : null,
"description" : null,
"spfOn" : true
}, {
"id" : "By46n",
"value" : "baelish@badguys.fr",
"owner" : "alive.net",
"type" : "BLOCK",
"createdDate" : 1788467996000,
"expireAt" : null,
"description" : "he's a traitor",
"spfOn" : null
}, {
"id" : "Eygdk",
"value" : "arya@goodguys.fr",
"owner" : "alive.net",
"type" : "ALLOW",
"createdDate" : 1788467996000,
"expireAt" : null,
"description" : null,
"spfOn" : true
}, {
"id" : "YyjPn",
"value" : "deadguys.fr",
"owner" : "alive.net",
"type" : "BLOCK",
"createdDate" : 1788467996000,
"expireAt" : 1793741996000,
"description" : null,
"spfOn" : null
}, {
"id" : "Vnoey",
"value" : "joffrey@badguys.fr",
"owner" : "alive.net",
"type" : "BLOCK",
"createdDate" : 1788467996000,
"expireAt" : null,
"description" : null,
"spfOn" : null
} ]
5.9.7. Get user’s filter rules
GET /users/{userId}/wblist
Description
Returns senders which are defined in the allowlist and blocklist of the user.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
userId |
X |
null |
Query Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
offset |
Index of the first rule to return, defaults to 0 |
- |
null |
|
pageSize |
Maximum number of entities returned, defaults to 40 |
- |
null |
|
sort |
Define the sort applied on response. Prefix the field name by '-' to reverse the sort. |
- |
null |
|
type |
Filter the list by type, 'ALLOW' for allowlist and 'BLOCK' for blocklist |
- |
null |
|
value |
Filter the list by the sender value |
- |
null |
Content Type
-
application/json
-
application/vnd.ms-excel
Responses
| Code | Message | Datatype |
|---|---|---|
404 |
User may not exist |
List[FilterSender] |
403 |
You do not have permission to execute this request. |
List[FilterSender] |
Example HTTP request
GET /users/By46n/wblist HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2ODAwMywiZXhwIjoxNzg4NDcxNjAzfQ.n_ObxtXbvaRSNZ74W5U74cJ-d8Xfw_7sZ-ihBJAU2dI_dw-p6A3XKo_ED2h7cNM2uQ_mmreu4PWt4wh7oXdRGg
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/users/By46n/wblist' -i -X GET \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2ODAwMywiZXhwIjoxNzg4NDcxNjAzfQ.n_ObxtXbvaRSNZ74W5U74cJ-d8Xfw_7sZ-ihBJAU2dI_dw-p6A3XKo_ED2h7cNM2uQ_mmreu4PWt4wh7oXdRGg'
Example HTTP response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Access-Control-Expose-Headers: X-Total-Count
X-Total-Count: 5
Content-Type: application/json
Content-Length: 1072
[ {
"id" : "ByE3n",
"value" : "daenerys@goodguys.fr",
"owner" : "notyet@iswittercoming.net",
"type" : "ALLOW",
"createdDate" : 1788468003000,
"expireAt" : null,
"description" : null,
"spfOn" : false
}, {
"id" : "By46n",
"value" : "baelish@badguys.fr",
"owner" : "notyet@iswittercoming.net",
"type" : "ALLOW",
"createdDate" : 1788468003000,
"expireAt" : 1793742003000,
"description" : null,
"spfOn" : false
}, {
"id" : "Eygdk",
"value" : "arya@goodguys.fr",
"owner" : "notyet@iswittercoming.net",
"type" : "ALLOW",
"createdDate" : 1788468003000,
"expireAt" : null,
"description" : null,
"spfOn" : false
}, {
"id" : "YyjPn",
"value" : "deadguys.fr",
"owner" : "notyet@iswittercoming.net",
"type" : "BLOCK",
"createdDate" : 1788468003000,
"expireAt" : null,
"description" : null,
"spfOn" : null
}, {
"id" : "Vnoey",
"value" : "joffrey@badguys.fr",
"owner" : "notyet@iswittercoming.net",
"type" : "BLOCK",
"createdDate" : 1788468003000,
"expireAt" : null,
"description" : null,
"spfOn" : null
} ]
5.9.8. Update domain rule
PUT /domains/{domainId}/wblist/{wbItemId}
Description
Replace a rule by another one.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
domainId |
X |
null |
||
wbItemId |
X |
null |
Body Parameter
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
FilterSenderAdd |
X |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
404 |
Domain may not exist |
|
403 |
You do not have permission to execute this request. |
|
409 |
An identical rule may already exists |
|
422 |
Operation cannot be done because of not met conditions. |
Example HTTP request
PUT /domains/Eygdk/wblist/ByE3n HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2ODAwMiwiZXhwIjoxNzg4NDcxNjAyfQ.eMJkbHgKJPFOr1hV0rsRE1i7EGeyjAShLGJ3i2LCH1FKWIbHy8ZOhPZZWNA9EUZ9355-guNOlPlmwsTtqT1EUg
Content-Length: 43
Host: localhost:8080
{"value":"rickon@stark.net","type":"BLOCK"}
Example Curl request
$ curl 'http://localhost:8080/domains/Eygdk/wblist/ByE3n' -i -X PUT \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2ODAwMiwiZXhwIjoxNzg4NDcxNjAyfQ.eMJkbHgKJPFOr1hV0rsRE1i7EGeyjAShLGJ3i2LCH1FKWIbHy8ZOhPZZWNA9EUZ9355-guNOlPlmwsTtqT1EUg' \
-d '{"value":"rickon@stark.net","type":"BLOCK"}'
Example HTTP response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
Content-Length: 193
{
"id" : "ByE3n",
"value" : "rickon@stark.net",
"owner" : "alive.net",
"type" : "BLOCK",
"createdDate" : 1788468002000,
"expireAt" : null,
"description" : null,
"spfOn" : null
}
5.9.9. Update mailbox rule
PUT /users/{userId}/wblist/{wbItemId}
Description
Replace a rule by another one.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
userId |
X |
null |
||
wbItemId |
X |
null |
Body Parameter
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
FilterSenderAdd |
X |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
404 |
User may not exist |
|
403 |
You do not have permission to execute this request. |
|
409 |
An identical rule may already exists |
|
422 |
Operation cannot be done because of not met conditions. |
Example HTTP request
PUT /users/By46n/wblist/ByE3n HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2ODAwMCwiZXhwIjoxNzg4NDcxNjAwfQ.os1arC-9Zabe8GFFxuGX6KZyQPssVQLhYD4uA74I6cv7_LYpQS9Xta9kgcXl9VF2q2LXEh7IsZ3AAkSwGL1Q8g
Content-Length: 41
Host: localhost:8080
{"value":"done@stark.net","type":"BLOCK"}
Example Curl request
$ curl 'http://localhost:8080/users/By46n/wblist/ByE3n' -i -X PUT \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2ODAwMCwiZXhwIjoxNzg4NDcxNjAwfQ.os1arC-9Zabe8GFFxuGX6KZyQPssVQLhYD4uA74I6cv7_LYpQS9Xta9kgcXl9VF2q2LXEh7IsZ3AAkSwGL1Q8g' \
-d '{"value":"done@stark.net","type":"BLOCK"}'
Example HTTP response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
Content-Length: 207
{
"id" : "ByE3n",
"value" : "done@stark.net",
"owner" : "notyet@iswittercoming.net",
"type" : "BLOCK",
"createdDate" : 1788468000000,
"expireAt" : null,
"description" : null,
"spfOn" : null
}
5.9.10. Set domain rules
PUT /domains/{domainId}/wblist
Description
Replace the whole list of domain’s filtering rules by another list. Returns the list of added elements.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
domainId |
X |
null |
Body Parameter
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
FilterSenderAdd |
X |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
404 |
Domain may not exist |
List[FilterSender] |
403 |
You do not have permission to execute this request. |
List[FilterSender] |
409 |
An identical rule may already exists |
List[FilterSender] |
422 |
Operation cannot be done because of not met conditions. |
List[FilterSender] |
Example HTTP request
PUT /domains/Eygdk/wblist HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzk5OCwiZXhwIjoxNzg4NDcxNTk4fQ.GqxHe3isMfTDofCQNwtmaXIe8vss1_txsUWOlLYkHc-ADoBiCPGDE88ub3oTXcZ-Xz4OgSmU5K1f6sb2_IuBJw
Content-Length: 120
Host: localhost:8080
[{"value":"rickon@stark.net","type":"ALLOW","spfOn":true},{"value":"tywin.net","type":"BLOCK","expireAt":1793741998229}]
Example Curl request
$ curl 'http://localhost:8080/domains/Eygdk/wblist' -i -X PUT \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzk5OCwiZXhwIjoxNzg4NDcxNTk4fQ.GqxHe3isMfTDofCQNwtmaXIe8vss1_txsUWOlLYkHc-ADoBiCPGDE88ub3oTXcZ-Xz4OgSmU5K1f6sb2_IuBJw' \
-d '[{"value":"rickon@stark.net","type":"ALLOW","spfOn":true},{"value":"tywin.net","type":"BLOCK","expireAt":1793741998229}]'
Example HTTP response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
Content-Length: 394
[ {
"id" : "ByE3n",
"value" : "rickon@stark.net",
"owner" : "alive.net",
"type" : "ALLOW",
"createdDate" : 1788467998258,
"expireAt" : null,
"description" : null,
"spfOn" : true
}, {
"id" : "By46n",
"value" : "tywin.net",
"owner" : "alive.net",
"type" : "BLOCK",
"createdDate" : 1788467998278,
"expireAt" : 1793741998229,
"description" : null,
"spfOn" : null
} ]
5.9.11. Set mailbox rules
PUT /users/{userId}/wblist
Description
Replace the whole list of user’s filtering rules by another list. Returns the list of added elements.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
userId |
X |
null |
Body Parameter
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
FilterSenderAdd |
X |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
404 |
User may not exist |
List[FilterSender] |
403 |
You do not have permission to execute this request. |
List[FilterSender] |
409 |
An identical rule may already exists |
List[FilterSender] |
422 |
Operation cannot be done because of not met conditions. |
List[FilterSender] |
Example HTTP request
PUT /users/By46n/wblist HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2ODAwMSwiZXhwIjoxNzg4NDcxNjAxfQ.vNPicRyXN_5-LAepxiNzavPrTUGtZO-I1heJv7jWDXWBg4kNb7DRvciz32qT3phP8opRI1OUVNAXFFWJtsgqvg
Content-Length: 82
Host: localhost:8080
[{"value":"rickon@stark.net","type":"BLOCK"},{"value":"tywin.net","type":"BLOCK"}]
Example Curl request
$ curl 'http://localhost:8080/users/By46n/wblist' -i -X PUT \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2ODAwMSwiZXhwIjoxNzg4NDcxNjAxfQ.vNPicRyXN_5-LAepxiNzavPrTUGtZO-I1heJv7jWDXWBg4kNb7DRvciz32qT3phP8opRI1OUVNAXFFWJtsgqvg' \
-d '[{"value":"rickon@stark.net","type":"BLOCK"},{"value":"tywin.net","type":"BLOCK"}]'
Example HTTP response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
Content-Length: 417
[ {
"id" : "ByE3n",
"value" : "rickon@stark.net",
"owner" : "notyet@iswittercoming.net",
"type" : "BLOCK",
"createdDate" : 1788468001090,
"expireAt" : null,
"description" : null,
"spfOn" : null
}, {
"id" : "By46n",
"value" : "tywin.net",
"owner" : "notyet@iswittercoming.net",
"type" : "BLOCK",
"createdDate" : 1788468001110,
"expireAt" : null,
"description" : null,
"spfOn" : null
} ]
5.10. FilteringRulesOnURI
5.10.1. Add URI-BL filter to domain
POST /domains/{domainId}/filters/uris
Description
Add URI-BL filter rule to the domain. Returns the added element.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
domainId |
X |
null |
Body Parameter
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
FilterUriBlAdd |
X |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
404 |
Domain may not exist |
|
403 |
You do not have permission to execute this request. |
|
409 |
This item may already exists with same rules |
Example HTTP request
POST /domains/Eygdk/filters/uris HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 96
Host: localhost:8080
{ "action": "URIDNSBL_SKIP_DOMAIN", "filter": "bulist.com" , "description": "Rule bulist.com"}
Example Curl request
$ curl 'http://localhost:8080/domains/Eygdk/filters/uris' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{ "action": "URIDNSBL_SKIP_DOMAIN", "filter": "bulist.com" , "description": "Rule bulist.com"}'
Example HTTP response
HTTP/1.1 201 Created
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Access-Control-Expose-Headers: Content-Location
Location: http://localhost:8080/domains/Eygdk/filters/uris
Content-Type: application/json
Content-Length: 197
{
"id" : "ByE3n",
"scope" : "stark.net",
"action" : "URIDNSBL_SKIP_DOMAIN",
"filter" : "bulist.com",
"priority" : 1,
"description" : "Rule bulist.com",
"createdDate" : 1788467867796
}
5.10.2. Delete an uriBl filter.
DELETE /filters/uris/{uriId}
Description
Delete an existing uriBl filter.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
uriId |
X |
null |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
400 |
A problem occured |
|
403 |
You do not have permission to execute this request. |
|
404 |
No uriBl filter found with given id |
Example HTTP request
DELETE /filters/uris/ByE3n HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzg3MCwiZXhwIjoxNzg4NDcxNDcwfQ.uF9tDUYBZ0fPTLoHJcHsFTeq1LhofsUwocfQSHr_8fccMEQQ4MpRYobh9WOkxKxEKiOSUor7iwPbM5KamPf2-A
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/filters/uris/ByE3n' -i -X DELETE \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzg3MCwiZXhwIjoxNzg4NDcxNDcwfQ.uF9tDUYBZ0fPTLoHJcHsFTeq1LhofsUwocfQSHr_8fccMEQQ4MpRYobh9WOkxKxEKiOSUor7iwPbM5KamPf2-A'
Example HTTP response
HTTP/1.1 204 No Content
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
5.10.3. Get domain’s URI-BL filters
GET /domains/{domainId}/filters/uris
Description
Returns URI-BL elements of the domain.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
domainId |
X |
null |
Query Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
offset |
Index of the first filter rule to return, defaults to 0 |
- |
null |
|
pageSize |
Maximum number of groups returned, defaults to 40 |
- |
null |
|
sort |
Define the sort applied on response. Prefix the field name by '-' to reverse the sort. |
- |
null |
|
action |
Filter the list by action |
- |
null |
Content Type
-
application/json
-
application/vnd.ms-excel
Responses
| Code | Message | Datatype |
|---|---|---|
404 |
Domain may not exist |
List[FilterUriBl] |
403 |
You do not have permission to execute this request. |
List[FilterUriBl] |
5.10.4. Edit an uriBl filter.
PATCH /filters/uris/{uriId}
Description
Edit properties of an existing uriBl filter. Apply changes only on specified fields in request. Attributes which are not provided will not be updated.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
uriId |
X |
null |
Body Parameter
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
FilterUriBlAdd |
X |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
400 |
A problem occured |
|
403 |
You do not have permission to execute this request. |
|
404 |
No uriBl filter found with given id |
Example HTTP request
PATCH /filters/uris/ByE3n HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 68
Host: localhost:8080
{ "action": "WHITELIST_URI_HOST", "description": "Rule bulist.com"}
Example Curl request
$ curl 'http://localhost:8080/filters/uris/ByE3n' -i -X PATCH \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{ "action": "WHITELIST_URI_HOST", "description": "Rule bulist.com"}'
Example HTTP response
HTTP/1.1 204 No Content
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
5.11. Health
5.11.1. Run domain diagnostic
POST /domains/{domainId}/health
Description
Run integrity tests on the domain
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
domainId |
X |
null |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
404 |
Domain does not exist. |
|
403 |
You do not have permission to execute this request. |
Example HTTP request
POST /domains/Eygdk/health HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2NzgyNiwiZXhwIjoxNzg4NDcxNDI2fQ.VJUnWv4u7h2aHKwR5vJO2USXoa-bkzIAuGIpB_g9OJShdv2yRU4QcA6CpXCPpzK8Bff5po1fVVKJ1dK1GQdoQg
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/domains/Eygdk/health' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2NzgyNiwiZXhwIjoxNzg4NDcxNDI2fQ.VJUnWv4u7h2aHKwR5vJO2USXoa-bkzIAuGIpB_g9OJShdv2yRU4QcA6CpXCPpzK8Bff5po1fVVKJ1dK1GQdoQg'
Example HTTP response
HTTP/1.1 201 Created
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
Content-Length: 496
{
"performedAt" : 1788475027,
"report" : {
"status" : false,
"entries" : [ {
"type" : "MX",
"result" : "ERROR_MX_MISSING_ENTRY",
"output" : [ "Lookup for MX entry in DNS for targaryen.net", "Fail: No MX entry found" ]
}, {
"type" : "DKIM",
"result" : "ERROR_DKIM_MISSING_ENTRY",
"output" : [ "Lookup for dkim entry in DNS for targaryen.net", "Fail: DKIM DNS entry not found for domain \"targaryen.net\" and selector \"protect\"" ]
} ]
}
}
5.11.2. Run diagnostic on existing relay
POST /platforms/{platformId}/health
Description
Will check SMTP connectivity of the platform.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
platformId |
X |
null |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
404 |
Platform does not exist. |
|
403 |
You do not have permission to execute this request. |
5.11.3. Get domain health
GET /domains/{domainId}/health
Description
Get result of the last tests on the domain
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
domainId |
X |
null |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
404 |
Domain does not exist. |
|
403 |
You do not have permission to execute this request. |
Example HTTP request
GET /domains/Eygdk/health HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2NzgyNSwiZXhwIjoxNzg4NDcxNDI1fQ.u9Ylq41Y64CXpkRGw5HEzhhNEsTmmaQlzYs_upWa91UNas4mxc9530NolUzO2IUIgkXxB1Gvqr38hklvrfwSXw
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/domains/Eygdk/health' -i -X GET \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2NzgyNSwiZXhwIjoxNzg4NDcxNDI1fQ.u9Ylq41Y64CXpkRGw5HEzhhNEsTmmaQlzYs_upWa91UNas4mxc9530NolUzO2IUIgkXxB1Gvqr38hklvrfwSXw'
Example HTTP response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
Content-Length: 410
{
"performedAt" : 1788475025,
"report" : {
"status" : true,
"entries" : [ {
"type" : "MX",
"result" : "OK",
"output" : [ "Passed" ]
}, {
"type" : "DKIM",
"result" : "ERROR_DKIM_MISSING_ENTRY",
"output" : [ "Lookup for dkim entry in DNS for targaryen.net", "Fail: DKIM DNS entry not found for domain \"targaryen.net\" and selector \"protect\"" ]
} ]
}
}
5.11.4. Get health errors
GET /health
Description
Get all failures found on your environment.
Responses
| Code | Message | Datatype |
|---|---|---|
403 |
You do not have permission to execute this request. |
List[DiagnosticEntryDTO] |
Example HTTP request
GET /health HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzg3NywiZXhwIjoxNzg4NDcxNDc3fQ.jyuzXYr-TaL6JEegcfD0hV5HrKth8nhMkph6xb0NWh2kTXlk_uy-oVkSV5tyaac6UgSI1H54uQuu0Nw6DTvPbA
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/health' -i -X GET \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzg3NywiZXhwIjoxNzg4NDcxNDc3fQ.jyuzXYr-TaL6JEegcfD0hV5HrKth8nhMkph6xb0NWh2kTXlk_uy-oVkSV5tyaac6UgSI1H54uQuu0Nw6DTvPbA'
Example HTTP response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
Content-Length: 1200
[ {
"id" : "YyjPn",
"name" : "stark.net",
"type" : "DOMAIN",
"health" : {
"performedAt" : 1788475077,
"report" : {
"status" : false,
"entries" : [ {
"type" : "MX",
"result" : "ERROR_MX_INVALID_ENTRY",
"output" : [ "Lookup for MX entry in DNS for stark.net", "Required: 83.145.xxx.xxx", "Fail" ]
}, {
"type" : "DKIM",
"result" : "ERROR_DKIM_INVALID_COUPLE",
"output" : [ "Lookup for dkim entry in DNS for stark.net", "Fail: DKIM key defined in DNS does not match with private part" ]
} ]
}
}
}, {
"id" : "Eygdk",
"name" : "targaryen.net",
"type" : "DOMAIN",
"health" : {
"performedAt" : 1788475077,
"report" : {
"status" : false,
"entries" : [ {
"type" : "MX",
"result" : "ERROR_MX_MISSING_ENTRY",
"output" : [ "Lookup for MX entry in DNS for targaryen.net", "Fail: No MX entry found" ]
}, {
"type" : "DKIM",
"result" : "ERROR_DKIM_MISSING_ENTRY",
"output" : [ "Lookup for dkim entry in DNS for targaryen.net", "Fail: DKIM DNS entry not found for domain \"targaryen.net\" and selector \"cleanmail\"" ]
} ]
}
}
} ]
5.11.5. Get diagnostic of existing relay
GET /platforms/{platformId}/health
Description
Get results of the last tests.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
platformId |
X |
null |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
404 |
Platform does not exist. |
|
403 |
You do not have permission to execute this request. |
5.11.6. Try relay configuration
POST /health/try-relay
Description
Will check SMTP connectivity of the platform.
Parameters
Body Parameter
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
RelayCheckHealthDTO |
X |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
403 |
You do not have permission to execute this request. |
5.12. Tasks
5.12.1. Execute task
POST /tasks
Description
Launch a new task. Each type of task has its own access restrictions. - send_welcome_mail: Send an e-mail to the user containing a description of the service and a link to a password setup page. - send_token_mail: Send an e-mail to a the user containing a link with a token to log in to the application. - send_password_reset_mail: Send an e-mail to a the user containing a link to reset his/her password.
Parameters
Body Parameter
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
Task |
X |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
202 |
Command is valid and will be executed. |
|
400 |
Invalid parameters |
|
403 |
Authorisation failure. |
|
422 |
Operation cannot be done because of not met conditions. |
|
401 |
Authentication failure. |
Example HTTP request
POST /tasks HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2NzgwOCwiZXhwIjoxNzg4NDcxNDA4fQ.xuimzUOl1yP-i55px0_o970dJLRADQoB08FuJ0iBdXS3-bsr0HeYBOTPKDv6wbR2tReNrIlJ5nZRVF-brdMvQg
Content-Length: 77
Host: localhost:8080
{"command":"send_welcome_mail","params":{"recipient":"cersei@lannister.net"}}
Example Curl request
$ curl 'http://localhost:8080/tasks' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2NzgwOCwiZXhwIjoxNzg4NDcxNDA4fQ.xuimzUOl1yP-i55px0_o970dJLRADQoB08FuJ0iBdXS3-bsr0HeYBOTPKDv6wbR2tReNrIlJ5nZRVF-brdMvQg' \
-d '{"command":"send_welcome_mail","params":{"recipient":"cersei@lannister.net"}}'
Example HTTP response
HTTP/1.1 202 Accepted
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
5.13. TemporaryAuthTokens
5.13.1. Temporary auth tokens
GET /token
Description
Generate a token for a user which allow the authententication. Action available only for the owner itself or and administrator with impersonnate permission.
Parameters
Query Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
username |
Email address of the required user |
X |
null |
|
validity |
Number of hours the token will be active |
- |
null |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
202 |
Asynchrone request has been taken into account : token is going to be sent soon |
|
400 |
A problem occured. Possible causes: the account does not have quarantine or retention or archive service. |
|
404 |
Unknown username |
5.14. Users
5.14.1. New user
POST /users
Description
Create a new user’s account in the domain specified in user’s email address.
Parameters
Body Parameter
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
NewUser |
X |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
400 |
A problem occured. Possible causes: the account email does not match email format or domain not found |
|
409 |
A user may already exists with the given name |
|
422 |
Operation cannot be done because of not met conditions. |
|
201 |
Created |
Example HTTP request
POST /users HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzk1MCwiZXhwIjoxNzg4NDcxNTUwfQ.tLxl9crk1qvGwCa2vg1OfmsEHrZ5yPjBaz7QOiZrbUC45gmWz9yZDgtNN2TPcWHXSwiSc2cvjPpHlAWk9DQlJw
Content-Length: 252
Host: localhost:8080
{"email":"tywin@lannister.net","firstname":"Tywin","lastname":"Lannister","status":"ENABLED","language":"EN","password":"HearMeRoar!","domainId":"ByE3n","platformId":"ByE3n","senderVerifyOn":"ENABLED","sendNotification":false,"senderVerifyActive":true}
Example Curl request
$ curl 'http://localhost:8080/users' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzk1MCwiZXhwIjoxNzg4NDcxNTUwfQ.tLxl9crk1qvGwCa2vg1OfmsEHrZ5yPjBaz7QOiZrbUC45gmWz9yZDgtNN2TPcWHXSwiSc2cvjPpHlAWk9DQlJw' \
-d '{"email":"tywin@lannister.net","firstname":"Tywin","lastname":"Lannister","status":"ENABLED","language":"EN","password":"HearMeRoar!","domainId":"ByE3n","platformId":"ByE3n","senderVerifyOn":"ENABLED","sendNotification":false,"senderVerifyActive":true}'
Example HTTP response
HTTP/1.1 201 Created
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Access-Control-Expose-Headers: Content-Location
Location: http://localhost:8080/users/By46n
Content-Type: application/json
Content-Length: 2109
{
"id" : "By46n",
"email" : "tywin@lannister.net",
"firstname" : "Tywin",
"lastname" : "Lannister",
"status" : "ENABLED",
"language" : "EN",
"creationDate" : 1788467950371,
"domainId" : "ByE3n",
"policy" : {
"id" : "ByE3n",
"name" : "Politique-lannister.net",
"domainId" : "ByE3n",
"quarantine" : true,
"retention" : true,
"archive" : true,
"mailSizeLimit" : 5,
"spamScore" : 6.8,
"incoming" : true,
"relayProps" : {
"relaySpam" : true,
"relayAdvert" : true,
"advertPrefix" : "[AD]",
"prefixSpam" : null,
"relayBadHeaders" : true,
"relayBadAttachments" : true,
"spamScoreLimit" : 10.0
},
"quarantineProps" : {
"duration" : 31,
"storeSpam" : false,
"storeVirus" : false,
"storeAdvert" : false,
"storeBlacklisted" : false,
"storeSenderVerify" : false,
"storeBadHeaders" : false,
"storeBadEncoding" : false,
"storeBadAttachments" : false
},
"retentionProps" : {
"duration" : 5,
"storeMailOut" : false,
"storeCleanMailIn" : false
},
"archiveProps" : {
"duration" : 48,
"archiveByCopy" : false,
"storeMailOut" : false,
"storeCleanMailIn" : false,
"storeSpam" : false,
"storeBadHeaders" : false,
"storeBadEncoding" : false,
"storeBadAttachments" : false,
"storeAdvert" : false,
"storeBlacklisted" : false,
"storeSenderVerify" : false
},
"outgoing" : false
},
"senderVerifyOn" : true,
"greylistingOn" : null,
"domainPolicyId" : "ByE3n",
"domainStatus" : "ENABLED",
"domainPlatformId" : "ByE3n",
"platform" : {
"id" : "ByE3n",
"name" : "Westeros",
"transportDest" : "smtp.westeros.com",
"transportType" : "SMTP",
"transportPort" : 25,
"fallbackTransportDest" : null,
"fallbackTransportType" : null,
"fallbackTransportPort" : null,
"apiType" : null,
"apiData" : null,
"authType" : "local",
"authData" : null,
"default" : true
},
"mfaType" : null,
"lastConnectionDate" : null
}
5.14.2. Delete user option
DELETE /users/{userId}/options/{optionName}
Description
Delete option value for user scope. The value of the parent scope will be used
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
userId |
X |
null |
||
optionName |
X |
null |
Content Type
-
application/json
Example HTTP request
DELETE /users/By46n/options/USER_OPTION_EXAMPLE HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzk1MywiZXhwIjoxNzg4NDcxNTUzfQ.jpNQmhrg2TY0h_l1HTip_HNsqN4ExYIKGHylYOueNHsITAMjZsCz36N9q-5TbeQuNTi1G_OdB8kQ-FJmzfq4Ag
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/users/By46n/options/USER_OPTION_EXAMPLE' -i -X DELETE \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzk1MywiZXhwIjoxNzg4NDcxNTUzfQ.jpNQmhrg2TY0h_l1HTip_HNsqN4ExYIKGHylYOueNHsITAMjZsCz36N9q-5TbeQuNTi1G_OdB8kQ-FJmzfq4Ag'
Example HTTP response
HTTP/1.1 204 No Content
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
5.14.3. Delete a user
DELETE /users/{userId}
Description
Delete an existing user
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
userId |
X |
null |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
404 |
User or domain not found with given id |
Example HTTP request
DELETE /users/By46n HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzk1NiwiZXhwIjoxNzg4NDcxNTU2fQ.qrRh32pLR1E_XaRha2ne3jwAO3UfK7R-4-A4xhke4H1djWAD0YgEloJhT0PKd-QhJzcuwUwiO6Jmd1uQHaAfGg
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/users/By46n' -i -X DELETE \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzk1NiwiZXhwIjoxNzg4NDcxNTU2fQ.qrRh32pLR1E_XaRha2ne3jwAO3UfK7R-4-A4xhke4H1djWAD0YgEloJhT0PKd-QhJzcuwUwiO6Jmd1uQHaAfGg'
Example HTTP response
HTTP/1.1 204 No Content
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
5.14.4. Single user
GET /users/{userId}
Description
Get an existing user’s account
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
userId |
X |
null |
Content Type
-
application/json
Example HTTP request
GET /users/By46n HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzk1NCwiZXhwIjoxNzg4NDcxNTU0fQ.DNNbm66m5F_H30n15BdmRL_oaLvwmC5usR_bN0QUOhUKwEnGRlIlt-uK9Kryg2bg1Y9xyUPeGr8h_fzuB3J5gg
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/users/By46n' -i -X GET \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzk1NCwiZXhwIjoxNzg4NDcxNTU0fQ.DNNbm66m5F_H30n15BdmRL_oaLvwmC5usR_bN0QUOhUKwEnGRlIlt-uK9Kryg2bg1Y9xyUPeGr8h_fzuB3J5gg'
Example HTTP response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
Content-Length: 1368
{
"id" : "By46n",
"email" : "sansa@stark.net",
"firstname" : "Sansa",
"lastname" : "Stark",
"status" : "ENABLED",
"language" : "EN",
"creationDate" : 1788467954000,
"domainId" : "Eygdk",
"policy" : {
"id" : "Eygdk",
"name" : "Politique-stark.net",
"domainId" : "Eygdk",
"quarantine" : false,
"retention" : false,
"archive" : false,
"mailSizeLimit" : 21,
"spamScore" : 5.0,
"incoming" : true,
"relayProps" : {
"relaySpam" : true,
"relayAdvert" : true,
"advertPrefix" : "",
"prefixSpam" : null,
"relayBadHeaders" : true,
"relayBadAttachments" : true,
"spamScoreLimit" : 10.0
},
"quarantineProps" : null,
"retentionProps" : null,
"archiveProps" : null,
"outgoing" : false
},
"senderVerifyOn" : null,
"greylistingOn" : null,
"domainPolicyId" : "Eygdk",
"domainStatus" : "ENABLED",
"domainPlatformId" : "Eygdk",
"platform" : {
"id" : "Eygdk",
"name" : "platform",
"transportDest" : "1.2.3.4",
"transportType" : "SMTP",
"transportPort" : 25,
"fallbackTransportDest" : null,
"fallbackTransportType" : null,
"fallbackTransportPort" : null,
"apiType" : null,
"apiData" : null,
"authType" : "local",
"authData" : null,
"default" : true
},
"mfaType" : null,
"lastConnectionDate" : null
}
5.14.5. List domain users
GET /domains/{domainId}/users
Description
Returns the list of users of a given domain.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
domainId |
X |
null |
Query Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
offset |
Index of the first account to return, defaults to 0 |
- |
null |
|
pageSize |
Maximum number of users returned, defaults to 40 |
- |
null |
|
sort |
Define the sort applied on response. Prefix the field name by '-' to reverse the sort. |
- |
null |
|
Filter by email |
- |
null |
||
platformName |
Filter by platform name |
- |
null |
Content Type
-
application/json
-
application/vnd.ms-excel
Responses
| Code | Message | Datatype |
|---|---|---|
404 |
Domain not found with given id |
List[User] |
Example HTTP request
GET /domains/ByE3n/users?name=*lannister.net HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzk1OCwiZXhwIjoxNzg4NDcxNTU4fQ.GofNPXR5oXR8GRdeC5EM0Pt7vftecNUrrWCrNGwNVnSuh847qz_lIUVVcLJwuhx_XVzvXzU79KsSflPJs_tRVw
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/domains/ByE3n/users?name=*lannister.net' -i -X GET \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzk1OCwiZXhwIjoxNzg4NDcxNTU4fQ.GofNPXR5oXR8GRdeC5EM0Pt7vftecNUrrWCrNGwNVnSuh847qz_lIUVVcLJwuhx_XVzvXzU79KsSflPJs_tRVw'
Example HTTP response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Access-Control-Expose-Headers: X-Total-Count
X-Total-Count: 3
Content-Type: application/json
Content-Length: 6192
[ {
"id" : "ByE3n",
"email" : "cersei@lannister.net",
"firstname" : "Cersei",
"lastname" : "Lannister",
"status" : "ENABLED",
"language" : "FR",
"creationDate" : 1788467957000,
"domainId" : "ByE3n",
"policy" : {
"id" : "ByE3n",
"name" : "Politique-lannister.net",
"domainId" : "ByE3n",
"quarantine" : true,
"retention" : true,
"archive" : true,
"mailSizeLimit" : 5,
"spamScore" : 6.8,
"incoming" : true,
"relayProps" : {
"relaySpam" : true,
"relayAdvert" : true,
"advertPrefix" : "[AD]",
"prefixSpam" : null,
"relayBadHeaders" : true,
"relayBadAttachments" : true,
"spamScoreLimit" : 10.0
},
"quarantineProps" : {
"duration" : 31,
"storeSpam" : false,
"storeVirus" : false,
"storeAdvert" : false,
"storeBlacklisted" : false,
"storeSenderVerify" : false,
"storeBadHeaders" : false,
"storeBadEncoding" : false,
"storeBadAttachments" : false
},
"retentionProps" : {
"duration" : 5,
"storeMailOut" : false,
"storeCleanMailIn" : false
},
"archiveProps" : {
"duration" : 48,
"archiveByCopy" : false,
"storeMailOut" : false,
"storeCleanMailIn" : false,
"storeSpam" : false,
"storeBadHeaders" : false,
"storeBadEncoding" : false,
"storeBadAttachments" : false,
"storeAdvert" : false,
"storeBlacklisted" : false,
"storeSenderVerify" : false
},
"outgoing" : false
},
"senderVerifyOn" : true,
"greylistingOn" : null,
"domainPolicyId" : "ByE3n",
"domainStatus" : "ENABLED",
"domainPlatformId" : "ByE3n",
"platform" : {
"id" : "ByE3n",
"name" : "Westeros",
"transportDest" : "smtp.westeros.com",
"transportType" : "SMTP",
"transportPort" : 25,
"fallbackTransportDest" : null,
"fallbackTransportType" : null,
"fallbackTransportPort" : null,
"apiType" : null,
"apiData" : null,
"authType" : "local",
"authData" : null,
"default" : true
}
}, {
"id" : "By46n",
"email" : "joffrey@lannister.net",
"firstname" : "Joffrey",
"lastname" : "Lannister",
"status" : "DISABLED",
"language" : "EN",
"creationDate" : 1788467958000,
"domainId" : "ByE3n",
"policy" : {
"id" : "ByE3n",
"name" : "Politique-lannister.net",
"domainId" : "ByE3n",
"quarantine" : true,
"retention" : true,
"archive" : true,
"mailSizeLimit" : 5,
"spamScore" : 6.8,
"incoming" : true,
"relayProps" : {
"relaySpam" : true,
"relayAdvert" : true,
"advertPrefix" : "[AD]",
"prefixSpam" : null,
"relayBadHeaders" : true,
"relayBadAttachments" : true,
"spamScoreLimit" : 10.0
},
"quarantineProps" : {
"duration" : 31,
"storeSpam" : false,
"storeVirus" : false,
"storeAdvert" : false,
"storeBlacklisted" : false,
"storeSenderVerify" : false,
"storeBadHeaders" : false,
"storeBadEncoding" : false,
"storeBadAttachments" : false
},
"retentionProps" : {
"duration" : 5,
"storeMailOut" : false,
"storeCleanMailIn" : false
},
"archiveProps" : {
"duration" : 48,
"archiveByCopy" : false,
"storeMailOut" : false,
"storeCleanMailIn" : false,
"storeSpam" : false,
"storeBadHeaders" : false,
"storeBadEncoding" : false,
"storeBadAttachments" : false,
"storeAdvert" : false,
"storeBlacklisted" : false,
"storeSenderVerify" : false
},
"outgoing" : false
},
"senderVerifyOn" : null,
"greylistingOn" : null,
"domainPolicyId" : "ByE3n",
"domainStatus" : "ENABLED",
"domainPlatformId" : "ByE3n",
"platform" : {
"id" : "ByE3n",
"name" : "Westeros",
"transportDest" : "smtp.westeros.com",
"transportType" : "SMTP",
"transportPort" : 25,
"fallbackTransportDest" : null,
"fallbackTransportType" : null,
"fallbackTransportPort" : null,
"apiType" : null,
"apiData" : null,
"authType" : "local",
"authData" : null,
"default" : true
}
}, {
"id" : "Eygdk",
"email" : "tommen@lannister.net",
"firstname" : "Tommen",
"lastname" : "Lannister",
"status" : "DISABLED",
"language" : "EN",
"creationDate" : 1788467958000,
"domainId" : "ByE3n",
"policy" : {
"id" : "ByE3n",
"name" : "Politique-lannister.net",
"domainId" : "ByE3n",
"quarantine" : true,
"retention" : true,
"archive" : true,
"mailSizeLimit" : 5,
"spamScore" : 6.8,
"incoming" : true,
"relayProps" : {
"relaySpam" : true,
"relayAdvert" : true,
"advertPrefix" : "[AD]",
"prefixSpam" : null,
"relayBadHeaders" : true,
"relayBadAttachments" : true,
"spamScoreLimit" : 10.0
},
"quarantineProps" : {
"duration" : 31,
"storeSpam" : false,
"storeVirus" : false,
"storeAdvert" : false,
"storeBlacklisted" : false,
"storeSenderVerify" : false,
"storeBadHeaders" : false,
"storeBadEncoding" : false,
"storeBadAttachments" : false
},
"retentionProps" : {
"duration" : 5,
"storeMailOut" : false,
"storeCleanMailIn" : false
},
"archiveProps" : {
"duration" : 48,
"archiveByCopy" : false,
"storeMailOut" : false,
"storeCleanMailIn" : false,
"storeSpam" : false,
"storeBadHeaders" : false,
"storeBadEncoding" : false,
"storeBadAttachments" : false,
"storeAdvert" : false,
"storeBlacklisted" : false,
"storeSenderVerify" : false
},
"outgoing" : false
},
"senderVerifyOn" : null,
"greylistingOn" : null,
"domainPolicyId" : "ByE3n",
"domainStatus" : "ENABLED",
"domainPlatformId" : "ByE3n",
"platform" : {
"id" : "ByE3n",
"name" : "Westeros",
"transportDest" : "smtp.westeros.com",
"transportType" : "SMTP",
"transportPort" : 25,
"fallbackTransportDest" : null,
"fallbackTransportType" : null,
"fallbackTransportPort" : null,
"apiType" : null,
"apiData" : null,
"authType" : "local",
"authData" : null,
"default" : true
}
} ]
5.14.6. List user options
GET /users/{userId}/options
Description
Returns a list of options defined for given user
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
userId |
X |
null |
Return Type
array[Option]
Content Type
-
application/json
Example HTTP request
GET /users/By46n/options HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzk1NCwiZXhwIjoxNzg4NDcxNTU0fQ.DNNbm66m5F_H30n15BdmRL_oaLvwmC5usR_bN0QUOhUKwEnGRlIlt-uK9Kryg2bg1Y9xyUPeGr8h_fzuB3J5gg
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/users/By46n/options' -i -X GET \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzk1NCwiZXhwIjoxNzg4NDcxNTU0fQ.DNNbm66m5F_H30n15BdmRL_oaLvwmC5usR_bN0QUOhUKwEnGRlIlt-uK9Kryg2bg1Y9xyUPeGr8h_fzuB3J5gg'
Example HTTP response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Access-Control-Expose-Headers: X-Total-Count
X-Total-Count: 1
Content-Type: application/json
Content-Length: 344
[ {
"value" : "1",
"parentValue" : "0",
"option" : {
"ptfScope" : true,
"urlScope" : false,
"customerScope" : false,
"domainScope" : false,
"userScope" : true,
"restricted" : false,
"group" : null,
"name" : "USER_OPTION_EXAMPLE",
"type" : "STRING",
"values" : null,
"description" : null
}
} ]
5.14.7. List users
GET /users
Description
Returns the list of users regardless of the domain. If the response does not contain a user which does exist, the problem might caused by a missing security role on the domain of the searched user.
Parameters
Query Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
offset |
Index of the first account to return, defaults to 0 |
- |
null |
|
pageSize |
Maximum number of users returned, defaults to 40 |
- |
null |
|
sort |
Define the sort applied on response. Prefix the field name by '-' to reverse the sort. |
- |
null |
|
Filter by email |
- |
null |
||
platformName |
Filter by platform name |
- |
null |
Return Type
array[User]
Content Type
-
application/json
Example HTTP request
GET /users?name=ByE3n HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzk1MSwiZXhwIjoxNzg4NDcxNTUxfQ.f4m8ItMku-N8IC8av-oQDPsHfHdccUuYWZpii8z4c2VReVcSs2KDC0NaVQ6kLnX2CRoXoap-nKv_65vIIhJUDQ
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/users?name=ByE3n' -i -X GET \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzk1MSwiZXhwIjoxNzg4NDcxNTUxfQ.f4m8ItMku-N8IC8av-oQDPsHfHdccUuYWZpii8z4c2VReVcSs2KDC0NaVQ6kLnX2CRoXoap-nKv_65vIIhJUDQ'
Example HTTP response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Access-Control-Expose-Headers: X-Total-Count
X-Total-Count: 3
Content-Type: application/json
Content-Length: 4716
[ {
"id" : "ByE3n",
"email" : "cersei@lannister.net",
"firstname" : "Cersei",
"lastname" : "Lannister",
"status" : "ENABLED",
"language" : "FR",
"creationDate" : 1788467951000,
"domainId" : "ByE3n",
"policy" : {
"id" : "ByE3n",
"name" : "Politique-lannister.net",
"domainId" : "ByE3n",
"quarantine" : true,
"retention" : true,
"archive" : true,
"mailSizeLimit" : 5,
"spamScore" : 6.8,
"incoming" : true,
"relayProps" : {
"relaySpam" : true,
"relayAdvert" : true,
"advertPrefix" : "[AD]",
"prefixSpam" : null,
"relayBadHeaders" : true,
"relayBadAttachments" : true,
"spamScoreLimit" : 10.0
},
"quarantineProps" : {
"duration" : 31,
"storeSpam" : false,
"storeVirus" : false,
"storeAdvert" : false,
"storeBlacklisted" : false,
"storeSenderVerify" : false,
"storeBadHeaders" : false,
"storeBadEncoding" : false,
"storeBadAttachments" : false
},
"retentionProps" : {
"duration" : 5,
"storeMailOut" : false,
"storeCleanMailIn" : false
},
"archiveProps" : {
"duration" : 48,
"archiveByCopy" : false,
"storeMailOut" : false,
"storeCleanMailIn" : false,
"storeSpam" : false,
"storeBadHeaders" : false,
"storeBadEncoding" : false,
"storeBadAttachments" : false,
"storeAdvert" : false,
"storeBlacklisted" : false,
"storeSenderVerify" : false
},
"outgoing" : false
},
"senderVerifyOn" : true,
"greylistingOn" : null,
"domainPolicyId" : "ByE3n",
"domainStatus" : "ENABLED",
"domainPlatformId" : "ByE3n",
"platform" : {
"id" : "ByE3n",
"name" : "Westeros",
"transportDest" : "smtp.westeros.com",
"transportType" : "SMTP",
"transportPort" : 25,
"fallbackTransportDest" : null,
"fallbackTransportType" : null,
"fallbackTransportPort" : null,
"apiType" : null,
"apiData" : null,
"authType" : "local",
"authData" : null,
"default" : true
}
}, {
"id" : "Eygdk",
"email" : "elia@martell.net",
"firstname" : "Elia",
"lastname" : "Martell",
"status" : "DISABLED",
"language" : "EN",
"creationDate" : 1788467951000,
"domainId" : "Eygdk",
"policy" : {
"id" : "Eygdk",
"name" : "Politique-martell.net",
"domainId" : "Eygdk",
"quarantine" : false,
"retention" : false,
"archive" : false,
"mailSizeLimit" : 21,
"spamScore" : 5.0,
"incoming" : true,
"relayProps" : {
"relaySpam" : true,
"relayAdvert" : true,
"advertPrefix" : "",
"prefixSpam" : null,
"relayBadHeaders" : true,
"relayBadAttachments" : true,
"spamScoreLimit" : 10.0
},
"quarantineProps" : null,
"retentionProps" : null,
"archiveProps" : null,
"outgoing" : false
},
"senderVerifyOn" : null,
"greylistingOn" : null,
"domainPolicyId" : "Eygdk",
"domainStatus" : "ENABLED",
"domainPlatformId" : "Eygdk",
"platform" : {
"id" : "Eygdk",
"name" : "platform",
"transportDest" : "1.2.3.4",
"transportType" : "SMTP",
"transportPort" : 25,
"fallbackTransportDest" : null,
"fallbackTransportType" : null,
"fallbackTransportPort" : null,
"apiType" : null,
"apiData" : null,
"authType" : "local",
"authData" : null,
"default" : true
}
}, {
"id" : "By46n",
"email" : "oberyn@martell.net",
"firstname" : "Oberyn",
"lastname" : "Martell",
"status" : "DISABLED",
"language" : "EN",
"creationDate" : 1788467951000,
"domainId" : "Eygdk",
"policy" : {
"id" : "Eygdk",
"name" : "Politique-martell.net",
"domainId" : "Eygdk",
"quarantine" : false,
"retention" : false,
"archive" : false,
"mailSizeLimit" : 21,
"spamScore" : 5.0,
"incoming" : true,
"relayProps" : {
"relaySpam" : true,
"relayAdvert" : true,
"advertPrefix" : "",
"prefixSpam" : null,
"relayBadHeaders" : true,
"relayBadAttachments" : true,
"spamScoreLimit" : 10.0
},
"quarantineProps" : null,
"retentionProps" : null,
"archiveProps" : null,
"outgoing" : false
},
"senderVerifyOn" : null,
"greylistingOn" : null,
"domainPolicyId" : "Eygdk",
"domainStatus" : "ENABLED",
"domainPlatformId" : "Eygdk",
"platform" : {
"id" : "Eygdk",
"name" : "platform",
"transportDest" : "1.2.3.4",
"transportType" : "SMTP",
"transportPort" : 25,
"fallbackTransportDest" : null,
"fallbackTransportType" : null,
"fallbackTransportPort" : null,
"apiType" : null,
"apiData" : null,
"authType" : "local",
"authData" : null,
"default" : true
}
} ]
5.14.8. Set user option
POST /users/{userId}/options
Description
Set option value to an user. The list of available options can be consulted in api GET /options
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
userId |
X |
null |
Body Parameter
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
OptionAdd |
X |
Content Type
-
application/json
Example HTTP request
POST /users/By46n/options HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzk1NSwiZXhwIjoxNzg4NDcxNTU1fQ.5Iocu449d0jttlwH3tynz4oanQd5mM2n4kquyclGmIxVFbVu4tiWysrI3x9xGiq6uRTvzDLkKLBPrMsHxv1Fdw
Content-Length: 42
Host: localhost:8080
{"name":"USER_OPTION_EXAMPLE","value":"1"}
Example Curl request
$ curl 'http://localhost:8080/users/By46n/options' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzk1NSwiZXhwIjoxNzg4NDcxNTU1fQ.5Iocu449d0jttlwH3tynz4oanQd5mM2n4kquyclGmIxVFbVu4tiWysrI3x9xGiq6uRTvzDLkKLBPrMsHxv1Fdw' \
-d '{"name":"USER_OPTION_EXAMPLE","value":"1"}'
Example HTTP response
HTTP/1.1 201 Created
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
Content-Length: 340
{
"value" : "1",
"parentValue" : "0",
"option" : {
"ptfScope" : true,
"urlScope" : false,
"customerScope" : false,
"domainScope" : false,
"userScope" : true,
"restricted" : false,
"group" : null,
"name" : "USER_OPTION_EXAMPLE",
"type" : "STRING",
"values" : null,
"description" : null
}
}
5.14.9. Edit a user
PATCH /users/{userId}
Description
Edit properties of an existing user. Apply changes only on specified fields in request. Attributes which are not provided will not be updated. Returns the updated user’s account.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
userId |
X |
null |
Body Parameter
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
UpdateUser |
X |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
400 |
A problem has occured. Possible cause: the account email does not match email format |
|
404 |
User not found with given id |
Example HTTP request
PATCH /users/By46n HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzk1MiwiZXhwIjoxNzg4NDcxNTUyfQ.4BUJ4NSdwj2kIfDMpCfw4kd0kYYbFZKdqnztge_m1B48xCUbit8m6Q7Oc35_x7YDAK8uiZfYdFASEbRUBs0pIQ
Content-Length: 36
Host: localhost:8080
{"lastname":"Stark","language":"DE"}
Example Curl request
$ curl 'http://localhost:8080/users/By46n' -i -X PATCH \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzk1MiwiZXhwIjoxNzg4NDcxNTUyfQ.4BUJ4NSdwj2kIfDMpCfw4kd0kYYbFZKdqnztge_m1B48xCUbit8m6Q7Oc35_x7YDAK8uiZfYdFASEbRUBs0pIQ' \
-d '{"lastname":"Stark","language":"DE"}'
Example HTTP response
HTTP/1.1 204 No Content
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
5.15. UsersAliases
5.15.1. Add addresses to an email alias
POST /domains/{domainId}/groups/{groupId}/addresses
Description
The email address could be a domain account, another email alias or an external email address.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
domainId |
X |
null |
||
groupId |
X |
null |
Body Parameter
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
string |
X |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
404 |
A problem occured. The domain or the user may not exist |
|
403 |
You do not have permission to execute this request. |
Example HTTP request
POST /domains/Eygdk/groups/ByE3n/addresses HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzc3MywiZXhwIjoxNzg4NDcxMzczfQ.esAg9PqC1Y6LkKioqqOepm7mDbYX9WqNdJK2ac88F0I_n9LRP_nsOeHjRVDjKtewiVjlOmVnS7WNrBYSqkEZ2w
Content-Length: 36
Host: localhost:8080
["joffrey@got.net","ramsay@got.net"]
Example Curl request
$ curl 'http://localhost:8080/domains/Eygdk/groups/ByE3n/addresses' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzc3MywiZXhwIjoxNzg4NDcxMzczfQ.esAg9PqC1Y6LkKioqqOepm7mDbYX9WqNdJK2ac88F0I_n9LRP_nsOeHjRVDjKtewiVjlOmVnS7WNrBYSqkEZ2w' \
-d '["joffrey@got.net","ramsay@got.net"]'
Example HTTP response
HTTP/1.1 201 Created
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
Content-Length: 325
{
"id" : "ByE3n",
"email" : "badguys@got.net",
"recipients" : [ {
"id" : "ByE3n",
"email" : "joffrey@got.net",
"firstname" : null,
"lastname" : null,
"type" : "USER"
}, {
"id" : "By46n",
"email" : "ramsay@got.net",
"firstname" : null,
"lastname" : null,
"type" : "USER"
} ]
}
5.15.2. New email alias
POST /domains/{domainId}/groups
Description
Create a new email alias.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
domainId |
X |
null |
Body Parameter
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
NewAddressAlias |
X |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
400 |
A problem occured. Arguments passed to the request may not match required format or the email's domain may not match the domain |
|
403 |
You do not have permission to execute this request. |
|
404 |
A problem occured. The domain may not exist |
|
409 |
A email alias may already exists with the given name |
|
422 |
Operation cannot be done because of not met conditions. |
|
201 |
Created |
Example HTTP request
POST /domains/Eygdk/groups HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzc3MCwiZXhwIjoxNzg4NDcxMzcwfQ.v4Ezg_STr4WPrcNTxOEOjJrhOBTzuDIJyHvekdyq_B3cMbColWCFB3gD668ZtW2HGFgmQ79GgTlExA5Aazss3w
Content-Length: 30
Host: localhost:8080
{"email":"children@stark.net"}
Example Curl request
$ curl 'http://localhost:8080/domains/Eygdk/groups' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzc3MCwiZXhwIjoxNzg4NDcxMzcwfQ.v4Ezg_STr4WPrcNTxOEOjJrhOBTzuDIJyHvekdyq_B3cMbColWCFB3gD668ZtW2HGFgmQ79GgTlExA5Aazss3w' \
-d '{"email":"children@stark.net"}'
Example HTTP response
HTTP/1.1 201 Created
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Access-Control-Expose-Headers: Content-Location
Location: http://localhost:8080/domains/Eygdk/groups/ByE3n
Content-Type: application/json
Content-Length: 76
{
"id" : "ByE3n",
"email" : "children@stark.net",
"recipients" : [ ]
}
5.15.3. Delete an email alias.
DELETE /groups/{groupId}
Description
Delete an email alais list using its ID.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
groupId |
X |
null |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
400 |
A problem occured. Possible cause: at least one parameter might not match required format or the domain of the alias may not match the domain |
|
403 |
You do not have permission to execute this request. |
|
404 |
A problem occured. The domain and/or the alias may not exist |
Example HTTP request
DELETE /groups/ByE3n HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzc2NSwiZXhwIjoxNzg4NDcxMzY1fQ.v7ckLWvCrHrryHGHhoMxKT6tEMzQj1peQYH0Dse848q-wGuNq3OXCHH1Flb4Y70ADGcwF0hPk9AuJ7X4iRGRuw
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/groups/ByE3n' -i -X DELETE \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzc2NSwiZXhwIjoxNzg4NDcxMzY1fQ.v7ckLWvCrHrryHGHhoMxKT6tEMzQj1peQYH0Dse848q-wGuNq3OXCHH1Flb4Y70ADGcwF0hPk9AuJ7X4iRGRuw'
Example HTTP response
HTTP/1.1 204 No Content
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
5.15.4. Delete an email alias recipient.
DELETE /domains/{domainId}/groups/{groupId}/addresses/{addressId}
Description
Delete an email alias recipient using the user ID.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
domainId |
X |
null |
||
groupId |
X |
null |
||
addressId |
X |
null |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
400 |
A problem occured. Possible cause: at least one parameter might not match required format or the domain of the alias may not match the domain |
|
403 |
You do not have permission to execute this request. |
|
404 |
A problem occured. The domain and/or the user and/or the alias may not exist ; the domain may not contain the user |
Example HTTP request
DELETE /domains/Eygdk/groups/ByE3n/addresses/ByE3n HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzc3MiwiZXhwIjoxNzg4NDcxMzcyfQ.AK6Tzf-ddAj2SCwwPYDD1ReA5N2y7M7wqGFK7QyVda3UN3vGR9ORGdtF5QMfu8gMXcC7JAQIogZzhp_jkLqPiA
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/domains/Eygdk/groups/ByE3n/addresses/ByE3n' -i -X DELETE \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzc3MiwiZXhwIjoxNzg4NDcxMzcyfQ.AK6Tzf-ddAj2SCwwPYDD1ReA5N2y7M7wqGFK7QyVda3UN3vGR9ORGdtF5QMfu8gMXcC7JAQIogZzhp_jkLqPiA'
Example HTTP response
HTTP/1.1 204 No Content
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
5.15.5. List the targeted addresses of an alias.
GET /domains/{domainId}/groups/{groupId}
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
domainId |
X |
null |
||
groupId |
X |
null |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
404 |
A problem occured. The domain or the user may not exist |
|
403 |
You do not have permission to execute this request. |
Example HTTP request
GET /domains/Eygdk/groups/ByE3n HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzc2NywiZXhwIjoxNzg4NDcxMzY3fQ.rD-Quw-RHfoNUsT36A7f7FJl47T7BhqMX74IkP_KMUoDCWPTtL5ugWPj1BlBZs4ZTBfUA2AfAPmQ_n0NWSsDtg
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/domains/Eygdk/groups/ByE3n' -i -X GET \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzc2NywiZXhwIjoxNzg4NDcxMzY3fQ.rD-Quw-RHfoNUsT36A7f7FJl47T7BhqMX74IkP_KMUoDCWPTtL5ugWPj1BlBZs4ZTBfUA2AfAPmQ_n0NWSsDtg'
Example HTTP response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
Content-Length: 484
{
"id" : "ByE3n",
"email" : "badguys@got.net",
"recipients" : [ {
"id" : "ByE3n",
"email" : "joffrey@got.net",
"firstname" : "Joffrey",
"lastname" : "Baratheon",
"type" : "USER"
}, {
"id" : "By46n",
"email" : "ramsay@got.net",
"firstname" : "Ramsay",
"lastname" : "Bolton",
"type" : "USER"
}, {
"id" : "Eygdk",
"email" : "themontain@got.net",
"firstname" : "Gregor",
"lastname" : "Clegane",
"type" : "USER"
} ]
}
5.15.6. List email aliases of a domain.
GET /domains/{domainId}/groups
Description
Returns the email aliases of the domain. Filtering option on fields: 'email', 'recipient'.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
domainId |
X |
null |
Query Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
sort |
Define the sort applied on response. Prefix the field name by '-' to reverse the sort. |
- |
null |
|
offset |
Index of the first group to return, defaults to 1 |
- |
null |
|
pageSize |
Maximum number of groups returned, defaults to 40 |
- |
null |
|
Filter groups by the alias's email |
- |
null |
||
recipient |
Filter groups by recipient's email |
- |
null |
Content Type
-
application/json
-
application/vnd.ms-excel
Responses
| Code | Message | Datatype |
|---|---|---|
404 |
A problem occured. The domain may not exist |
List[AdressAlias] |
403 |
You do not have permission to execute this request. |
List[AdressAlias] |
Example HTTP request
GET /domains/Eygdk/groups?address=ramsay@got.net HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzc3MSwiZXhwIjoxNzg4NDcxMzcxfQ.WTWhBu3BuS7Nu4dzozYRWDQin1XummzUIXR56HB2mke1CoxUpyXwBs3Q2LMxb3WP8C9bgKkm7zM4YOBn0LzBkQ
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/domains/Eygdk/groups?address=ramsay@got.net' -i -X GET \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzc3MSwiZXhwIjoxNzg4NDcxMzcxfQ.WTWhBu3BuS7Nu4dzozYRWDQin1XummzUIXR56HB2mke1CoxUpyXwBs3Q2LMxb3WP8C9bgKkm7zM4YOBn0LzBkQ'
Example HTTP response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Access-Control-Expose-Headers: X-Total-Count
X-Total-Count: 1
Content-Type: application/json
Content-Length: 329
[ {
"id" : "ByE3n",
"email" : "badguys@got.net",
"recipients" : [ {
"id" : "ByE3n",
"email" : "joffrey@got.net",
"firstname" : null,
"lastname" : null,
"type" : "USER"
}, {
"id" : "By46n",
"email" : "ramsay@got.net",
"firstname" : null,
"lastname" : null,
"type" : "USER"
} ]
} ]
5.15.7. Edit an email alias.
PATCH /domains/{domainId}/groups/{groupId}
Description
Edit the address of an existing email alias.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
domainId |
X |
null |
||
groupId |
X |
null |
Body Parameter
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
NewAddressAlias |
X |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
400 |
A problem occured. Possible cause: at least one parameter might not match required format or the domain of the alias may not match the domain |
|
403 |
You do not have permission to execute this request. |
|
404 |
A problem occured. The domain and/or the email alias may not exist |
Example HTTP request
PATCH /domains/Eygdk/groups/ByE3n HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzc2OCwiZXhwIjoxNzg4NDcxMzY4fQ.S5Qhe6Nf5T0bme80gTVGGzKgxTw1ecEFy79vA3qnrVjFg0Q1ary3-PkGrlSurwndQf4kD5cE379E42atuFLdhg
Content-Length: 78
Host: localhost:8080
{"email":"deadguys@got.net","recipients":["joffrey@got.net","ramsay@got.net"]}
Example Curl request
$ curl 'http://localhost:8080/domains/Eygdk/groups/ByE3n' -i -X PATCH \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2Nzc2OCwiZXhwIjoxNzg4NDcxMzY4fQ.S5Qhe6Nf5T0bme80gTVGGzKgxTw1ecEFy79vA3qnrVjFg0Q1ary3-PkGrlSurwndQf4kD5cE379E42atuFLdhg' \
-d '{"email":"deadguys@got.net","recipients":["joffrey@got.net","ramsay@got.net"]}'
Example HTTP response
HTTP/1.1 204 No Content
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
5.16. UsersSigns
5.16.1. Delete sign
DELETE /users/{userId}/sign
Description
Delete the HTML sign of the given user.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
userId |
X |
null |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
400 |
A problem occured. Possible causes: the account does not have quarantine or retention or archive service. |
|
404 |
Unknown user |
|
204 |
No Content |
Example HTTP request
DELETE /users/By46n/sign HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2NzkzNywiZXhwIjoxNzg4NDcxNTM3fQ.tO_GJgYXIttk4xNQ8Nx7O1NBb4pgp5jchdLlfP0H6JcpmhxnKgBGNbnbvElCgcOC_iyPnqaUyBds7Wd2vVEFrQ
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/users/By46n/sign' -i -X DELETE \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2NzkzNywiZXhwIjoxNzg4NDcxNTM3fQ.tO_GJgYXIttk4xNQ8Nx7O1NBb4pgp5jchdLlfP0H6JcpmhxnKgBGNbnbvElCgcOC_iyPnqaUyBds7Wd2vVEFrQ'
Example HTTP response
HTTP/1.1 204 No Content
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
5.16.2. Get sign
GET /users/{userId}/sign
Description
Get HTML sign of given user.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
userId |
X |
null |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
400 |
A problem occured. Possible causes: the account does not have quarantine or retention or archive service. |
|
404 |
Unknown user |
|
422 |
Operation cannot be done because of not met conditions. |
|
200 |
OK |
Example HTTP request
GET /users/By46n/sign HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2NzkzNiwiZXhwIjoxNzg4NDcxNTM2fQ.iug0TixlnOqF2exhRhBbpNgSPeVd1Godto-gKlfIZTWWconEkM_PRcxk8LC3RYiRY6cb0PJkw7Ke1-TCnUF-_A
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/users/By46n/sign' -i -X GET \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc4ODQ2NzkzNiwiZXhwIjoxNzg4NDcxNTM2fQ.iug0TixlnOqF2exhRhBbpNgSPeVd1Godto-gKlfIZTWWconEkM_PRcxk8LC3RYiRY6cb0PJkw7Ke1-TCnUF-_A'
Example HTTP response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
Content-Length: 65
{
"sign" : "Um9iZXJ0IFN0YXJrPGJyLz5LaW5nIG9mIHRoZSBub3J0aA=="
}
5.16.3. Set sign
PUT /users/{userId}/sign
Description
Set HTML sign to given user.
Parameters
Path Parameters
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
userId |
X |
null |
Body Parameter
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
Sign |
X |
Content Type
-
application/json
Responses
| Code | Message | Datatype |
|---|---|---|
400 |
A problem occured. Possible causes: the account does not have quarantine or retention or archive service. |
|
404 |
Unknown user |
|
200 |
OK |
6. Models
6.1. AclDTO
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
id |
Integer |
Identifier of the entry |
int32 |
||
username |
X |
String |
Grantee of the permissions |
||
permissions |
List of AclPermissionStatus |
List of embedded permissions |
6.2. AclPermissionStatus
Permission and its activation status
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
name |
String |
Permission's name |
|||
enabled |
Boolean |
Permission's activation status |
6.3. Admin
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
id |
Integer |
int32 |
|||
login |
X |
String |
Login used for authentication |
||
displayName |
String |
Display name of the account |
|||
String |
Email address. Used for password recovery |
||||
enabled |
Boolean |
Whether the account is enabled or not |
|||
language |
Language of the account |
Enum: fr (French), en (English), de (German), es (Spanish), nb (Norwegian), da (Danish), |
|||
totp |
Account's defined multi-factor authentication. |
Enum: false, false, |
|||
sysAdmin |
Boolean |
Whether the account is a system administrator or not |
|||
authorities |
List of Authority |
List of authorities granted to the user |
|||
authoritiesCount |
Integer |
Count of authorities granted to the user |
int32 |
||
lastConnectionDate |
Date |
Date of last connection to application. |
date-time |
||
createdAt |
Date |
Account creation date |
date-time |
6.4. AdminAdd
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
id |
Integer |
Unique identifier of an existing account |
int32 |
||
login |
String |
Login used for authentication. Required only in case of new account creation. |
|||
displayName |
String |
Display name of the account. Required only in case of new account creation. |
|||
String |
Email address. Used for password recovery. Required only in case of new account creation. |
||||
password |
String |
Clear password of the account. Required only in case of new account creation. |
|||
enabled |
Boolean |
Whether the account is enabled or not. Required only in case of new account creation. |
|||
language |
Language of the account. Required only in case of new account creation. |
Enum: fr (French), en (English), de (German), es (Spanish), nb (Norwegian), da (Danish), |
|||
permissions |
X |
List of [string] |
List of permissions granted to the user |
6.5. AdminUpdate
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
String |
Email address. Used for password recovery |
||||
displayName |
String |
Display name of the account |
|||
password |
String |
Clear password of the account. Required only in case of new account creation. |
|||
enabled |
Boolean |
Whether the account is enabled or not. Required only in case of new account creation. |
|||
totp |
Boolean |
Activation status of TOTP. Can only disable the feature. Enabling TOTP must be done through a dedicated flow (QRCode). |
|||
language |
Language of the account |
Enum: fr (French), en (English), de (German), es (Spanish), nb (Norwegian), da (Danish), |
6.6. AdressAlias
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
id |
Integer |
Idenfier of the alias |
int32 |
||
X |
String |
Address of the alias |
|||
recipients |
List of EmailAliasRecipient |
The email addresses targeted by the alias. |
6.7. Alias
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
id |
Integer |
Idenfier of the alias |
int32 |
||
name |
X |
String |
Name of the alias |
6.8. ArchiveProps
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
duration |
Integer |
Number of MONTHS the messages are archived |
int32 |
||
archiveByCopy |
Boolean |
Determine if system must archive all e-mails, even internal ones, by copying messages from final mailbox. |
|||
storeMailOut |
Boolean |
Determine if system must archive sent emails |
|||
storeCleanMailIn |
Boolean |
Determine if system must archive clean incoming emails |
|||
storeSpam |
Boolean |
Determine if system must archive incoming email detected as spams |
|||
storeBadHeaders |
Boolean |
Determine if system must archive incoming emails with bad headers |
|||
storeBadEncoding |
Boolean |
Determine if system must archive incoming emails with bad encoding |
|||
storeBadAttachments |
Boolean |
Determine if system must archive incoming emails with unauthorized file formats |
|||
storeAdvert |
Boolean |
Determine if system must archive incoming emails which seem to be advertising |
|||
storeBlacklisted |
Boolean |
Determine if system must archive incoming blocked sender |
|||
storeSenderVerify |
Boolean |
Determine if system must archive incoming emails with improper sender verify |
6.9. AttachmentFile
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
uid |
String |
Unique identifier of the file on our server. |
|||
name |
String |
Filename |
|||
uri |
String |
Access URI of the stored file |
|||
type |
String |
Content-type of the file |
|||
size |
Long |
File size in bytes |
int64 |
6.10. AuthToken
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
token |
String |
Token value |
|||
expireAt |
Date |
Expiration date of the token |
date-time |
||
url |
String |
Authenticated url to the application |
6.11. Authority
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
objectType |
String |
||||
objectId |
Integer |
int32 |
|||
objectName |
String |
||||
permissions |
Enum: |
||||
securedObjectClass |
String |
||||
securedObjectName |
String |
6.12. CustomerDTO
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
id |
Integer |
int32 |
|||
brokerId |
Integer |
int32 |
|||
name |
String |
||||
description |
String |
||||
externalId |
String |
||||
createdAt |
Date |
date-time |
6.13. DiagnosticEntryDTO
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
id |
Integer |
int32 |
|||
name |
String |
||||
type |
String |
||||
health |
X |
oas_any_type_not_mapped |
6.14. DkimDTO
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
privateKey |
String |
||||
publicKey |
String |
||||
selector |
String |
6.15. Domain
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
id |
Integer |
Idenfier of the domain |
int32 |
||
name |
X |
String |
Name of the domain |
||
description |
String |
Description of the domain |
|||
status |
X |
Activation status of the domain |
Enum: ENABLED, DISABLED, PENDING, DELETED, |
||
wblistPriority |
Defines which filtering rules take priority in the case of conflict between domain's and mailbox's filtering rules. |
Enum: DOMAIN, USER, |
|||
defaultLanguage |
X |
Default Language of the accounts in this domain |
Enum: fr (French), en (English), de (German), es (Spanish), nb (Norwegian), da (Danish), |
||
autoProvisioningOn |
X |
Boolean |
Activation status of automatic creation of users' accounts |
||
senderVerifyOn |
Boolean |
Activate the sender verify for the domain. True by default |
|||
greylistingOn |
Boolean |
Activate the greylisting for the domain. True by default |
|||
externalId |
String |
External reference of your choice (i.e. reference of customer in your billing system) |
|||
policy |
The domain's policy |
||||
domainAliases |
List of Alias |
The domain's aliases |
|||
activeUsersCount |
Long |
Number of active users of the domain |
int64 |
||
policiesCount |
Integer |
Number of policies declared for this domain |
int32 |
||
quarantine |
Boolean |
Presence of at least one policy with quarantine service |
|||
retention |
Boolean |
Presence of at least one policy with retention service |
|||
archive |
Boolean |
Presence of at least one policy with archive service |
|||
incoming |
Boolean |
Presence of at least one policy with incoming service |
|||
outgoingSubnets |
Set of [string] |
List of hosts allowed to send messages (required format: a.b.c.d/y) |
|||
creationDate |
Date |
The domain's creation date. |
date-time |
||
deletionDate |
Date |
The date the domain was marked as deleted. |
date-time |
||
purgeDate |
Date |
The date the domain will actually be deleted. |
date-time |
||
outgoingProviders |
List of OutgoingProvider |
The list of outgoing provider to which the domain belongs |
|||
customer |
Customer to which the domain belongs |
||||
platforms |
List of PlatformDTO |
List of smtp relays |
6.16. DomainAdd
domain
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
name |
X |
String |
Name of the domain |
||
description |
String |
Description of the domain |
|||
status |
X |
Activation status of the domain |
Enum: ENABLED, DISABLED, |
||
wblistPriority |
Defines which filtering rules take priority in the case of conflict between domain's and mailbox's filtering rules. User by default |
Enum: DOMAIN, USER, |
|||
incoming |
Boolean |
Activate relay service |
|||
outgoing |
Boolean |
Activate status of outgoing service |
|||
quarantine |
X |
Boolean |
Activation status of quarantine service |
||
retention |
X |
Boolean |
Activation status of retention service |
||
archive |
X |
Boolean |
Activation status of archiving service |
||
defaultLanguage |
X |
Default Language of the accounts in this domain |
Enum: fr (French), en (English), de (German), es (Spanish), nb (Norwegian), da (Danish), |
||
autoProvisioningOn |
Boolean |
Activation status of automatic creation of users' accounts |
|||
senderVerifyOn |
Boolean |
Activate the sender verify for the domain. True by default |
|||
greylistingOn |
Boolean |
Activate the greylisting for the domain. True by default |
|||
customerId |
Integer |
The identifiers of the customers to which the domain belongs |
int32 |
||
externalId |
String |
External reference of your choice (i.e. reference of customer in your billing system) |
|||
outgoingSubnets |
List of [string] |
List of subnets allowed to send messages (format : a.b.c.d/y) |
|||
outgoingProvidersIds |
List of [integer] |
The list of ids of outgoing providers enabled for the domain |
int32 |
||
platforms |
List of PlatformDTO |
The list of smtp relays |
|||
aliases |
List of [string] |
List of domain aliases |
6.17. DomainUpdate
domain
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
name |
String |
Name of the domain |
|||
description |
String |
Description of the domain |
|||
status |
Activation status of the domain |
Enum: ENABLED, DISABLED, PENDING, |
|||
wblistPriority |
Defines which filtering rules take priority in the case of conflict between domain's and mailbox's filtering rules. |
Enum: DOMAIN, USER, |
|||
quarantine |
Boolean |
Activation status of quarantine service |
|||
retention |
Boolean |
Activation status of retention service |
|||
archive |
Boolean |
Activation status of archiving service |
|||
defaultLanguage |
Default Language of the accounts in this domain |
Enum: fr (French), en (English), de (German), es (Spanish), nb (Norwegian), da (Danish), |
|||
autoProvisioningOn |
Boolean |
Activation status of automatic creation of users' accounts |
|||
senderVerifyOn |
Boolean |
Activate the sender verify for the domain. True by default |
|||
greylistingOn |
Boolean |
Activate the greylisting for the domain. True by default |
|||
customerId |
Integer |
Id of the customer to which the domain belongs |
int32 |
||
policyId |
Integer |
Id of the default policy for current domain |
int32 |
||
externalId |
String |
External reference of your choice (i.e. reference of customer in your billing system) |
|||
outgoingSubnets |
List of [string] |
List of subnets allowed to send messages (format : a.b.c.d/y) |
|||
outgoingProvidersIds |
List of [integer] |
The list of ids of outgoing providers enabled for the domain |
int32 |
||
aliases |
List of [string] |
List of domain aliases |
|||
platforms |
List of PlatformDTO |
The list of platforms which contain settings for SMTP, authentication, remediation API |
6.18. EmailAliasRecipient
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
id |
Integer |
Idenfier of the alias |
int32 |
||
X |
String |
Email address of the recipient |
|||
firstname |
String |
Firstname of the user (only set if the address match with an account of the current domain) |
|||
type |
Type of email |
Enum: USER, ALIAS, EXTERNAL_ADDRESS, |
6.19. EntityHealth
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
performedAt |
X |
Date |
Timestamp of the last check |
date-time |
|
report |
X |
Details of the diagnostic |
6.20. FilterAttachment
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
id |
Integer |
Idenfier |
int32 |
||
action |
X |
Action of the filter |
Enum: deny, allow, |
||
checkType |
X |
Content concerned by the action |
Enum: filename, contenttype, archive-contenttype, archive-filename, |
||
filter |
X |
String |
Requirement to check to execute the action (regex). |
||
description |
String |
Any comments to explain the reason behind this rule. |
|||
createdDate |
Date |
Creation date |
date-time |
6.21. FilterSender
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
id |
Integer |
Idenfier of the rule |
int32 |
||
value |
X |
String |
The address to block or allow. It can be an email or a domain |
||
owner |
X |
String |
Owner of the rule. Can be an mailbox or a domain |
||
type |
X |
Action applied if rule match |
Enum: ALLOW, BLOCK, PROTECTED, |
||
createdDate |
Date |
Creation date |
date-time |
||
expireAt |
Date |
Expiration date for the rule |
date-time |
||
description |
String |
Free description field |
|||
spfOn |
Boolean |
Activates the SPF on senders. Only applied and required for allowlist. |
6.22. FilterSenderAdd
The filtering rule to add to the domain. It is possible to add a rule for a specific email address or an entire domain.
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
value |
X |
String |
The address to block or allow. It can be an email or a domain |
||
type |
X |
Action applied if rule match |
Enum: ALLOW, BLOCK, PROTECTED, |
||
expireAt |
Date |
Expiration date for the rule |
date-time |
||
description |
String |
Free description field |
|||
spfOn |
Boolean |
Activates the SPF on senders. Only applied and required for allowlist. |
6.23. FilterSenderItem
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
value |
X |
String |
The address to block or allow. It can be an email or a domain |
||
owner |
X |
String |
Owner of the rule. Can be an mailbox or a domain |
||
type |
X |
Action applied if rule match |
Enum: ALLOW, BLOCK, PROTECTED, |
||
expireAt |
Date |
Expiration date for the rule |
date-time |
||
description |
String |
Free description field |
|||
spfOn |
Boolean |
Activates the SPF on senders. Only applied and required for allowlist. |
6.24. FilterUriBl
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
id |
Integer |
Idenfier |
int32 |
||
action |
X |
Action of the filter. URIDNSBL_SKIP_DOMAIN : Ignores checking for URIs containing the specified domain name. The spam score will therefore not be impacted. WHITELIST_URI_HOST : Messages containing URIs with the specified domain name will be positively influenced. This will have the effect of significantly lowering the spam score. BLACKLIST_URI_HOST : Messages containing URIs with the specified domain name will be negatively influenced. This will result in a significant increase of the spam score. |
Enum: uridnsbl_skip_domain, whitelist_uri_host, blacklist_uri_host, |
||
filter |
X |
String |
Content concerned by the action |
||
description |
String |
Any comments to explain the reason behind this rule. |
|||
createdDate |
Date |
Creation date |
date-time |
6.25. FilterUriBlAdd
uriBl filter
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
action |
X |
Action of the filter. URIDNSBL_SKIP_DOMAIN : Ignores checking for URIs containing the specified domain name. The spam score will therefore not be impacted) WHITELIST_URI_HOST : Messages containing URIs with the specified domain name will be positively influenced. This will have the effect of significantly lowering the spam score. BLACKLIST_URI_HOST : (Messages containing URIs with the specified domain name will be negatively influenced. This will result in a significant increase of the spam score. |
Enum: uridnsbl_skip_domain, whitelist_uri_host, blacklist_uri_host, |
||
filter |
X |
String |
Requirement to check to execute the action (regex). |
||
description |
String |
Any comments to explain the reason behind this rule. |
6.26. HealthRecord
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
status |
X |
Boolean |
Global health status of the entity |
||
entries |
X |
List of HealthResult |
List all tests performed on the entity |
6.27. HealthResult
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
type |
String |
||||
ref |
Integer |
int32 |
|||
result |
Enum: OK, ERROR, ERROR_DKIM_MISSING_ENTRY, ERROR_DKIM_INVALID_COUPLE, ERROR_MX_MISSING_ENTRY, ERROR_MX_INVALID_ENTRY, |
||||
output |
List of [string] |
6.28. ImapFolder
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
name |
String |
Folder name |
|||
path |
String |
Folder path |
|||
unreadMessageCount |
Integer |
Number of unread messages contained in the folder |
int32 |
||
messageCount |
Integer |
Number of messages contained in the folder |
int32 |
||
messagesUri |
String |
Uri which can be used to get the list of messages contained in the folder |
|||
childrenUri |
String |
Uri which can be used to get the subfolders contained in the folder |
6.29. ImapMessage
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
List of headers of the message |
Map of [AnyType] |
||||
List of email attachments |
|||||
Unique identifier of the email. Useful in the message content API. |
String |
||||
Uri which allow to get the details of the message (list of headers, attachment, body) |
String |
||||
Define if email has been read |
Boolean |
||||
Define if email has been answered |
Boolean |
||||
Define if email is new since the last time the folder has been opened |
Boolean |
||||
Define if email has been mark as deleted |
Boolean |
||||
Define if email contains attachments |
Boolean |
||||
Define if email has been marked as important by the sender |
Boolean |
||||
Date the message was sent |
Date |
date-time |
|||
Subject of the message |
String |
||||
Sender of the message |
String |
||||
Main recipients of the message |
List of [string] |
||||
Copy recipients of the message |
List of [string] |
||||
Blind copy recipients of the message |
List of [string] |
||||
Size of the message in bytes |
Integer |
int32 |
6.30. ImapMessageAttachment
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
Id of the attachment in the message |
String |
||||
Filename |
String |
||||
Content type of the file |
String |
||||
Size of the file in bytes |
Integer |
int32 |
|||
URI used for downloading the file |
String |
||||
URI used for displaying the file |
String |
6.31. ImapMessageAttachmentList
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
List of attachments |
List of ImapMessageAttachment |
||||
URI used to download an archive which contains all the attachments |
String |
||||
Number of attachments |
Integer |
int32 |
6.32. ImapMessageContent
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
List of headers of the message |
Map of [AnyType] |
||||
List of email attachments |
|||||
Unique identifier of the email. Useful in the message content API. |
String |
||||
Uri which allow to get the details of the message (list of headers, attachment, body) |
String |
||||
Define if email has been read |
Boolean |
||||
Define if email has been answered |
Boolean |
||||
Define if email is new since the last time the folder has been opened |
Boolean |
||||
Define if email has been mark as deleted |
Boolean |
||||
Define if email contains attachments |
Boolean |
||||
Define if email has been marked as important by the sender |
Boolean |
||||
Date the message was sent |
Date |
date-time |
|||
Subject of the message |
String |
||||
Sender of the message |
String |
||||
Main recipients of the message |
List of [string] |
||||
Copy recipients of the message |
List of [string] |
||||
Blind copy recipients of the message |
List of [string] |
||||
Size of the message in bytes |
Integer |
int32 |
|||
Content of the message. Only accessible by owner of the message. |
String |
||||
Content source of the message. Only accessible by owner of the message. |
String |
6.33. NewAddressAlias
group
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
X |
String |
Address of the alias |
|||
recipients |
List of [string] |
The email addresses targeted by the alias. |
6.34. NewUser
user
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
X |
String |
Username of the accoount. |
|||
firstname |
String |
Firstname of the user |
|||
lastname |
String |
Lastname of the user |
|||
status |
X |
Activation status of the account |
Enum: ENABLED, DISABLED, |
||
language |
Language of the account |
Enum: fr (French), en (English), de (German), es (Spanish), nb (Norwegian), da (Danish), |
|||
password |
String |
Clear password of the account. This field will be empty in responses of GET requests. |
|||
domainId |
X |
String |
Domain's identifier of the account |
||
policyId |
String |
Policy's identifier of the account. |
|||
platformId |
String |
Platform's identifier of the account. Take the domain's platform if not defined. |
|||
authId |
String |
Authentication provider's identifier of the account. Take the domain's default one if not defined. |
|||
senderVerifyOn |
Activation status the sender verify. |
Enum: ENABLED, DISABLED, INHERITED, |
|||
greylistingOn |
Activation status of greylisting. |
Enum: ENABLED, DISABLED, INHERITED, |
|||
sendNotification |
Boolean |
Send email to the user to inform him of the account creation. False by default. |
|||
sign |
String |
Automatic HTML sign used in compose message form when retention service is enabled. |
|||
senderVerifyActive |
Boolean |
||||
greyListingActive |
Boolean |
6.35. Option
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
value |
String |
Option value for current scope |
|||
parentValue |
String |
Parent option value used if no scope value is defined. For instance, if a user scope value is not defined, will use the domain scope value. |
|||
option |
Option datas |
6.36. OptionAdd
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
name |
X |
String |
Name of the option |
||
value |
X |
String |
Value of the option |
6.37. OptionDef
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
ptfScope |
X |
Boolean |
Is enabled on platform scope |
||
urlScope |
X |
Boolean |
Is enabled on url scope |
||
customerScope |
X |
Boolean |
Is enabled on customer scope |
||
domainScope |
X |
Boolean |
Is enabled on domain scope |
||
userScope |
X |
Boolean |
Is enabled on user scope |
||
restricted |
X |
Boolean |
Define if the option update requires sysadmin role |
||
name |
X |
String |
Option name |
||
type |
X |
Datatype for value property |
Enum: BOOL, STRING, EMAIL, URL, LIST, COLOR, DOC, TEXT, |
||
values |
List of [string] |
List of values allowed for the option |
|||
description |
String |
6.38. OutgoingProvider
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
id |
Integer |
Idenfier of the outgoing provider |
int32 |
||
name |
X |
String |
Provider name |
||
spfProvider |
X |
String |
SPF provider |
||
active |
X |
Boolean |
active |
6.39. PermissionDTO
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
name |
String |
||||
editable |
Boolean |
6.40. PersonalToken
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
id |
Integer |
Idenfier of the token |
int32 |
||
name |
X |
String |
Name of the token |
||
value |
String |
Value of the token. Only filled after post requests. |
|||
expiration |
Date |
Expiration date of the token |
date-time |
||
createdAt |
Date |
Creation date of the token |
date-time |
||
lastUse |
Date |
Last use date |
date-time |
6.41. PersonalTokenAdd
token
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
name |
X |
String |
Name of the token |
||
expiration |
Date |
Expiration date of the token |
date-time |
6.42. PlatformDTO
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
name |
X |
String |
Name of the platform. |
||
transportDest |
X |
String |
IP or hostname of the main smtp server. |
||
transportType |
X |
Protocol used to deliever message to the main smtp server. |
Enum: SMTP, SMTPS_ENCRYPT, SMTPS_MAY, |
||
transportPort |
X |
Integer |
Port of the main smtp server. |
int32 |
|
fallbackTransportDest |
String |
IP or hostname of the secondary smtp server. |
|||
fallbackTransportType |
Protocol used to deliever message to the secondary smtp server. |
Enum: SMTP, SMTPS_ENCRYPT, SMTPS_MAY, |
|||
fallbackTransportPort |
Integer |
Port of the secondary smtp server. |
int32 |
||
apiType |
X |
Type of API for remediation. |
Enum: IMAP, EXCHANGE, O365, |
||
apiData |
|||||
authType |
Type of authentication |
Enum: local, imap, ldap, oidc, entra, |
|||
authData |
|||||
default |
Boolean |
Default platform is used for relay messages when user is not created. |
6.43. Policy
policy
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
id |
Integer |
Idenfier of the policy |
int32 |
||
name |
X |
String |
Name of the policy. |
||
domainId |
Integer |
Id of the associated domain. |
int32 |
||
quarantine |
X |
Boolean |
Activation status of quarantine service |
||
retention |
X |
Boolean |
Activation status of retention service |
||
archive |
Boolean |
Activation status of archiving service |
|||
mailSizeLimit |
Integer |
Determine mail size limit in MB. |
int32 |
||
spamScore |
Float |
Score from which a message is treated as a spam. |
float |
||
incoming |
X |
Boolean |
Activation status of incoming service |
||
relayProps |
Relay parameters of the policy |
||||
quarantineProps |
Quarantaine parameters of the policy |
||||
retentionProps |
Retention parameters of the policy |
||||
archiveProps |
Archive parameters of the policy |
||||
outgoing |
Boolean |
Activation status of outgoing service |
6.44. QuarantineProps
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
duration |
Integer |
Number of days the messages are store in quarantine |
int32 |
||
storeSpam |
Boolean |
Determine if system must store spams |
|||
storeVirus |
Boolean |
Determine if system must store incoming emails which seem to contain a virus |
|||
storeAdvert |
Boolean |
Determine if system must store incoming emails which seem to be advertising |
|||
storeBlacklisted |
Boolean |
Determine if system must store incoming blocked sender |
|||
storeSenderVerify |
Boolean |
Determine if system must store incoming emails with improper sender verify |
|||
storeBadHeaders |
Boolean |
Determine if system must store emails with bad headers |
|||
storeBadEncoding |
Boolean |
Determine if system must store emails detected with bad encoding |
|||
storeBadAttachments |
Boolean |
Determine if system must store emails with unauthorized file formats |
6.45. RelayCheckHealthDTO
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
id |
Integer |
Unique identifier of the relay check health configuration. Only if platform already exists. |
int32 |
||
transportDest |
X |
String |
IP or hostname of the main smtp server. |
||
transportPort |
X |
Integer |
Port of the main smtp server. |
int32 |
|
fallbackTransportDest |
String |
IP or hostname of the secondary smtp server. |
|||
fallbackTransportPort |
Integer |
Port of the secondary smtp server. |
int32 |
||
authType |
X |
String |
Authentication type to use when connecting to the relay. |
||
authData |
X |
oas_any_type_not_mapped |
|||
apiType |
X |
String |
Type of mail server in context of remediation. |
||
apiData |
X |
oas_any_type_not_mapped |
6.46. RelayProps
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
relaySpam |
Boolean |
Determine if system must deliver incoming emails considered as spam. |
|||
relayAdvert |
Boolean |
Determine if system must deliver incoming emails considered as advertising. |
|||
advertPrefix |
String |
Prefix added to subject of email detected as adverts. Set an empty string to disable prefixing. |
|||
prefixSpam |
String |
Prefix added to subject of email detected as spam. Set an empty string to disable prefixing. |
|||
relayBadHeaders |
Boolean |
Determine if system must deliver incoming emails which contain bad headers. |
|||
relayBadAttachments |
Boolean |
Determine if system must deliver incoming emails which contain attachments with unauthorized file extensions (.exe,.zip,…) |
|||
spamScoreLimit |
Float |
Score from which a message considered as spam is not delievered. |
float |
6.47. RetentionProps
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
duration |
Integer |
Number of days the messages are store in retention |
int32 |
||
storeMailOut |
Boolean |
Determine if system must store sent emails |
|||
storeCleanMailIn |
Boolean |
Determine if system must store clean incoming emails |
6.48. Sign
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
sign |
String |
The user signature in the html format and encoded in Base64 |
6.49. SmtpMessage
datas
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
to |
List of [string] |
List of main recipients email addresses |
|||
cc |
List of [string] |
List of recipients email addresses who would recieve a copy of the message |
|||
bcc |
List of [string] |
List of recipients email addresses who would recieve a copy of the message but hidden for the other recipients |
|||
body |
String |
HTML content of the message. |
|||
subject |
String |
Subject of the message |
|||
attachments |
List of SmtpMessageAttachment |
List of files which would be attached to the message. Those files must have been sent to the server first with the attachments API. |
|||
draftId |
String |
If the message has been saved in draft, specify the id given by the API to delete it when the message is sent |
|||
originId |
String |
Id of the original message while replying or forwarding an email |
|||
ack |
Boolean |
True if an acknownledgment is required when the message is opened by the recipient |
|||
important |
Boolean |
Mark the message as important |
6.50. SmtpMessageAttachment
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
name |
X |
String |
Name of the file as it would appear in the email |
||
uid |
X |
String |
Id of the file returned by the attachment storage api |
6.51. Task
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
command |
X |
ID of the command |
Enum: send_token_mail, send_welcome_mail, |
||
params |
X |
Map of [AnyType] |
List of datas used by the command. - For command 'send_token_mail' : ```{"recipient":"cersei@lannister.net","validity":24}``` - For command 'send_password_reset_mail' : ```{"recipient":"cersei@lannister.net","validity":6}``` - For command 'send_welcome_mail' : ```{"recipient":"cersei@lannister.net"}``` |
||
param |
X |
oas_any_type_not_mapped |
6.52. UpdateUser
user
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
X |
String |
Username of the accoount. |
|||
firstname |
String |
Firstname of the user |
|||
lastname |
String |
Lastname of the user |
|||
status |
X |
Activation status of the account |
Enum: ENABLED, DISABLED, |
||
language |
Language of the account |
Enum: fr (French), en (English), de (German), es (Spanish), nb (Norwegian), da (Danish), |
|||
password |
String |
Clear password of the account. This field will be empty in responses of GET requests. |
|||
domainId |
X |
String |
Domain's identifier of the account |
||
policyId |
String |
Policy's identifier of the account. |
|||
platformId |
String |
Platform's identifier of the account. Take the domain's platform if not defined. |
|||
authId |
String |
Authentication provider's identifier of the account. Take the domain's default one if not defined. |
|||
senderVerifyOn |
Activation status the sender verify. |
Enum: ENABLED, DISABLED, INHERITED, |
|||
greylistingOn |
Activation status of greylisting. |
Enum: ENABLED, DISABLED, INHERITED, |
|||
sendNotification |
Boolean |
Send email to the user to inform him of the account creation. False by default. |
|||
sign |
String |
Automatic HTML sign used in compose message form when retention service is enabled. |
|||
mfaType |
Disable account's multi-factor authentication. |
Enum: NONE, |
|||
senderVerifyActive |
Boolean |
||||
greyListingActive |
Boolean |
6.53. UploadFileRequest
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
file |
X |
File |
file |
binary |
6.54. User
| Field Name | Required | Nullable | Type | Description | Format |
|---|---|---|---|---|---|
id |
Integer |
Idenfier of the user |
int32 |
||
X |
String |
Username of the accoount. |
|||
firstname |
String |
Firstname of the user |
|||
lastname |
String |
Lastname of the user |
|||
status |
X |
Activation status of the account |
Enum: ENABLED, DISABLED, |
||
language |
X |
Language of the account |
Enum: fr (French), en (English), de (German), es (Spanish), nb (Norwegian), da (Danish), |
||
creationDate |
Date |
The account's creation date |
date-time |
||
domainId |
X |
Integer |
Domain's identifier of the account |
int32 |
|
policy |
The user's policy |
||||
senderVerifyOn |
Boolean |
Activate the sender verify for the user. True by default |
|||
greylistingOn |
Boolean |
Activate the greylisting for the domain. True by default |
|||
domainPolicyId |
Integer |
Default policy id of the domain |
int32 |
||
domainStatus |
The status of the domain |
Enum: ENABLED, DISABLED, DELETED, PENDING, |
|||
domainPlatformId |
Integer |
Default platform id of the domain |
int32 |
||
platform |
SMTP relay data |
||||
mfaType |
Account's defined multi-factor authentication. |
Enum: NONE, TOTP, |
|||
lastConnectionDate |
Date |
Date of last connection to application. |
date-time |