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 sort 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.

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 GET requests by passing additional offset and pageSize parameters in your query.
The count of the total number of available results is send in a x-total-count header of the response.

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

Responses
Table 1. HTTP Response Codes
Code Message Datatype

200

OK

[String]

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.

-

login

search

Filter by login, email, displayName

-

null

Responses
Table 2. HTTP Response Codes
Code Message Datatype

200

OK

List[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

Responses
Table 3. HTTP Response Codes
Code Message Datatype

200

OK

Admin

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

Content Type
  • application/json

Responses
Table 4. HTTP Response Codes
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

AdminUpdate

X

Responses
Table 5. HTTP Response Codes
Code Message Datatype

200

OK

Admin

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

PersonalTokenAdd

X

Content Type
  • application/json

Responses
Table 6. HTTP Response Codes
Code Message Datatype

404

Resource does not exist.

PersonalToken

403

Only sysadmin or target user can call this endpoint.

PersonalToken

Example HTTP request
POST /admins/ByE3n/tokens HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzU2NywiZXhwIjoxNzc0NDYxMTY3LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.rKXcYbQxuJ56elO40d-0jjDV6NcfuEn2RA_JMloEaRx9StZzrOYjUqkVgqQcSlOGE6tF94X0YnQlY7hMgNfHpw
Content-Length: 45
Host: localhost:8080

{"name":"mytoken","expiration":1805993567120}
Example Curl request
$ curl 'http://localhost:8080/admins/ByE3n/tokens' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzU2NywiZXhwIjoxNzc0NDYxMTY3LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.rKXcYbQxuJ56elO40d-0jjDV6NcfuEn2RA_JMloEaRx9StZzrOYjUqkVgqQcSlOGE6tF94X0YnQlY7hMgNfHpw' \
    -d '{"name":"mytoken","expiration":1805993567120}'
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" : "2ab6ac9404f26a929a8ea88f392fa874",
  "expiration" : 1805993567120,
  "createdAt" : 1774457567139
}

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
Table 7. HTTP Response Codes
Code Message Datatype

404

Resource does not exist.

List[PersonalToken]

403

Only sysadmin or target user can call this endpoint.

List[PersonalToken]

Example HTTP request
GET /admins/ByE3n/tokens HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzU2NiwiZXhwIjoxNzc0NDYxMTY2LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.edRde3CXSkAyL-7xp1OsMOgSOB00FxPXrGsbZ6iD6yg51CAk-T7UVgIUMj7BISYWNGl4elMfrLfnRFclg5-fpA
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/admins/ByE3n/tokens' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzU2NiwiZXhwIjoxNzc0NDYxMTY2LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.edRde3CXSkAyL-7xp1OsMOgSOB00FxPXrGsbZ6iD6yg51CAk-T7UVgIUMj7BISYWNGl4elMfrLfnRFclg5-fpA'
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" : 1805993566000,
  "createdAt" : 1774457566000
}, {
  "id" : "By46n",
  "name" : "mytoken2",
  "createdAt" : 1774457566000
} ]

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
Table 8. HTTP Response Codes
Code Message Datatype

404

Resource does not exist.

[String]

403

Only sysadmin or target user can call this endpoint.

[String]

Example HTTP request
DELETE /admins/ByE3n/tokens/ByE3n HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzU2NSwiZXhwIjoxNzc0NDYxMTY1LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.J1ZYHu_dl5-c-XBd78LZaztSRGu1vx7oVvwFnXppQ6nHX_d3RGVIj5HPvQtWVirVX1ODlM83onTJCzLteLKvNg
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/admins/ByE3n/tokens/ByE3n' -i -X DELETE \
    -H 'Content-Type: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzU2NSwiZXhwIjoxNzc0NDYxMTY1LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.J1ZYHu_dl5-c-XBd78LZaztSRGu1vx7oVvwFnXppQ6nHX_d3RGVIj5HPvQtWVirVX1ODlM83onTJCzLteLKvNg'
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

[string]

X

Content Type
  • application/json

Responses
Table 9. HTTP Response Codes
Code Message Datatype

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]

404

A problem occured. The domain may not exist

List[Alias]

Example HTTP request
POST /domains/Eygdk/aliases HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzY5MSwiZXhwIjoxNzc0NDYxMjkxLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.lDJft6QbzSWHA-lf_Tia8hKD1SXRRed1_WUlDbshcUOCf9WE3LGDv4g0X8qar_oh3Mi56hXks3s4EO7tZ6UK-g
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 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzY5MSwiZXhwIjoxNzc0NDYxMjkxLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.lDJft6QbzSWHA-lf_Tia8hKD1SXRRed1_WUlDbshcUOCf9WE3LGDv4g0X8qar_oh3Mi56hXks3s4EO7tZ6UK-g' \
    -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
Table 10. HTTP Response Codes
Code Message Datatype

403

You do not have permission to execute this request.

EmailAlias

400

A problem occured. Possible cause: at least one parameter might not match required format

EmailAlias

404

A problem occured. The domain and/or the alias may not exist

EmailAlias

Example HTTP request
DELETE /domains/Eygdk/aliases/ByE3n HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzY4OSwiZXhwIjoxNzc0NDYxMjg5LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.B8LkrCztNhdgwup6fsm2dwp5B3OqjWkEsaRBVTs3sSWj8TISpBAiytZy7o5wkDoMWjlWlC2583kDYJTVjMEAwQ
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/domains/Eygdk/aliases/ByE3n' -i -X DELETE \
    -H 'Content-Type: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzY4OSwiZXhwIjoxNzc0NDYxMjg5LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.B8LkrCztNhdgwup6fsm2dwp5B3OqjWkEsaRBVTs3sSWj8TISpBAiytZy7o5wkDoMWjlWlC2583kDYJTVjMEAwQ'
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.

-

name

offset

Index of the first alias to return, defaults to 0

-

0

pageSize

Maximum number of aliases returned, defaults to 40

-

40

Content Type
  • application/json

Responses
Table 11. HTTP Response Codes
Code Message Datatype

403

You do not have permission to execute this request.

List[Alias]

404

A problem occured. The domain may not exist

List[Alias]

Example HTTP request
GET /domains/Eygdk/aliases HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzY5MiwiZXhwIjoxNzc0NDYxMjkyLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.DwmBVJlj7zvQIUYcqNVipBMJdup1x-O64oKXrWzj8tbY_723IdpU8kyZq50v74qSvpLKlh_WbHpHkVZ-xx26Ng
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/domains/Eygdk/aliases' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzY5MiwiZXhwIjoxNzc0NDYxMjkyLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.DwmBVJlj7zvQIUYcqNVipBMJdup1x-O64oKXrWzj8tbY_723IdpU8kyZq50v74qSvpLKlh_WbHpHkVZ-xx26Ng'
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

[string]

X

Content Type
  • application/json

Responses
Table 12. HTTP Response Codes
Code Message Datatype

403

You do not have permission to execute this request.

List[Alias]

409

An alias may already exists with the given name

List[Alias]

404

A problem occured. The domain may not exist

List[Alias]

Example HTTP request
PUT /domains/Eygdk/aliases HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzY5MCwiZXhwIjoxNzc0NDYxMjkwLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.44HR3Ook_l8ig2m3RNLakrpPewptZQiyReyv1kSpPHDlz0RxehBBpzH7yYrS-J3a-s8fZoitnzx8JonpUM5vBg
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 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzY5MCwiZXhwIjoxNzc0NDYxMjkwLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.44HR3Ook_l8ig2m3RNLakrpPewptZQiyReyv1kSpPHDlz0RxehBBpzH7yYrS-J3a-s8fZoitnzx8JonpUM5vBg' \
    -d '["lanisters.net","lions.net"]'
Example HTTP response
HTTP/1.1 204 No Content
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers

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

Policy

X

Content Type
  • application/json

Responses
Table 13. HTTP Response Codes
Code Message Datatype

422

Operation cannot be done because of not met conditions.

Policy

409

A policy may already exists with the given name

Policy

403

Only users with sysadmin role can execute this request.

Policy

201

Created

Policy

Example HTTP request
POST /domains/ByE3n/policies HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1Nzc3NiwiZXhwIjoxNzc0NDYxMzc2LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.IOnOqPHzKmp92Tu6xSIY5uVHh8N3GCF6EgyGl2PYQWTN6Bsg_rsfPvnGRrPUK619R3xUYOXWnQG2qqZRfIKYwQ
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 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1Nzc3NiwiZXhwIjoxNzc0NDYxMzc2LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.IOnOqPHzKmp92Tu6xSIY5uVHh8N3GCF6EgyGl2PYQWTN6Bsg_rsfPvnGRrPUK619R3xUYOXWnQG2qqZRfIKYwQ' \
    -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
Table 14. HTTP Response Codes
Code Message Datatype

404

Policy not found with given id.

[String]

400

A problem occured. Possible cause: the policy is affected to a domain or a user.

[String]

403

Only users with sysadmin role can execute this request.

[String]

Example HTTP request
DELETE /policies/Eygdk HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1Nzc3OSwiZXhwIjoxNzc0NDYxMzc5LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.gRO5xQH_szdrV0mm34wPZCreLcMeUb5QDWgI-fPwRBWnGcYQtlXnI5ObKAWeqsAChZ5DNgXYJ9kGdXpH3IM5GQ
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/policies/Eygdk' -i -X DELETE \
    -H 'Content-Type: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1Nzc3OSwiZXhwIjoxNzc0NDYxMzc5LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.gRO5xQH_szdrV0mm34wPZCreLcMeUb5QDWgI-fPwRBWnGcYQtlXnI5ObKAWeqsAChZ5DNgXYJ9kGdXpH3IM5GQ'
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
Table 15. HTTP Response Codes
Code Message Datatype

404

Policy not found with given id

Policy

Example HTTP request
GET /policies/YyjPn HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1Nzc3NywiZXhwIjoxNzc0NDYxMzc3LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.pK-kA3SLZqquuFlkXWEWbrMLaosjVnVuDdVICpTlE4Brw_-1c4aWAIerEzkEqRf2V0cLIMeVcNpZfvxVknHUGg
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/policies/YyjPn' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1Nzc3NywiZXhwIjoxNzc0NDYxMzc3LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.pK-kA3SLZqquuFlkXWEWbrMLaosjVnVuDdVICpTlE4Brw_-1c4aWAIerEzkEqRf2V0cLIMeVcNpZfvxVknHUGg'
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.

-

name

offset

Index of the first domain to return, defaults to 0

-

0

pageSize

Maximum number of domains returned, defaults to 40

-

40

Content Type
  • application/json

Responses
Table 16. HTTP Response Codes
Code Message Datatype

200

OK

List[Policy]

