Create Distribution List
The Easylife 365 Mail API supports the provisioning of Distribution Lists. Below is a guide on how to use the API to manage distribution lists from creation to deletion.
Create a new distribution list with the specified properties.
HTTP Request
POST https://api.easylife365.cloud/mail/v1/groups/lists
Content-Type: application/json
Authorization: Bearer <token>
HTTP Request Headers
| Header | Value | 
|---|---|
| Authorization | Bearer token. Required | 
| Content-Type | application/json | 
Request Body
| Property | Type | Description | 
|---|---|---|
name | string | Unique name of the distribution list. Required | 
templateId | string | Template identifier for predefined settings. Required | 
displayName | string | Display name for the distribution list. If not supplied, the system will use the email address. Optional | 
description | string | Description of the distribution list. Optional | 
metadata | object | Custom key-value pairs for additional metadata. Optional | 
owners | array<string> | List of owner UUIDs for the distribution list. Optional | 
members | array<string> | List of member UUIDs in the distribution list. Optional | 
allowOutsideSenders | boolean | If true, allows external users to send emails to the list. Optional | 
domain | string | Domain for the distribution list. If not supplied, the default tenant domain is used. Optional | 
hideFromGAL | boolean | If true, hides the distribution list from the Global Address List (GAL). Optional | 
reason | string | Reason for creating the distribution list. Optional | 
Expanded Object Type Definitions
metadata (Object)
Stores additional information about the distribution list in a key-value format.
| Property | Type | Description & Example | 
|---|---|---|
| Custom Key | string | Any key-value pair providing extra details. Example: { "department": "HR", "createdBy": "Admin" } | 
Example Usage
{
  "metadata": {
    "el-text-388": "Used for internal communications",
    "department": "Finance",
    "createdBy": "Admin"
  }
}
Response
Upon successful creation, the API responds with the following payload:
{
    "requestId": "72d2f4b8-76fe-4140-9460-3c7ef9091cb5",
    "tenantId": "1840b34e-6fe7-4a56-9ad3-0b7b58c49dc7",
    "approvalRequired": false
}
Example: Creating a Distribution List
POST https://api.easylife365.cloud/mail/v1/groups/lists
Content-Type: application/json
Authorization: Bearer <token>
{
  "name": "marketing-team",
  "displayName": "Marketing Team",
  "description": "Distribution list for the marketing team.",
  "templateId": "2fd0dba8-d2fe-4b51-866b-622d7fa3c22b",
  "owners": [
    "49cf935a-284f-4c84-8df7-a5b11f1be527"
  ],
  "members": [
    "6a95c23b-cbb3-4f06-9b05-5e96ac65c78c"
  ],
  "allowOutsideSenders": false,
  "domain": "company.com",
  "hideFromGAL": true
}