Create new mailing list
const url = 'https://example.com/api/v1/domains/1/mlists';const options = { method: 'POST', headers: { cookie: 'grommunioAuthJwt=<grommunioAuthJwt>', 'Content-Type': 'application/json' }, body: '{"listname":"example","listType":0,"listPrivilege":0,"associations":["example"],"specifieds":["example"],"displayName":"example","hidden":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/domains/1/mlists \ --header 'Content-Type: application/json' \ --cookie grommunioAuthJwt=<grommunioAuthJwt> \ --data '{ "listname": "example", "listType": 0, "listPrivilege": 0, "associations": [ "example" ], "specifieds": [ "example" ], "displayName": "example", "hidden": 1 }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”ID of the domain
Header Parameters
Section titled “Header Parameters”CSRF Token
Request Body
Section titled “Request Body”object
Name or e-mail address of the list
Type of mailing list (0=Normal, 2=Domain)
Sender privilege of list (0=All, 1=Internal, 2=Domain, 3=Specific, 4=Outgoing)
Recipients, only available if listType=0
Senders, only available if listPrivilege=3
Display name property of the associated user object
Attributehidde_gromox property of the associated user object
Responses
Section titled “Responses”Mailing list created
object
Unique ID of the object
Name or e-mail address of the list
Type of mailing list (0=Normal, 2=Domain)
Sender privilege of list (0=All, 1=Internal, 2=Domain, 3=Specific, 4=Outgoing)
Recipients, only available if listType=0
Senders, only available if listPrivilege=3
Display name property of the associated user object
Attributehidde_gromox property of the associated user object
ID of the associated user
Example
{ "listType": 0, "listPrivilege": 0}Validation of input parameters failed
object
List of errors encountered during validation
Examplegenerated
{ "message": "example", "errors": [ "example" ]}The requested resource could not be found
object
Examplegenerated
{ "message": "example"}An error occurred while processing the request
object
String representation of the exception
Examplegenerated
{ "message": "example"}The database query failed
object
Description of the error
Examplegenerated
{ "message": "example"}