Example HTTP request
GET /domains/ByE3n/policies HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1Nzc3OCwiZXhwIjoxNzc0NDYxMzc4LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.m5Z4pzjwXMORsmIvezRu4DMpailthfMQ7pr6wz1Mu7-aRf_qJEIzx6Fs5hHY1_j2--_SjnI6hnBSFx1Ydb3L5g
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/domains/ByE3n/policies' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1Nzc3OCwiZXhwIjoxNzc0NDYxMzc4LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.m5Z4pzjwXMORsmIvezRu4DMpailthfMQ7pr6wz1Mu7-aRf_qJEIzx6Fs5hHY1_j2--_SjnI6hnBSFx1Ydb3L5g'
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

Policy

X

Content Type
  • application/json

Responses
Table 17. HTTP Response Codes
Code Message Datatype

404

Policy not found with given id

Policy

422

Operation cannot be done because of not met conditions.

Policy

400

A problem occured. Possible cause: the policy name does not match required format

Policy

403

Only users with sysadmin role can execute this request.

Policy

Example HTTP request
PATCH /policies/ByE3n HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1Nzc4MCwiZXhwIjoxNzc0NDYxMzgwLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.zCIBz1Ma8ObNzUzD_AD5nuECohNYp3rAz-emA9hLE6nMZp5c-jINkdz9izfIrKmSf1zITETPSHUUrcZ8LwuZHw
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 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1Nzc4MCwiZXhwIjoxNzc0NDYxMzgwLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.zCIBz1Ma8ObNzUzD_AD5nuECohNYp3rAz-emA9hLE6nMZp5c-jINkdz9izfIrKmSf1zITETPSHUUrcZ8LwuZHw' \
    -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

DomainAdd

X

Content Type
  • application/json

Responses
Table 18. HTTP Response Codes
Code Message Datatype

403

Authorisation failure. You may have reached the limitation of domain creation or you do not have the sysadmin role.

Domain

400

A problem occurred. Possible cause: the domain name does not match required format

Domain

422

Operation cannot be done because of not met conditions.

Domain

409

A domain may already exists with the given name

Domain

201

Created

Domain

Example HTTP request
POST /domains HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzQ0NiwiZXhwIjoxNzc0NDYxMDQ2LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.aciwZx_Zj-eq7egBxKkBMnms6xDPhxyu4QdY1ozzIT5dRzGM-eGtpZF8uKa2mf82ayO0EiUITnyymeDhizBilw
Content-Length: 443
Host: localhost:8080

