Skip to main content

Group Service

The Group Service allows you to send emails to predefined recipient groups, simplifying the management of large recipient lists. This service is particularly useful for organizations that need to send bulk emails to specific groups of users. Also it is the best way to implement newsletters.

Key Features

  • Group Management: Create, update, and delete groups of recipients.
  • Email Sending: Send emails to all members of a group with a single API call.
  • Personalization: Customize emails for each group member using placeholders.

Getting Started

  1. Register for an account on Sendlix.
  2. Add a domain to your account.
  3. Verify your domain ownership.
  4. Get your API key from the dashboard.
  5. Create a group at the Dashboard.
  6. Install the required client library for your programming language.

Install cURL on your system. You can find installation instructions for your operating system here.

Group Functions

Add Email to Group

Add email addresses to an existing group with optional personalization substitutions.

curl -X POST https://api.sendlix.com/v1/group/{groupId} \
-H "Content-Type: application/json" \
-H "X-API-KEY: YOUR_API_KEY" \
-d '{
"emails": [
{
"email": "recipient@example.com",
"name": "Recipient Name"
}
],
"substitutions": {
"{{name}}": "John Doe",
"{{age}}": "30"
}
}'

Replace {groupId} with the ID of your group. The substitutions will be used for personalization when sending emails to this group member.

warning

You can add an email address multiple times to the same group. When sending a group email, the user will receive multiple copies of the same email.

Remove Email from Group

Remove a specific email address from an existing group.

curl -X DELETE https://api.sendlix.com/v1/group/{groupId} \
-H "Content-Type: application/json" \
-H "X-API-KEY: YOUR_API_KEY" \
-d '{
"email": "recipient@example.com"
}'

Replace {groupId} with the ID of your group.

info

Only emails that were added within the last 30 minutes can be removed from the group.

Check if Email is in Group

Verify if a specific email address is a member of a group.

curl -X GET https://api.sendlix.com/v1/group/{groupId}/check/{email} \
-H "X-API-KEY: YOUR_API_KEY"

Replace {groupId} with the ID of your group and {email} with the email address you want to check.

Sending Emails to Groups

Send an email to all members of a specific group.

curl -X POST https://api.sendlix.com/v1/send/group/{groupId} \
-H "Content-Type: application/json" \
-H "X-API-KEY: YOUR_API_KEY" \
-d '{
"subject": "Important Announcement for the Group",
"content": {
"type": "HTML",
"value": "<h1>Hello {{name}}!</h1><p>This is an important announcement for all group members.</p>",
"tracking": true
},
"from": {
"email": "sender@example.com",
"name": "Group Administrator"
},
"category": "newsletter"
}'

Replace {groupId} with the ID of your group. Any substitution values defined for group members (like {{name}}) will be replaced with the actual values for each recipient.

Advanced Features

For more advanced usage of the Group Service, please refer to our detailed API reference documentation.

For more information on advanced features, see the Sendlix API Documentation.