{"name":"got.com","status":"ENABLED","incoming":true,"outgoing":false,"quarantine":true,"retention":true,"archive":true,"defaultLanguage":"DE","autoProvisioningOn":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 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzQ0NiwiZXhwIjoxNzc0NDYxMDQ2LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.aciwZx_Zj-eq7egBxKkBMnms6xDPhxyu4QdY1ozzIT5dRzGM-eGtpZF8uKa2mf82ayO0EiUITnyymeDhizBilw' \
    -d '{"name":"got.com","status":"ENABLED","incoming":true,"outgoing":false,"quarantine":true,"retention":true,"archive":true,"defaultLanguage":"DE","autoProvisioningOn":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: 2415

{
  "id" : "Eygdk",
  "name" : "got.com",
  "description" : null,
  "status" : "ENABLED",
  "wblistPriority" : "USER",
  "defaultLanguage" : "DE",
  "autoProvisioningOn" : true,
  "senderVerifyOn" : 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" : 1774457446695,
  "deletionDate" : null,
  "purgeDate" : null,
  "outgoingProviders" : [ ],
  "customer" : {
    "id" : "ByE3n",
    "brokerId" : "ByE3n",
    "name" : "Alinto",
    "description" : null,
    "externalId" : null,
    "createdAt" : 1774457446000
  },
  "platforms" : [ {
    "id" : "RkVMy",
    "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

[string]

X

Responses
Table 19. HTTP Response Codes
Code Message Datatype

200

OK

AclDTO

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

AdminAdd

X

Responses
Table 20. HTTP Response Codes
Code Message Datatype

200

OK

Admin

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

Responses
Table 21. HTTP Response Codes
Code Message Datatype

200

OK

Option

Example HTTP request
DELETE /domains/Eygdk/options/DOMAIN_ADMIN HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzQ0MCwiZXhwIjoxNzc0NDYxMDQwLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.BVbX1P8M4PtDs4mhjo4fIv_KQoLDeHOLriQ3iiXNFKc0iVKkzFqp_24j1LgPJeUFcaKSW4tlVvW6SivzfOQ20Q
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/domains/Eygdk/options/DOMAIN_ADMIN' -i -X DELETE \
    -H 'Content-Type: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzQ0MCwiZXhwIjoxNzc0NDYxMDQwLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.BVbX1P8M4PtDs4mhjo4fIv_KQoLDeHOLriQ3iiXNFKc0iVKkzFqp_24j1LgPJeUFcaKSW4tlVvW6SivzfOQ20Q'
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

Responses
Table 22. HTTP Response Codes
Code Message Datatype

200

OK

[String]

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
Table 23. HTTP Response Codes
Code Message Datatype

422

Operation cannot be done because of not met conditions.

Domain

403

Only users with sysadmin role can execute this request.

Domain

404

Domain not found with given id

Domain

Example HTTP request
DELETE /domains/Eygdk HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzQ0MywiZXhwIjoxNzc0NDYxMDQzLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.zDHHLQa2YMAafqMabl8O5psJByDsH0GkdbR65b9EGsyFCxxN3si_5rML4DucEzE0_jz0rtkWTmrRJv_LemXFrQ
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/domains/Eygdk' -i -X DELETE \
    -H 'Content-Type: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzQ0MywiZXhwIjoxNzc0NDYxMDQzLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.zDHHLQa2YMAafqMabl8O5psJByDsH0GkdbR65b9EGsyFCxxN3si_5rML4DucEzE0_jz0rtkWTmrRJv_LemXFrQ'
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

Responses
Table 24. HTTP Response Codes
Code Message Datatype

200

OK

Admin

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
Table 25. HTTP Response Codes
Code Message Datatype

404

Domain not found with given id

Domain

Example HTTP request
GET /domains/Eygdk HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzQ0OSwiZXhwIjoxNzc0NDYxMDQ5LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.Vjp24nk0oWWjZ0mYMJEtiHa9iCAcCL44cb9Klfpnt4XecdfLil06uwLGaPj6EaiWVUMO_njkbn1_KUQk_lo4JA
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/domains/Eygdk' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzQ0OSwiZXhwIjoxNzc0NDYxMDQ5LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.Vjp24nk0oWWjZ0mYMJEtiHa9iCAcCL44cb9Klfpnt4XecdfLil06uwLGaPj6EaiWVUMO_njkbn1_KUQk_lo4JA'
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: 3608

{
  "id" : "Eygdk",
  "name" : "got.com",
  "description" : null,
  "status" : "ENABLED",
  "wblistPriority" : "USER",
  "defaultLanguage" : "EN",
  "autoProvisioningOn" : false,
  "senderVerifyOn" : 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" : 1774457449000,
  "deletionDate" : null,
  "purgeDate" : null,
  "outgoingProviders" : [ {
    "id" : "ByE3n",
    "name" : "test1",
    "spfProvider" : "spf.protection.outlook.com",
    "active" : true
  } ],
  "customer" : {
    "id" : "ByE3n",
    "brokerId" : "ByE3n",
    "name" : "Alinto",
    "description" : null,
    "externalId" : null,
    "createdAt" : 1774457448000
  },
  "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
  }, {
    "id" : "oydvn",
    "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" : "6AMln",
    "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" : "zkLOy",
    "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" : "RkVMy",
    "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" : "WAzMn",
    "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.

-

login

search

Filter by login, email, displayName

-

null

Responses
Table 26. HTTP Response Codes
Code Message Datatype

200

OK

List[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

Content Type
  • application/json

Responses
Table 27. HTTP Response Codes
Code Message Datatype

200

OK

List[Option]

Example HTTP request
GET /domains/Eygdk/options HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzQ0NSwiZXhwIjoxNzc0NDYxMDQ1LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.2WfZ5KziZ56GqjV1fVT9EXtx0wfLzZ4AHXbOiJ5TaHE3gWlI4jAnd6kSKPnqbETGTSWFisJA9gKNTHevWXS17Q
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/domains/Eygdk/options' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzQ0NSwiZXhwIjoxNzc0NDYxMDQ1LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.2WfZ5KziZ56GqjV1fVT9EXtx0wfLzZ4AHXbOiJ5TaHE3gWlI4jAnd6kSKPnqbETGTSWFisJA9gKNTHevWXS17Q'
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

-

0

pageSize

Maximum number of domains returned, defaults to 40

-

40

sort

Define the sort applied on response. Prefix the field name by '-' to reverse the sort.

-

name

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

Content Type
  • application/json

Responses
Table 28. HTTP Response Codes
Code Message Datatype

200

OK

List[Domain]

Example HTTP request
GET /domains?name=stark.net HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzQ1MCwiZXhwIjoxNzc0NDYxMDUwLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.epas2NG6INSL5BaS0E0LK7zpgDnZsteDBWo2BFFAZd41VjIr1TImgVbVE-Ao5sAdPEI3bMfE6WqAOLQfe9aodw
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/domains?name=stark.net' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzQ1MCwiZXhwIjoxNzc0NDYxMDUwLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.epas2NG6INSL5BaS0E0LK7zpgDnZsteDBWo2BFFAZd41VjIr1TImgVbVE-Ao5sAdPEI3bMfE6WqAOLQfe9aodw'
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: 3979

[ {
  "id" : "Eygdk",
  "name" : "stark.net",
  "description" : null,
  "status" : "ENABLED",
  "wblistPriority" : "USER",
  "defaultLanguage" : "FR",
  "autoProvisioningOn" : false,
  "senderVerifyOn" : 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" : 1774457450000,
  "deletionDate" : null,
  "purgeDate" : null,
  "outgoingProviders" : [ {
    "id" : "ByE3n",
    "name" : "test1",
    "spfProvider" : "spf.protection.outlook.com",
    "active" : true
  } ],
  "customer" : {
    "id" : "ByE3n",
    "brokerId" : "ByE3n",
    "name" : "Alinto",
    "description" : null,
    "externalId" : null,
    "createdAt" : 1774457449000
  },
  "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
  }, {
    "id" : "oydvn",
    "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" : "6AMln",
    "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" : "zkLOy",
    "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" : "RkVMy",
    "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" : "WAzMn",
    "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" : "BAwly",
    "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

Responses
Table 29. HTTP Response Codes
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

[string]

X

Responses
Table 30. HTTP Response Codes
Code Message Datatype

200

OK

[String]

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

OptionAdd

X

Content Type
  • application/json

Responses
Table 31. HTTP Response Codes
Code Message Datatype

200

OK

Option

Example HTTP request
POST /domains/Eygdk/options HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzQ0OCwiZXhwIjoxNzc0NDYxMDQ4LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.RsTfkRdW6-UWz4ouaNey9rxPiU2AZ34N4xqXQKOrZQNj8DWNKl9O99Shh1SVs46EYKNvEP1wq71NU9ErzDHgjw
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 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzQ0OCwiZXhwIjoxNzc0NDYxMDQ4LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.RsTfkRdW6-UWz4ouaNey9rxPiU2AZ34N4xqXQKOrZQNj8DWNKl9O99Shh1SVs46EYKNvEP1wq71NU9ErzDHgjw' \
    -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

DomainUpdate

X

Header Parameters
Name Description Required Default Pattern

X-Ignore-MX

-

null

Content Type
  • application/json

Responses
Table 32. HTTP Response Codes
Code Message Datatype

400

A problem occured. Possible cause: the domain name does not match required format

Domain

422

Operation cannot be done because of not met conditions.

Domain

404

Domain not found with given id

Domain

Example HTTP request
PATCH /domains/Eygdk HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzQ0MSwiZXhwIjoxNzc0NDYxMDQxLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.w2GQV2SgKRWeBTgDMgz0aP7ecL933lOR5YZuiXE82i5bdaN5bKvLLqCcmZSko62cD9qRO_NQyyoOae7uSX_urA
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 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzQ0MSwiZXhwIjoxNzc0NDYxMDQxLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.w2GQV2SgKRWeBTgDMgz0aP7ecL933lOR5YZuiXE82i5bdaN5bKvLLqCcmZSko62cD9qRO_NQyyoOae7uSX_urA' \
    -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

DkimDTO

-

Content Type
  • application/json

Responses
Table 33. HTTP Response Codes
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
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzY3NSwiZXhwIjoxNzc0NDYxMjc1LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.6yVzTorHwhpAiU2DkWGeVVQXL35fAekclExlnrboQJxhmPxKKJsiDsbwUS5GynSHBy7hG1osgKNXGiXjfDMZGQ
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/domains/Eygdk/dkim' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzY3NSwiZXhwIjoxNzc0NDYxMjc1LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.6yVzTorHwhpAiU2DkWGeVVQXL35fAekclExlnrboQJxhmPxKKJsiDsbwUS5GynSHBy7hG1osgKNXGiXjfDMZGQ'
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=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtWkWo6WSG4JPcg4hKa+8tsnEZ7RQVRUvYkriAy+haenZ+yLx4CBiOBb2UasEmTjHaTvBivjFZ+fmNImKhK0Bu4RAIIRoodMyVDPyfBTmrazxPxaQ31IczthfVfPz8jt/Xx2DbnZXl38iwyXP+MG7NPdYId3ekUBw+ZqYLi6TiC87DhWKyeZrPRZ37zHVP/6rUKhvHrkAQQ+cjlF4eCiz5QjVQ0GTwuZjdl0/GZihD3C2C89Q4Un1bhXZ4474J9N3SNPsikYTPBVwmF30aUAVLFwK053ZBloXOxn085B6U7ngv+Ijy/VpXK6cR8oLEm03rP0pphdSUnLMTJH3Ul69nQIDAQAB" ]

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
Table 34. HTTP Response Codes
Code Message Datatype

403

You do not have permission to execute this request. (sysadmin required)

[String]

404

A problem occured. The domain may not exist

[String]

Example HTTP request
DELETE /domains/Eygdk/dkim HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzY3MiwiZXhwIjoxNzc0NDYxMjcyLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.yDlWP0HhnVRe8DE7v56ISONEIEDBcWKQHjqZwQ6x4_jlymoeWaDQdzSl3iDtLwGDPcOGzzRak7_ZVX8MbgDGfA
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/domains/Eygdk/dkim' -i -X DELETE \
    -H 'Content-Type: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzY3MiwiZXhwIjoxNzc0NDYxMjcyLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.yDlWP0HhnVRe8DE7v56ISONEIEDBcWKQHjqZwQ6x4_jlymoeWaDQdzSl3iDtLwGDPcOGzzRak7_ZVX8MbgDGfA'
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
Table 35. HTTP Response Codes
Code Message Datatype

404

No DKIM values found. Or the domain may not exist

List[[string]]

403

You do not have permission to execute this request.

List[[string]]

Example HTTP request
GET /domains/Eygdk/dkim HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzY3NCwiZXhwIjoxNzc0NDYxMjc0LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.ZHl7chyU3d399pdYoyMoSN7BXQndXhEHi3pRA4uDH6rJCfaLjTeJQ0IJIGx73rysSfwBgxAjTZV1UGuy_b45Fg
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/domains/Eygdk/dkim' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzY3NCwiZXhwIjoxNzc0NDYxMjc0LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.ZHl7chyU3d399pdYoyMoSN7BXQndXhEHi3pRA4uDH6rJCfaLjTeJQ0IJIGx73rysSfwBgxAjTZV1UGuy_b45Fg'
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

DkimDTO

-

Content Type
  • application/json

Responses
Table 36. HTTP Response Codes
Code Message Datatype

403

You do not have permission to execute this request. (sysadmin required)

List[[string]]

404

A problem occured. The domain may not exist.

List[[string]]

Example HTTP request
PUT /domains/Eygdk/dkim HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzY3MywiZXhwIjoxNzc0NDYxMjczLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.Anuk-zww-JsH_cS4sGbCm8pmBpJMAHYTiHGXwMe_58Zm1WTlF1TXyiLh4_c1_deu39OWmuMdwbbzAdZs3SnpXQ
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/domains/Eygdk/dkim' -i -X PUT \
    -H 'Content-Type: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzY3MywiZXhwIjoxNzc0NDYxMjczLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.Anuk-zww-JsH_cS4sGbCm8pmBpJMAHYTiHGXwMe_58Zm1WTlF1TXyiLh4_c1_deu39OWmuMdwbbzAdZs3SnpXQ'
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=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArIPem+em6YCCYDBOP9qFsGVuIh1IFaFfdw330ttOYl2fjO2gLnOxYZMXvznFBDfWB9J1Gcfir8YeNKtQmBSDnRAZQhX1euegAe7WGsp56W3NoTPHRMYDs/GKnMKjOmzSbuToteDeYPsPF4SwzpbBya7QTH/r7fzoIFGQtM9/lOAWn8X09Iw+9cuv4Ap6zZSiTjxaOomU8w14jE0UPxj3E1jMy5g8PN4LiWIoGLfvxsYkN1OPU3uMtKuWqBY+Gqh7pQcmqyaNsVRvIL/KyKoG5ohBiych8aJwE3BxV3U8fifxKn391vM7cXJ5RYn5JJmcXjJ+QdwCB7K5bRseafQeCQIDAQAB" ]

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

Responses
Table 37. HTTP Response Codes
Code Message Datatype

200

OK

[File]

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

Responses
Table 38. HTTP Response Codes
Code Message Datatype

404

File not found.

[Object]

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

Responses
Table 39. HTTP Response Codes
Code Message Datatype

404

File not found.

[File]

5.7.4. Download attachment

GET /emails/attachments/{uid}/{filename}

Parameters
Path Parameters
Name Description Required Default Pattern

uid

X

null

filename

X

null

Responses
Table 40. HTTP Response Codes
Code Message Datatype

404

File not found.

[File]

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

-

HEADERS

Content Type
  • application/json

Responses
Table 41. HTTP Response Codes
Code Message Datatype

500

Something went wrong. Possibly unable to connect to Imap.

ImapMessageContent

200

Mail returned successfully

ImapMessageContent

404

The user or the mail not exist.

ImapMessageContent

403

Authorisation failure.

ImapMessageContent

5.7.6. 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

Content Type
  • application/json

Responses
Table 42. HTTP Response Codes
Code Message Datatype

500

Something went wrong. Possibly unable to connect to Imap.

List[ImapFolder]

200

Folders returned successfully

List[ImapFolder]

404

The user not exist.

List[ImapFolder]

403

Authorisation failure.

List[ImapFolder]

5.7.7. 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

Content Type
  • application/json

Responses
Table 43. HTTP Response Codes
Code Message Datatype

500

Something went wrong. Possibly unable to connect to Imap.

List[ImapFolder]

200

Folders returned successfully

List[ImapFolder]

404

The user not exist.

List[ImapFolder]

403

Authorisation failure.

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.

-

-sentDate

offset

Index of the first mail to return, defaults to 0

-

0

pageSize

Maximum number of mails returned, defaults to 40

-

40

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)

-

Optional[AND]

id

Search on the id of the message

-

null

Content Type
  • application/json

Responses
Table 44. HTTP Response Codes
Code Message Datatype

500

Something went wrong. Possibly unable to connect to Imap.

List[ImapMessage]

404

The user or the folder not exist.

List[ImapMessage]

403

Authorisation failure.

List[ImapMessage]

200

Mails returned successfully

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.

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
Table 45. HTTP Response Codes
Code Message Datatype

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

[Object]

400

An internal problem occured.

[Object]

404

The user or the couple folder/fugluId may not exist

[Object]

204

No Content

[Object]

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

SmtpMessage

X

Content Type
  • application/json

Responses
Table 46. HTTP Response Codes
Code Message Datatype

400

Error in given parameters.

[String]

200

OK

[String]

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

UploadFileRequest

-

Responses
Table 47. HTTP Response Codes
Code Message Datatype

200

OK

AttachmentFile

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
Table 48. HTTP Response Codes
Code Message Datatype

403

You do not have permission to execute this request.

FilterAttachment

404

Domain may not exist

FilterAttachment

409

This item may already exists with same rules

FilterAttachment

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" : 1774457597288
}

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
Table 49. HTTP Response Codes
Code Message Datatype

403

You do not have permission to execute this request.

[String]

404

No attachment filter found with given id

[String]

400

A problem occured

[String]

Example HTTP request
DELETE /filters/attachments/ByE3n HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzU5OCwiZXhwIjoxNzc0NDYxMTk4LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.dWXwVoRafLqsNuSMbVm65b0foJizbPeHDkuA2SZeNaT5LG8egaTbxED7O5Wd6ktqH-yItyL6YiT8auhlvvGQ0g
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/filters/attachments/ByE3n' -i -X DELETE \
    -H 'Content-Type: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzU5OCwiZXhwIjoxNzc0NDYxMTk4LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.dWXwVoRafLqsNuSMbVm65b0foJizbPeHDkuA2SZeNaT5LG8egaTbxED7O5Wd6ktqH-yItyL6YiT8auhlvvGQ0g'
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

-

0

pageSize

Maximum number of groups returned, defaults to 40

-

40

sort

Define the sort applied on response. Prefix the field name by '-' to reverse the sort.

-

action

action

Filter the list by action

-

null

Content Type
  • application/json

  • application/vnd.ms-excel

Responses
Table 50. HTTP Response Codes
Code Message Datatype

403

You do not have permission to execute this request.

List[FilterAttachment]

404

Domain may not exist

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
Table 51. HTTP Response Codes
Code Message Datatype

403

You do not have permission to execute this request.

FilterAttachment

404

No attachment filter found with given id

FilterAttachment

400

A problem occured

FilterAttachment

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

FilterSenderItem

X

Content Type
  • application/json

Responses
Table 52. HTTP Response Codes
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
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzU0MywiZXhwIjoxNzc0NDYxMTQzLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.O1CGCVzeeQ_1AUwY8tYjV7oNsMZcVTP8XMpVH4dj6yaMYb4C0O3AiQ-3M6lJL8Q-Av0fAtJnDiZvjhFlR3WUNg
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":1779724343742,"description":"he's a traitor"}]
Example Curl request
$ curl 'http://localhost:8080/wblist' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzU0MywiZXhwIjoxNzc0NDYxMTQzLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.O1CGCVzeeQ_1AUwY8tYjV7oNsMZcVTP8XMpVH4dj6yaMYb4C0O3AiQ-3M6lJL8Q-Av0fAtJnDiZvjhFlR3WUNg' \
    -d '[{"value":"daenerys@goodguys.fr","owner":"iswittercoming.net","type":"ALLOW","spfOn":true},{"value":"baelish@badguys.fr","owner":"notyet@iswittercoming.net","type":"BLOCK","expireAt":1779724343742,"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" : 1774457543791,
  "expireAt" : null,
  "description" : null,
  "spfOn" : true
}, {
  "id" : "By46n",
  "value" : "baelish@badguys.fr",
  "owner" : "notyet@iswittercoming.net",
  "type" : "BLOCK",
  "createdDate" : 1774457543814,
  "expireAt" : 1779724343742,
  "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

FilterSenderAdd

X

Content Type
  • application/json

Responses
Table 53. HTTP Response Codes
Code Message Datatype

409

An identical rule may already exist

List[FilterSender]

403

You do not have permission to execute this request.

List[FilterSender]

404

Domain may not 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
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzU0MSwiZXhwIjoxNzc0NDYxMTQxLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.q9xPzB3QsrPVrQEMKhzZz_7TOeLmLPj-eXOn9PElNQzsqLClFugrOM5BS-JC7NPKwP4G7Kjday0MU-EgmVWKOw
Content-Length: 164
Host: localhost:8080

[{"value":"daenerys@goodguys.fr","type":"ALLOW","spfOn":true},{"value":"baelish@badguys.fr","type":"BLOCK","expireAt":1779724341676,"description":"he's a traitor"}]
Example Curl request
$ curl 'http://localhost:8080/domains/Eygdk/wblist' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzU0MSwiZXhwIjoxNzc0NDYxMTQxLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.q9xPzB3QsrPVrQEMKhzZz_7TOeLmLPj-eXOn9PElNQzsqLClFugrOM5BS-JC7NPKwP4G7Kjday0MU-EgmVWKOw' \
    -d '[{"value":"daenerys@goodguys.fr","type":"ALLOW","spfOn":true},{"value":"baelish@badguys.fr","type":"BLOCK","expireAt":1779724341676,"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" : 1774457541715,
  "expireAt" : null,
  "description" : null,
  "spfOn" : true
}, {
  "id" : "By46n",
  "value" : "baelish@badguys.fr",
  "owner" : "alive.net",
  "type" : "BLOCK",
  "createdDate" : 1774457541736,
  "expireAt" : 1779724341676,
  "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

FilterSenderAdd

X

Content Type
  • application/json

Responses
Table 54. HTTP Response Codes
Code Message Datatype

409

An identical rule may already exist

List[FilterSender]

403

You do not have permission to execute this request.

List[FilterSender]

422

Operation cannot be done because of not met conditions.

List[FilterSender]

404

User may not exist

List[FilterSender]

Example HTTP request
POST /users/By46n/wblist HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzUzNywiZXhwIjoxNzc0NDYxMTM3LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.y_bcYA9o-Lo03xWxT6XVoJQGdJbBudPfuF6FfrQlqFP1W8tPKgmjFXAIbmxi8EI5A5LgjyTc2QkzQF5gjInsGQ
Content-Length: 164
Host: localhost:8080

[{"value":"daenerys@goodguys.fr","type":"ALLOW","spfOn":true},{"value":"baelish@badguys.fr","type":"BLOCK","expireAt":1779724337267,"description":"he's a traitor"}]
Example Curl request
$ curl 'http://localhost:8080/users/By46n/wblist' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzUzNywiZXhwIjoxNzc0NDYxMTM3LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.y_bcYA9o-Lo03xWxT6XVoJQGdJbBudPfuF6FfrQlqFP1W8tPKgmjFXAIbmxi8EI5A5LgjyTc2QkzQF5gjInsGQ' \
    -d '[{"value":"daenerys@goodguys.fr","type":"ALLOW","spfOn":true},{"value":"baelish@badguys.fr","type":"BLOCK","expireAt":1779724337267,"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" : 1774457537396,
  "expireAt" : null,
  "description" : null,
  "spfOn" : true
}, {
  "id" : "By46n",
  "value" : "baelish@badguys.fr",
  "owner" : "notyet@iswittercoming.net",
  "type" : "BLOCK",
  "createdDate" : 1774457537423,
  "expireAt" : 1779724337267,
  "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
Table 55. HTTP Response Codes
Code Message Datatype

403

You do not have permission to execute this request.

FilterSender

404

A problem occured. The domain may not exist

FilterSender

Example HTTP request
DELETE /domains/Eygdk/wblist/ByE3n HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzUzOCwiZXhwIjoxNzc0NDYxMTM4LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.tNeuF-HN6oys6g_ugYTJ6WYfeoi8WmlHaWw_ya17qLjwXnfF6WDlRM7Ur814RXqQDVvmfisLj4VyJ4F_EIKfOw
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/domains/Eygdk/wblist/ByE3n' -i -X DELETE \
    -H 'Content-Type: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzUzOCwiZXhwIjoxNzc0NDYxMTM4LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.tNeuF-HN6oys6g_ugYTJ6WYfeoi8WmlHaWw_ya17qLjwXnfF6WDlRM7Ur814RXqQDVvmfisLj4VyJ4F_EIKfOw'
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
Table 56. HTTP Response Codes
Code Message Datatype

403

You do not have permission to execute this request.

FilterSender

404

A problem occured. The user may not exist

FilterSender

Example HTTP request
DELETE /users/By46n/wblist/ByE3n HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzU1MCwiZXhwIjoxNzc0NDYxMTUwLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.1YKbAsYVAqtWsEwncxGEOFJffMuhxEFIfjsP4HtIap86UJGPIih9doPXVGOTQN_Lka_eaOoZAcDIylQQVK_tUw
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/users/By46n/wblist/ByE3n' -i -X DELETE \
    -H 'Content-Type: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzU1MCwiZXhwIjoxNzc0NDYxMTUwLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.1YKbAsYVAqtWsEwncxGEOFJffMuhxEFIfjsP4HtIap86UJGPIih9doPXVGOTQN_Lka_eaOoZAcDIylQQVK_tUw'
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

-

0

pageSize

Maximum number of entities returned, defaults to 40

-

40

sort

Define the sort applied on response. Prefix the field name by '-' to reverse the sort.

-

owner

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
Table 57. HTTP Response Codes
Code Message Datatype

403

You do not have permission to execute this request.

List[FilterSender]

404

Domain may not exist

List[FilterSender]

Example HTTP request
GET /domains/Eygdk/wblist HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzU0MCwiZXhwIjoxNzc0NDYxMTQwLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.Y4gABbbyojisXbyCWq3QpHagvAeWZVP1eisvu2DD4ww9Cq4VJQNALbQ_da-mM4-zo-VjE5q58sfpVO1XDxNOuQ
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/domains/Eygdk/wblist' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzU0MCwiZXhwIjoxNzc0NDYxMTQwLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.Y4gABbbyojisXbyCWq3QpHagvAeWZVP1eisvu2DD4ww9Cq4VJQNALbQ_da-mM4-zo-VjE5q58sfpVO1XDxNOuQ'
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" : 1774457540000,
  "expireAt" : null,
  "description" : null,
  "spfOn" : true
}, {
  "id" : "By46n",
  "value" : "baelish@badguys.fr",
  "owner" : "alive.net",
  "type" : "BLOCK",
  "createdDate" : 1774457540000,
  "expireAt" : null,
  "description" : "he's a traitor",
  "spfOn" : null
}, {
  "id" : "Eygdk",
  "value" : "arya@goodguys.fr",
  "owner" : "alive.net",
  "type" : "ALLOW",
  "createdDate" : 1774457540000,
  "expireAt" : null,
  "description" : null,
  "spfOn" : true
}, {
  "id" : "YyjPn",
  "value" : "deadguys.fr",
  "owner" : "alive.net",
  "type" : "BLOCK",
  "createdDate" : 1774457540000,
  "expireAt" : 1779724340000,
  "description" : null,
  "spfOn" : null
}, {
  "id" : "Vnoey",
  "value" : "joffrey@badguys.fr",
  "owner" : "alive.net",
  "type" : "BLOCK",
  "createdDate" : 1774457540000,
  "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

-

0

pageSize

Maximum number of entities returned, defaults to 40

-

40

sort

Define the sort applied on response. Prefix the field name by '-' to reverse the sort.

-

id

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
Table 58. HTTP Response Codes
Code Message Datatype

403

You do not have permission to execute this request.

List[FilterSender]

404

User may not exist

List[FilterSender]

Example HTTP request
GET /users/By46n/wblist HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzU0OCwiZXhwIjoxNzc0NDYxMTQ4LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.VcnDywcvjxnidFRkvCf-F5mDI76koHfciE_Q3VSa1tWg8SWqQCiE3jb3wkOmC88BVLKX4qQaj-QK7uSa9kUPDw
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/users/By46n/wblist' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzU0OCwiZXhwIjoxNzc0NDYxMTQ4LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.VcnDywcvjxnidFRkvCf-F5mDI76koHfciE_Q3VSa1tWg8SWqQCiE3jb3wkOmC88BVLKX4qQaj-QK7uSa9kUPDw'
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" : 1774457548000,
  "expireAt" : null,
  "description" : null,
  "spfOn" : false
}, {
  "id" : "By46n",
  "value" : "baelish@badguys.fr",
  "owner" : "notyet@iswittercoming.net",
  "type" : "ALLOW",
  "createdDate" : 1774457548000,
  "expireAt" : 1779724348000,
  "description" : null,
  "spfOn" : false
}, {
  "id" : "Eygdk",
  "value" : "arya@goodguys.fr",
  "owner" : "notyet@iswittercoming.net",
  "type" : "ALLOW",
  "createdDate" : 1774457548000,
  "expireAt" : null,
  "description" : null,
  "spfOn" : false
}, {
  "id" : "YyjPn",
  "value" : "deadguys.fr",
  "owner" : "notyet@iswittercoming.net",
  "type" : "BLOCK",
  "createdDate" : 1774457548000,
  "expireAt" : null,
  "description" : null,
  "spfOn" : null
}, {
  "id" : "Vnoey",
  "value" : "joffrey@badguys.fr",
  "owner" : "notyet@iswittercoming.net",
  "type" : "BLOCK",
  "createdDate" : 1774457548000,
  "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

FilterSenderAdd

X

Content Type
  • application/json

Responses
Table 59. HTTP Response Codes
Code Message Datatype

403

You do not have permission to execute this request.

FilterSender

404

Domain may not exist

FilterSender

409

An identical rule may already exists

FilterSender

422

Operation cannot be done because of not met conditions.

FilterSender

Example HTTP request
PUT /domains/Eygdk/wblist/ByE3n HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzU0NywiZXhwIjoxNzc0NDYxMTQ3LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.G9Z7rDdLlZ8yqeqQ6s1OakddDrz7djnW-ZobmMXhouzWTwEOYTMMEf-6-LVpf_vlKcH2-5S0hChLsCW6Yidgmg
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 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzU0NywiZXhwIjoxNzc0NDYxMTQ3LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.G9Z7rDdLlZ8yqeqQ6s1OakddDrz7djnW-ZobmMXhouzWTwEOYTMMEf-6-LVpf_vlKcH2-5S0hChLsCW6Yidgmg' \
    -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" : 1774457547000,
  "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

FilterSenderAdd

X

Content Type
  • application/json

Responses
Table 60. HTTP Response Codes
Code Message Datatype

403

You do not have permission to execute this request.

FilterSender

409

An identical rule may already exists

FilterSender

422

Operation cannot be done because of not met conditions.

FilterSender

404

User may not exist

FilterSender

Example HTTP request
PUT /users/By46n/wblist/ByE3n HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzU0NCwiZXhwIjoxNzc0NDYxMTQ0LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.qenbfE3uosyoxeHcGN0S9MDGXklx0Lv41MGSV2t4W7rAJi2W18W61Hbhn_zW2temIPDqTbfzuPR4Cmn_2JAioQ
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 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzU0NCwiZXhwIjoxNzc0NDYxMTQ0LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.qenbfE3uosyoxeHcGN0S9MDGXklx0Lv41MGSV2t4W7rAJi2W18W61Hbhn_zW2temIPDqTbfzuPR4Cmn_2JAioQ' \
    -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" : 1774457544000,
  "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

FilterSenderAdd

X

Content Type
  • application/json

Responses
Table 61. HTTP Response Codes
Code Message Datatype

403

You do not have permission to execute this request.

List[FilterSender]

404

Domain may not exist

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
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzU0MiwiZXhwIjoxNzc0NDYxMTQyLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.udmCfGqsVVKQli-qHHgNZU6uYROqxuJVw5LSKC5-bAEAxFqmVZL4fUPQomCVBe2p5Rv8g4CVdQInjcrF_lreVQ
Content-Length: 120
Host: localhost:8080

[{"value":"rickon@stark.net","type":"ALLOW","spfOn":true},{"value":"tywin.net","type":"BLOCK","expireAt":1779724342716}]
Example Curl request
$ curl 'http://localhost:8080/domains/Eygdk/wblist' -i -X PUT \
    -H 'Content-Type: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzU0MiwiZXhwIjoxNzc0NDYxMTQyLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.udmCfGqsVVKQli-qHHgNZU6uYROqxuJVw5LSKC5-bAEAxFqmVZL4fUPQomCVBe2p5Rv8g4CVdQInjcrF_lreVQ' \
    -d '[{"value":"rickon@stark.net","type":"ALLOW","spfOn":true},{"value":"tywin.net","type":"BLOCK","expireAt":1779724342716}]'
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" : 1774457542751,
  "expireAt" : null,
  "description" : null,
  "spfOn" : true
}, {
  "id" : "By46n",
  "value" : "tywin.net",
  "owner" : "alive.net",
  "type" : "BLOCK",
  "createdDate" : 1774457542785,
  "expireAt" : 1779724342716,
  "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

FilterSenderAdd

X

Content Type
  • application/json

Responses
Table 62. HTTP Response Codes
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]

404

User may not exist

List[FilterSender]

Example HTTP request
PUT /users/By46n/wblist HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzU0NiwiZXhwIjoxNzc0NDYxMTQ2LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.0jBx5T2-6CvxsKl52eyJhXNnQnGJlFgFuOnCk7ATkdRXQZOPwVjEZPjeb8Ad5ToUZzY1gpUhRG_GNkUdCvE-ag
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 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzU0NiwiZXhwIjoxNzc0NDYxMTQ2LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.0jBx5T2-6CvxsKl52eyJhXNnQnGJlFgFuOnCk7ATkdRXQZOPwVjEZPjeb8Ad5ToUZzY1gpUhRG_GNkUdCvE-ag' \
    -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" : 1774457546092,
  "expireAt" : null,
  "description" : null,
  "spfOn" : null
}, {
  "id" : "By46n",
  "value" : "tywin.net",
  "owner" : "notyet@iswittercoming.net",
  "type" : "BLOCK",
  "createdDate" : 1774457546112,
  "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

FilterUriBlAdd

X

Content Type
  • application/json

Responses
Table 63. HTTP Response Codes
Code Message Datatype

403

You do not have permission to execute this request.

FilterUriBl

404

Domain may not exist

FilterUriBl

409

This item may already exists with same rules

FilterUriBl

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" : 1774457752140
}

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
Table 64. HTTP Response Codes
Code Message Datatype

403

You do not have permission to execute this request.

[String]

400

A problem occured

[String]

404

No uriBl filter found with given id

[String]

Example HTTP request
DELETE /filters/uris/ByE3n HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1Nzc1MywiZXhwIjoxNzc0NDYxMzUzLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.E4jJXvnS_CLXnBTqBh0TwWRf2kyjEXDoVMrYOK-d7BAcvHkbFL_8J8FZKozzFbpncTHunpbCwdOKYDf5TrkzCg
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/filters/uris/ByE3n' -i -X DELETE \
    -H 'Content-Type: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1Nzc1MywiZXhwIjoxNzc0NDYxMzUzLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.E4jJXvnS_CLXnBTqBh0TwWRf2kyjEXDoVMrYOK-d7BAcvHkbFL_8J8FZKozzFbpncTHunpbCwdOKYDf5TrkzCg'
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

-

0

pageSize

Maximum number of groups returned, defaults to 40

-

40

sort

Define the sort applied on response. Prefix the field name by '-' to reverse the sort.

-

action

action

Filter the list by action

-

null

Content Type
  • application/json

  • application/vnd.ms-excel

Responses
Table 65. HTTP Response Codes
Code Message Datatype

403

You do not have permission to execute this request.

List[FilterUriBl]

404

Domain may not exist

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

FilterUriBlAdd

X

Content Type
  • application/json

Responses
Table 66. HTTP Response Codes
Code Message Datatype

403

You do not have permission to execute this request.

FilterUriBl

400

A problem occured

FilterUriBl

404

No uriBl filter found with given id

FilterUriBl

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
Table 67. HTTP Response Codes
Code Message Datatype

403

You do not have permission to execute this request.

EntityHealth

404

Domain does not exist.

EntityHealth

Example HTTP request
POST /domains/Eygdk/health HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzQzOCwiZXhwIjoxNzc0NDYxMDM4LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.nZvfhPGCpve_H3k0fUJUKvrMyENK79HdX3A52g6IA59UhNvKM1IyCVthRhrC13WUcRQbOYyo2V9kmruTedJ9KA
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/domains/Eygdk/health' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzQzOCwiZXhwIjoxNzc0NDYxMDM4LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.nZvfhPGCpve_H3k0fUJUKvrMyENK79HdX3A52g6IA59UhNvKM1IyCVthRhrC13WUcRQbOYyo2V9kmruTedJ9KA'
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" : 1774461039,
  "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
Table 68. HTTP Response Codes
Code Message Datatype

404

Platform does not exist.

EntityHealth

403

You do not have permission to execute this request.

EntityHealth

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
Table 69. HTTP Response Codes
Code Message Datatype

403

You do not have permission to execute this request.

EntityHealth

404

Domain does not exist.

EntityHealth

Example HTTP request
GET /domains/Eygdk/health HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzQzNiwiZXhwIjoxNzc0NDYxMDM2LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.j_Kz3RvP008pcj4n6L4ZxiDvEpCs1UPbDjjMwv3FuaOoeLy_UMY7GR2w1xvw_o11imQhqqreguhq9v-KezUA8A
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/domains/Eygdk/health' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzQzNiwiZXhwIjoxNzc0NDYxMDM2LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.j_Kz3RvP008pcj4n6L4ZxiDvEpCs1UPbDjjMwv3FuaOoeLy_UMY7GR2w1xvw_o11imQhqqreguhq9v-KezUA8A'
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" : 1774461036,
  "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
Table 70. HTTP Response Codes
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
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzYxMiwiZXhwIjoxNzc0NDYxMjEyLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.A4Xv-TcIMaV8qhjc0dnFDr2QnTezkBu_5gA6Cl1WGnEvo-fZ2SiXjxkIzLGNyWm9SWedD-w6PwIg6zjWItnQRA
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/health' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzYxMiwiZXhwIjoxNzc0NDYxMjEyLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.A4Xv-TcIMaV8qhjc0dnFDr2QnTezkBu_5gA6Cl1WGnEvo-fZ2SiXjxkIzLGNyWm9SWedD-w6PwIg6zjWItnQRA'
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" : 1774461211,
    "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" : 1774461211,
    "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
Table 71. HTTP Response Codes
Code Message Datatype

404

Platform does not exist.

EntityHealth

403

You do not have permission to execute this request.

EntityHealth

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

RelayCheckHealthDTO

X

Content Type
  • application/json

Responses
Table 72. HTTP Response Codes
Code Message Datatype

403

You do not have permission to execute this request.

HealthRecord

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

Task

X

Content Type
  • application/json

Responses
Table 73. HTTP Response Codes
Code Message Datatype

401

Authentication failure.

[String]

202

Command is valid and will be executed.

[String]

422

Operation cannot be done because of not met conditions.

[String]

403

Authorisation failure.

[String]

400

Invalid parameters

[String]

Example HTTP request
POST /tasks HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzQ3NiwiZXhwIjoxNzc0NDYxMDc2LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.zaFvG9BzwAeTz9hvu2NPnzh9vZg7Xwh_ETpb0xGrVlht06reizC8jh1WpIZnharNABJSx9JT2E196Ze0SUL8eQ
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 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzQ3NiwiZXhwIjoxNzc0NDYxMDc2LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.zaFvG9BzwAeTz9hvu2NPnzh9vZg7Xwh_ETpb0xGrVlht06reizC8jh1WpIZnharNABJSx9JT2E196Ze0SUL8eQ' \
    -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

-

null

validity

Number of hours the token will be active

-

4

Content Type
  • application/json

Responses
Table 74. HTTP Response Codes
Code Message Datatype

202

Asynchrone request has been taken into account : token is going to be sent soon

AuthToken

400

A problem occured. Possible causes: the account does not have quarantine or retention or archive service.

AuthToken

404

Unknown username

AuthToken

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

NewUser

X

Content Type
  • application/json

Responses
Table 75. HTTP Response Codes
Code Message Datatype

422

Operation cannot be done because of not met conditions.

User

400

A problem occured. Possible causes: the account email does not match email format or domain not found

User

409

A user may already exists with the given name

User

201

Created

User

Example HTTP request
POST /users HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzcxNSwiZXhwIjoxNzc0NDYxMzE1LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.gCvIPdQuxtjPdggI9GE8QwK7WZk2lb7A6PES34uuo4DlAwMbEJhApoRX5YIl6Kry_m0sWU0YeOY4KrgfWXJx8g
Content-Length: 199
Host: localhost:8080

{"email":"tywin@lannister.net","firstname":"Tywin","lastname":"Lannister","status":"ENABLED","language":"EN","password":"HearMeRoar!","domainId":"ByE3n","platformId":"ByE3n","sendNotification":false}
Example Curl request
$ curl 'http://localhost:8080/users' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzcxNSwiZXhwIjoxNzc0NDYxMzE1LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.gCvIPdQuxtjPdggI9GE8QwK7WZk2lb7A6PES34uuo4DlAwMbEJhApoRX5YIl6Kry_m0sWU0YeOY4KrgfWXJx8g' \
    -d '{"email":"tywin@lannister.net","firstname":"Tywin","lastname":"Lannister","status":"ENABLED","language":"EN","password":"HearMeRoar!","domainId":"ByE3n","platformId":"ByE3n","sendNotification":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/users/By46n
Content-Type: application/json
Content-Length: 2083

{
  "id" : "By46n",
  "email" : "tywin@lannister.net",
  "firstname" : "Tywin",
  "lastname" : "Lannister",
  "status" : "ENABLED",
  "language" : "EN",
  "creationDate" : 1774457716030,
  "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,
  "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

Responses
Table 76. HTTP Response Codes
Code Message Datatype

200

OK

Option

Example HTTP request
DELETE /users/By46n/options/USER_OPTION_EXAMPLE HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzcxOSwiZXhwIjoxNzc0NDYxMzE5LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.IISYep_Z6uNNroRalF0z81bAeIV3zehhpJwjSvCf0zsmy51NNMV7JQX7ifP66SzanJsOM7f42TPQK0xg8TCesA
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 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzcxOSwiZXhwIjoxNzc0NDYxMzE5LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.IISYep_Z6uNNroRalF0z81bAeIV3zehhpJwjSvCf0zsmy51NNMV7JQX7ifP66SzanJsOM7f42TPQK0xg8TCesA'
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
Table 77. HTTP Response Codes
Code Message Datatype

404

User or domain not found with given id

User

Example HTTP request
DELETE /users/By46n HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzcyNCwiZXhwIjoxNzc0NDYxMzI0LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ._ZN7mwstJq57rEvEnsB5SyYKxeVecvmflq6EGfpSYXHOBAWJwdPjPx5-bKf9FLxt_1hYjqQ98UYQqZgdg3f18w
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/users/By46n' -i -X DELETE \
    -H 'Content-Type: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzcyNCwiZXhwIjoxNzc0NDYxMzI0LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ._ZN7mwstJq57rEvEnsB5SyYKxeVecvmflq6EGfpSYXHOBAWJwdPjPx5-bKf9FLxt_1hYjqQ98UYQqZgdg3f18w'
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

Responses
Table 78. HTTP Response Codes
Code Message Datatype

404

User not found with given id

User

Example HTTP request
GET /users/By46n HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzcyMSwiZXhwIjoxNzc0NDYxMzIxLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.mdxsgoB0qazUN2vPhbL6yCTaBCGU2y_4PVBzODS8LGAjeiBMf43Z5xTexhVRrEddWODn1nGVPudl1PD8FoVC_A
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/users/By46n' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzcyMSwiZXhwIjoxNzc0NDYxMzIxLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.mdxsgoB0qazUN2vPhbL6yCTaBCGU2y_4PVBzODS8LGAjeiBMf43Z5xTexhVRrEddWODn1nGVPudl1PD8FoVC_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: 1342

{
  "id" : "By46n",
  "email" : "sansa@stark.net",
  "firstname" : "Sansa",
  "lastname" : "Stark",
  "status" : "ENABLED",
  "language" : "EN",
  "creationDate" : 1774457720000,
  "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" : true,
  "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

-

0

pageSize

Maximum number of users returned, defaults to 40

-

40

sort

Define the sort applied on response. Prefix the field name by '-' to reverse the sort.

-

email

email

Filter by email

-

null

platformName

Filter by platform name

-

null

Content Type
  • application/json

  • application/vnd.ms-excel

Responses
Table 79. HTTP Response Codes
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
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzcyNSwiZXhwIjoxNzc0NDYxMzI1LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.fHDajQIelmQd5pav4F5X-y1TnvgFauoRPZfH6rmV--FROBpj2gtTrPBhG38IIZ95TS1E3dRnT8bI9a_Anzgy1A
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 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzcyNSwiZXhwIjoxNzc0NDYxMzI1LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.fHDajQIelmQd5pav4F5X-y1TnvgFauoRPZfH6rmV--FROBpj2gtTrPBhG38IIZ95TS1E3dRnT8bI9a_Anzgy1A'
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: 6114

[ {
  "id" : "ByE3n",
  "email" : "cersei@lannister.net",
  "firstname" : "Cersei",
  "lastname" : "Lannister",
  "status" : "ENABLED",
  "language" : "FR",
  "creationDate" : 1774457725000,
  "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,
  "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" : 1774457725000,
  "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,
  "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" : 1774457725000,
  "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,
  "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

Content Type
  • application/json

Responses
Table 80. HTTP Response Codes
Code Message Datatype

200

OK

List[Option]

Example HTTP request
GET /users/By46n/options HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzcyMiwiZXhwIjoxNzc0NDYxMzIyLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.xOzja54JQdSRXQfvEHxNlK8Df7gHlbKNiDGqVQ2MFFgnGNzOVVEnnmKcIgdj3FxbbYP3N5J9x5gnj0fR5orFGg
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/users/By46n/options' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzcyMiwiZXhwIjoxNzc0NDYxMzIyLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.xOzja54JQdSRXQfvEHxNlK8Df7gHlbKNiDGqVQ2MFFgnGNzOVVEnnmKcIgdj3FxbbYP3N5J9x5gnj0fR5orFGg'
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

-

0

pageSize

Maximum number of users returned, defaults to 40

-

40

sort

Define the sort applied on response. Prefix the field name by '-' to reverse the sort.

-

email

email

Filter by email

-

null

platformName

Filter by platform name

-

null

Return Type

array[User]

Content Type
  • application/json

Responses
Table 81. HTTP Response Codes
Code Message Datatype

200

OK

List[User]

Example HTTP request
GET /users?name=ByE3n HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzcxNywiZXhwIjoxNzc0NDYxMzE3LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.AwhvNoe3QK8djkp_sixKi4L-m4dF2UYDtwGOtw5aaIxDczHTIxkr8uEvHlmxxYMnBQx5juTUpT5UR-Uljup3Mg
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/users?name=ByE3n' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzcxNywiZXhwIjoxNzc0NDYxMzE3LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.AwhvNoe3QK8djkp_sixKi4L-m4dF2UYDtwGOtw5aaIxDczHTIxkr8uEvHlmxxYMnBQx5juTUpT5UR-Uljup3Mg'
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: 4638

[ {
  "id" : "ByE3n",
  "email" : "cersei@lannister.net",
  "firstname" : "Cersei",
  "lastname" : "Lannister",
  "status" : "ENABLED",
  "language" : "FR",
  "creationDate" : 1774457716000,
  "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,
  "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" : 1774457717000,
  "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" : true,
  "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" : 1774457717000,
  "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" : true,
  "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

OptionAdd

X

Content Type
  • application/json

Responses
Table 82. HTTP Response Codes
Code Message Datatype

200

OK

Option

Example HTTP request
POST /users/By46n/options HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzcyMywiZXhwIjoxNzc0NDYxMzIzLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.IVz-hGcFD9fNoOzIiQu09jjJupZviSP3LED_XMspdf1FZFs6pzPif6hOJxHhq-W9t44tB1S-1w0yJ2Vbzdf-RQ
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 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzcyMywiZXhwIjoxNzc0NDYxMzIzLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.IVz-hGcFD9fNoOzIiQu09jjJupZviSP3LED_XMspdf1FZFs6pzPif6hOJxHhq-W9t44tB1S-1w0yJ2Vbzdf-RQ' \
    -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

UpdateUser

X

Content Type
  • application/json

Responses
Table 83. HTTP Response Codes
Code Message Datatype

404

User not found with given id

[String]

400

A problem has occured. Possible cause: the account email does not match email format

[String]

Example HTTP request
PATCH /users/By46n HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzcxOCwiZXhwIjoxNzc0NDYxMzE4LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.iFAotHqvDZUhrUeZcND6lrAYng5OlldkDsCfnNzgznEsHlbBjqyhO4FNJr5vlZCWZtnCI6KE3832LMurhePorg
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 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzcxOCwiZXhwIjoxNzc0NDYxMzE4LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.iFAotHqvDZUhrUeZcND6lrAYng5OlldkDsCfnNzgznEsHlbBjqyhO4FNJr5vlZCWZtnCI6KE3832LMurhePorg' \
    -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

[string]

X

Content Type
  • application/json

Responses
Table 84. HTTP Response Codes
Code Message Datatype

403

You do not have permission to execute this request.

EmailAlias

404

A problem occured. The domain or the user may not exist

EmailAlias

Example HTTP request
POST /domains/Eygdk/groups/ByE3n/addresses HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzUxNywiZXhwIjoxNzc0NDYxMTE3LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.0mLIxokpX6R4U9C6QuTo7gI8RYklEhp34PChu0mNsGyigr02tNtF6AKsLY9qKUjCi5qh1gIf4iTDi40I96FrbA
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 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzUxNywiZXhwIjoxNzc0NDYxMTE3LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.0mLIxokpX6R4U9C6QuTo7gI8RYklEhp34PChu0mNsGyigr02tNtF6AKsLY9qKUjCi5qh1gIf4iTDi40I96FrbA' \
    -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

NewEmailAlias

NewEmailAlias

X

Content Type
  • application/json

Responses
Table 85. HTTP Response Codes
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

EmailAlias

403

You do not have permission to execute this request.

EmailAlias

422

Operation cannot be done because of not met conditions.

EmailAlias

409

A email alias may already exists with the given name

EmailAlias

404

A problem occured. The domain may not exist

EmailAlias

201

Created

EmailAlias

Example HTTP request
POST /domains/Eygdk/groups HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzUxMywiZXhwIjoxNzc0NDYxMTEzLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.h7eQXevarJVQkWabmTF1XX08UewHwPUu0kGs5noWW3-WI9CiaGEjV8ESq-pmhnniJGcoSzkFapwezvxnYu3TaA
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 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzUxMywiZXhwIjoxNzc0NDYxMTEzLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.h7eQXevarJVQkWabmTF1XX08UewHwPUu0kGs5noWW3-WI9CiaGEjV8ESq-pmhnniJGcoSzkFapwezvxnYu3TaA' \
    -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
Table 86. HTTP Response Codes
Code Message Datatype

403

You do not have permission to execute this request.

EmailAlias

404

A problem occured. The domain and/or the alias may not exist

EmailAlias

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

EmailAlias

Example HTTP request
DELETE /groups/ByE3n HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzUxMCwiZXhwIjoxNzc0NDYxMTEwLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ._VL37vdOW0NtwFfUxOJAls0fxMin8wKoW3EY9E4060fhGrJkfDER5CtwaFkw2B6FqZmJJ_D1YLF-2JzwytXFfg
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/groups/ByE3n' -i -X DELETE \
    -H 'Content-Type: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzUxMCwiZXhwIjoxNzc0NDYxMTEwLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ._VL37vdOW0NtwFfUxOJAls0fxMin8wKoW3EY9E4060fhGrJkfDER5CtwaFkw2B6FqZmJJ_D1YLF-2JzwytXFfg'
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
Table 87. HTTP Response Codes
Code Message Datatype

403

You do not have permission to execute this request.

EmailAlias

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

EmailAlias

404

A problem occured. The domain and/or the user and/or the alias may not exist ; the domain may not contain the user

EmailAlias

Example HTTP request
DELETE /domains/Eygdk/groups/ByE3n/addresses/ByE3n HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzUxNSwiZXhwIjoxNzc0NDYxMTE1LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.5Bes0gX1EKkyzIgW30Nf2YznrvS8psOIpy85ho8AfVCfqxW7gruxiBsmgmI8JpQRTqybjLU5nK-IKWZC3cN4Lg
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 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzUxNSwiZXhwIjoxNzc0NDYxMTE1LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.5Bes0gX1EKkyzIgW30Nf2YznrvS8psOIpy85ho8AfVCfqxW7gruxiBsmgmI8JpQRTqybjLU5nK-IKWZC3cN4Lg'
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
Table 88. HTTP Response Codes
Code Message Datatype

403

You do not have permission to execute this request.

EmailAlias

404

A problem occured. The domain or the user may not exist

EmailAlias

Example HTTP request
GET /domains/Eygdk/groups/ByE3n HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzUxMSwiZXhwIjoxNzc0NDYxMTExLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.qzszTJzX4yAG4of4F2rYQ7qX0g9JmkRL5PoTXogct6Oe0ul4-Kj205hQ35IEvr3SxkcwfsjhEWJM4X7_FSsurw
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/domains/Eygdk/groups/ByE3n' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzUxMSwiZXhwIjoxNzc0NDYxMTExLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.qzszTJzX4yAG4of4F2rYQ7qX0g9JmkRL5PoTXogct6Oe0ul4-Kj205hQ35IEvr3SxkcwfsjhEWJM4X7_FSsurw'
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.

-

email

offset

Index of the first group to return, defaults to 1

-

0

pageSize

Maximum number of groups returned, defaults to 40

-

40

email

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
Table 89. HTTP Response Codes
Code Message Datatype

403

You do not have permission to execute this request.

List[EmailAlias]

404

A problem occured. The domain may not exist

List[EmailAlias]

Example HTTP request
GET /domains/Eygdk/groups?address=ramsay@got.net HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzUxNCwiZXhwIjoxNzc0NDYxMTE0LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.eFPNy__mFW3A0meAfwTZKPOpQE1PyRdy9yKCpNkemXUyHZi1mOQXcqgibfmwgn16hND5A7sNPx4ulhRJFa2h0g
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 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzUxNCwiZXhwIjoxNzc0NDYxMTE0LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.eFPNy__mFW3A0meAfwTZKPOpQE1PyRdy9yKCpNkemXUyHZi1mOQXcqgibfmwgn16hND5A7sNPx4ulhRJFa2h0g'
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

NewEmailAlias

NewEmailAlias

X

Content Type
  • application/json

Responses
Table 90. HTTP Response Codes
Code Message Datatype

403

You do not have permission to execute this request.

EmailAlias

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

EmailAlias

404

A problem occured. The domain and/or the email alias may not exist

EmailAlias

Example HTTP request
PATCH /domains/Eygdk/groups/ByE3n HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzUxMiwiZXhwIjoxNzc0NDYxMTEyLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.32bVZdWjtleLpiwZAQlWS1mux5qoDKUTq893YDAWdMiUfoxO8jgiQdxWNXeI3vyTAsW_lHRrhBgvNoRhx3UZAQ
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 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzUxMiwiZXhwIjoxNzc0NDYxMTEyLCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.32bVZdWjtleLpiwZAQlWS1mux5qoDKUTq893YDAWdMiUfoxO8jgiQdxWNXeI3vyTAsW_lHRrhBgvNoRhx3UZAQ' \
    -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
Table 91. HTTP Response Codes
Code Message Datatype

404

Unknown user

Sign

400

A problem occured. Possible causes: the account does not have quarantine or retention or archive service.

Sign

204

No Content

Sign

Example HTTP request
DELETE /users/By46n/sign HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzQ5NSwiZXhwIjoxNzc0NDYxMDk1LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.W9u3KaVZb6bcAn4Jo0-2diFGplXkPoWaMg7CVigKR_XfkTpOYrUaOpt97--s_IwbeBIk1rarHOC4Zv6V9LkmJg
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/users/By46n/sign' -i -X DELETE \
    -H 'Content-Type: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzQ5NSwiZXhwIjoxNzc0NDYxMDk1LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.W9u3KaVZb6bcAn4Jo0-2diFGplXkPoWaMg7CVigKR_XfkTpOYrUaOpt97--s_IwbeBIk1rarHOC4Zv6V9LkmJg'
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
Table 92. HTTP Response Codes
Code Message Datatype

404

Unknown user

Sign

400

A problem occured. Possible causes: the account does not have quarantine or retention or archive service.

Sign

422

Operation cannot be done because of not met conditions.

Sign

200

OK

Sign

Example HTTP request
GET /users/By46n/sign HTTP/1.1
Content-Type: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzQ5NCwiZXhwIjoxNzc0NDYxMDk0LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.GWnq-6bgrXZ3AMVcOfADPEqmW8DVCzHrYrQuynfSwDUJtUk6VqLa0jvoyUwhFyFYTcWg4gg9xtjj9ufoF14-vA
Host: localhost:8080
Example Curl request
$ curl 'http://localhost:8080/users/By46n/sign' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ2ZXJzaW9uIjozLCJzdWIiOiJhZG1pbkB0ZXN0Lm5ldCIsImlhdCI6MTc3NDQ1NzQ5NCwiZXhwIjoxNzc0NDYxMDk0LCJhdXRob3JpdGllcyI6WyJTWVNBRE1JTiJdfQ.GWnq-6bgrXZ3AMVcOfADPEqmW8DVCzHrYrQuynfSwDUJtUk6VqLa0jvoyUwhFyFYTcWg4gg9xtjj9ufoF14-vA'
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

Sign

X

Content Type
  • application/json

Responses
Table 93. HTTP Response Codes
Code Message Datatype

404

Unknown user

Sign

400

A problem occured. Possible causes: the account does not have quarantine or retention or archive service.

Sign

200

OK

Sign

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

email

String

Email address. Used for password recovery

enabled

Boolean

Whether the account is enabled or not

language

[String]

Language of the account

Enum: FR, EN, DE, ES, DA, NB, FR, EN, DE, ES, fr (French), en (English), de (German), es (Spanish), nb (Norwegian), da (Danish),

totp

Boolean

Account's defined multi-factor authentication.

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.

email

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

[String]

Language of the account. Required only in case of new account creation.

Enum: FR, EN, DE, ES, DA, NB, FR, EN, DE, ES, 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

email

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

[String]

Language of the account

Enum: FR, EN, DE, ES, DA, NB, FR, EN, DE, ES, fr (French), en (English), de (German), es (Spanish), nb (Norwegian), da (Danish),

6.6. Alias

Field Name Required Nullable Type Description Format

id

Integer

Idenfier of the alias

int32

name

X

String

Name of the alias

6.7. ArchiveProps

Archive parameters of the policy

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.8. 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.9. AuthEntraSettings

Field Name Required Nullable Type Description Format

tenantId

String

6.10. AuthImapSettings

Field Name Required Nullable Type Description Format

host

String

port

Integer

int32

use_ssl

Boolean

cert_pem

String

6.11. AuthLdapSettings

Field Name Required Nullable Type Description Format

host

String

port

Integer

int32

bind_user

String

bind_password

String

use_ssl

Boolean

base_dn

String

mail_attribute

String

cert_pem

String

username_format

String

6.12. AuthOidcSettings

Field Name Required Nullable Type Description Format

issuerUri

String

clientId

String

clientSecret

String

nameAttr

String

scope

String

6.13. AuthSettings

Configuration required for the authentication to the provider

Field Name Required Nullable Type Description Format

host

String

port

Integer

int32

bind_user

String

bind_password

String

use_ssl

Boolean

base_dn

String

mail_attribute

String

cert_pem

String

username_format

String

issuerUri

String

clientId

String

clientSecret

String

nameAttr

String

scope

String

tenantId

String

6.14. 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.15. Authority

List of authorities granted to the user

Field Name Required Nullable Type Description Format

objectType

String

objectId

Integer

int32

objectName

String

permissions

[List] of [string]

Enum:

securedObjectName

String

securedObjectClass

String

6.16. CustomerDTO

Customer to which the domain belongs

Field Name Required Nullable Type Description Format

id

Integer

int32

brokerId

Integer

int32

name

String

description

String

externalId

String

createdAt

Date

date-time

6.17. DiagnosticEntryDTO

Field Name Required Nullable Type Description Format

id

Integer

int32

name

String

type

String

health

Object

6.18. DkimDTO

Field Name Required Nullable Type Description Format

privateKey

String

publicKey

String

selector

String

6.19. 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

[String]

Activation status of the domain

Enum: ENABLED, DISABLED, DELETED, PENDING, ENABLED, DISABLED, PENDING, DELETED,

wblistPriority

[String]

Defines which filtering rules take priority in the case of conflict between domain's and mailbox's filtering rules.

Enum: DOMAIN, USER, DOMAIN, USER,

defaultLanguage

X

[String]

Default Language of the accounts in this domain

Enum: FR, EN, DE, ES, DA, NB, FR, EN, DE, ES, 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

externalId

String

External reference of your choice (i.e. reference of customer in your billing system)

policy

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

CustomerDTO

platforms

List of PlatformDTO

List of smtp relays

6.20. DomainAdd

domain

Field Name Required Nullable Type Description Format

name

X

String

Name of the domain

description

String

Description of the domain

status

X

[String]

Activation status of the domain

Enum: ENABLED, DISABLED, DELETED, PENDING, ENABLED, DISABLED,

wblistPriority

[String]

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, 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

[String]

Default Language of the accounts in this domain

Enum: FR, EN, DE, ES, DA, NB, FR, EN, DE, ES, 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

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

6.21. DomainUpdate

domain

Field Name Required Nullable Type Description Format

name

String

Name of the domain

description

String

Description of the domain

status

[String]

Activation status of the domain

Enum: ENABLED, DISABLED, DELETED, PENDING, ENABLED, DISABLED, PENDING,

wblistPriority

[String]

Defines which filtering rules take priority in the case of conflict between domain's and mailbox's filtering rules.

Enum: DOMAIN, USER, DOMAIN, USER,

quarantine

Boolean

Activation status of quarantine service

retention

Boolean

Activation status of retention service

archive

Boolean

Activation status of archiving service

defaultLanguage

[String]

Default Language of the accounts in this domain

Enum: FR, EN, DE, ES, DA, NB, FR, EN, DE, ES, 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

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

platforms

List of PlatformDTO

The list of platforms which contain settings for SMTP, authentication, remediation API

6.22. EmailAlias

Field Name Required Nullable Type Description Format

id

Integer

Idenfier of the alias

int32

email

X

String

Address of the alias

recipients

List of EmailAliasRecipient

The email addresses targeted by the alias.

6.23. EmailAliasRecipient

The email addresses targeted by the alias.

Field Name Required Nullable Type Description Format

id

Integer

Idenfier of the alias

int32

email

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

[String]

Type of email

Enum: USER, EXTERNAL_ADDRESS, ALIAS, USER, ALIAS, EXTERNAL_ADDRESS,

6.24. EntityHealth

Field Name Required Nullable Type Description Format

performedAt

X

Date

Timestamp of the last check

date-time

report

X

HealthRecord

6.25. FilterAttachment

Field Name Required Nullable Type Description Format

id

Integer

Idenfier

int32

action

X

[String]

Action of the filter

Enum: deny, allow,

checkType

X

[String]

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.26. 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

[String]

Action applied if rule match

Enum: ALLOW, BLOCK, PROTECTED, 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.27. 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

[String]

Action applied if rule match

Enum: ALLOW, BLOCK, PROTECTED, 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.28. 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

[String]

Action applied if rule match

Enum: ALLOW, BLOCK, PROTECTED, 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.29. FilterUriBl

Field Name Required Nullable Type Description Format

id

Integer

Idenfier

int32

action

X

[String]

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.30. FilterUriBlAdd

uriBl filter

Field Name Required Nullable Type Description Format

action

X

[String]

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.31. HealthRecord

Details of the diagnostic

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.32. HealthResult

List all tests performed on the entity

Field Name Required Nullable Type Description Format

type

String

ref

Integer

int32

result

[String]

Enum: OK, ERROR, ERROR_DKIM_MISSING_ENTRY, ERROR_DKIM_INVALID_COUPLE, ERROR_MX_MISSING_ENTRY, ERROR_MX_INVALID_ENTRY,

output

List of [string]

6.33. 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.34. ImapMessage

Field Name Required Nullable Type Description Format

List of headers of the message

Map of [object]

List of email attachments

ImapMessageAttachmentList

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.35. 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.36. 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.37. ImapMessageContent

Field Name Required Nullable Type Description Format

List of headers of the message

Map of [object]

List of email attachments

ImapMessageAttachmentList

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.38. NewEmailAlias

group

Field Name Required Nullable Type Description Format

email

X

String

Address of the alias

recipients

List of [string]

The email addresses targeted by the alias.

6.39. NewUser

user

Field Name Required Nullable Type Description Format

email

X

String

Username of the accoount.

firstname

String

Firstname of the user

lastname

String

Lastname of the user

status

X

[String]

Activation status of the account

Enum: ENABLED, DISABLED, PENDING, ENABLED, DISABLED,

language

[String]

Language of the account

Enum: FR, EN, DE, ES, DA, NB, FR, EN, DE, ES, 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

Integer

Domain's identifier of the account

int32

policyId

Integer

Policy's identifier of the account.

int32

platformId

Integer

Platform's identifier of the account. Take the domain's platform if not defined.

int32

authId

Integer

Authentication provider's identifier of the account. Take the domain's default one if not defined.

int32

senderVerifyOn

Boolean

Activate the sender verify for the user. True by default

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.

6.40. 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

OptionDef

6.41. OptionAdd

Field Name Required Nullable Type Description Format

name

X

String

Name of the option

value

X

String

Value of the option

6.42. OptionDef

Option datas

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

[String]

Datatype for value property

Enum: STRING, TEXT, COLOR, EMAIL, BOOL, URL, LIST, DOC, TIMEZONE, HOST, CREDENTIALS, PASSWORD, BOOL, STRING, EMAIL, URL, LIST, COLOR, DOC, TEXT,

values

List of [string]

List of values allowed for the option

description

String

6.43. OutgoingProvider

The list of outgoing provider to which the domain belongs

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.44. PermissionDTO

Field Name Required Nullable Type Description Format

name

String

editable

Boolean

6.45. 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.46. 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.47. PlatformDTO

SMTP relay data

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

[String]

Protocol used to deliever message to the main smtp server.

Enum: SMTP, SMTPS_ENCRYPT, SMTPS_MAY, 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

[String]

Protocol used to deliever message to the secondary smtp server.

Enum: SMTP, SMTPS_ENCRYPT, SMTPS_MAY, SMTP, SMTPS_ENCRYPT, SMTPS_MAY,

fallbackTransportPort

Integer

Port of the secondary smtp server.

int32

apiType

X

[String]

Type of API for remediation.

Enum: IMAP, EXCHANGE, O365,

apiData

RemediationApiSettings

authType

[String]

Type of authentication

Enum: local, imap, ldap, oidc, entra,

authData

AuthSettings

default

Boolean

Default platform is used for relay messages when user is not created.

6.48. 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

RelayProps

quarantineProps

QuarantineProps

retentionProps

RetentionProps

archiveProps

ArchiveProps

outgoing

Boolean

Activation status of outgoing service

6.49. QuarantineProps

Quarantaine parameters of the policy

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.50. 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

AuthSettings

apiType

X

String

Type of mail server in context of remediation.

apiData

RemediationApiSettings

6.51. RelayProps

Relay parameters of the policy

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.52. RemediationApiSettings

Configuration required for the API access to the platform.

Field Name Required Nullable Type Description Format

host

String

login

String

password

String

testAccount

String

port

Integer

int32

useSsl

Boolean

clientId

String

tenantId

String

clientSecret

String

6.53. RemediationEwsApiSettings

Field Name Required Nullable Type Description Format

host

String

login

String

password

String

testAccount

String

6.54. RemediationGraphApiSettings

Field Name Required Nullable Type Description Format

clientId

String

tenantId

String

clientSecret

String

6.55. RemediationImapApiSettings

Field Name Required Nullable Type Description Format

host

String

port

Integer

int32

login

String

password

String

useSsl

Boolean

6.56. RetentionProps

Retention parameters of the policy

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.57. Sign

Field Name Required Nullable Type Description Format

sign

String

The user signature in the html format and encoded in Base64

6.58. 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.59. 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.

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.60. Task

Field Name Required Nullable Type Description Format

command

X

[String]

ID of the command

Enum: send_welcome_mail, send_token_mail, send_password_reset_mail, send_spamfight_spam_mail, send_spamfight_clean_mail, remediate_message, send_token_mail, send_welcome_mail,

params

X

Map of [object]

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"}```

6.61. UpdateUser

user

Field Name Required Nullable Type Description Format

email

X

String

Username of the accoount.

firstname

String

Firstname of the user

lastname

String

Lastname of the user

status

X

[String]

Activation status of the account

Enum: ENABLED, DISABLED, PENDING, ENABLED, DISABLED,

language

[String]

Language of the account

Enum: FR, EN, DE, ES, DA, NB, FR, EN, DE, ES, 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

Integer

Domain's identifier of the account

int32

policyId

Integer

Policy's identifier of the account.

int32

platformId

Integer

Platform's identifier of the account. Take the domain's platform if not defined.

int32

authId

Integer

Authentication provider's identifier of the account. Take the domain's default one if not defined.

int32

senderVerifyOn

Boolean

Activate the sender verify for the user. True by default

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

[String]

Disable account's multi-factor authentication.

Enum: NONE, TOTP, NONE,

6.62. UploadFileRequest

Field Name Required Nullable Type Description Format

file

X

File

file

binary

6.63. User

Field Name Required Nullable Type Description Format

id

Integer

Idenfier of the user

int32

email

X

String

Username of the accoount.

firstname

String

Firstname of the user

lastname

String

Lastname of the user

status

X

[String]

Activation status of the account

Enum: ENABLED, DISABLED, PENDING, ENABLED, DISABLED,

language

X

[String]

Language of the account

Enum: FR, EN, DE, ES, DA, NB, FR, EN, DE, ES, 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

Policy

senderVerifyOn

Boolean

Activate the sender verify for the user. True by default

domainPolicyId

Integer

Default policy id of the domain

int32

domainStatus

[String]

The status of the domain

Enum: ENABLED, DISABLED, DELETED, PENDING,

domainPlatformId

Integer

Default platform id of the domain

int32

platform

PlatformDTO

mfaType

[String]

Account's defined multi-factor authentication.

Enum: NONE, TOTP, NONE, TOTP,

lastConnectionDate

Date

Date of last connection to application.

date-time