Easymailing
Groups

Add members matching conditions to a group

POST /audiences/{audienceUuid}/groups/{uuid}/actions/add_from_conditions

POST/audiences/{audienceUuid}/groups/{uuid}/actions/add_from_conditions

Starts a background job that adds to the group the members of the audience that match your conditions. Members already in the group should be skipped (see side effects). It runs in the background and returns an async task straight away, not the final result: read it with get_async_task using the task uuid and repeat until status is completed or failed.

When to use: To fill a group from a one-off rule, for example everyone in Spain who opened a campaign, without creating a saved segment.

When not to use: To add one member, use member_add_from_group. To reuse a saved segment, use async_task_segment_add_to_group. To remove members, use async_task_group_remove_from_conditions.

Side effects: Starts an async task. For each member added it records an entry in the member's activity and fires the automations triggered by joining a group; the group's member count is refreshed. It does not fire the member_added_to_group webhook. A member who is already in this group but also in another group is selected again: their activity entry and group automations can run a second time, and they are counted in result_meta.added. Each condition has a field (IRI of a condition field from list_audience_condition_fields), an operator (one of the operators that field lists) and a value whose type depends on the field: text, integer, decimal, boolean, date string (2026-01-15) or an array for multi-select fields.

Permissions: Requires the manager role or higher, or the marketing.audiences.write capability.

Authorization

X-Auth-Token<token>

Value for the X-Auth-Token header parameter.

In: header

Path Parameters

audienceUuid*string

UUID of the audience the group belongs to. Get it from list_audiences.

uuid*string

UUID of the group. Get it from list_audience_groups.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://api.easymailing.com/audiences/0df14405-90ff-4287-b3e4-ef088901ee6f/groups/419eb38e-62fd-454e-98a7-c8dd5e9752dd/actions/add_from_conditions" \  -H "X-Auth-Token: YOUR_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "operator_match": "all",    "conditions": [      {        "field": "/entity/1",        "operator": "string",        "value": null      }    ]  }'
{  "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",  "type": "string",  "status": "pending",  "total": 0,  "processed": 0,  "errored": 0,  "progress": 0.1,  "error_message": "string",  "result_meta": {},  "result_file": "string",  "result_file_url": "http://example.com",  "started_at": "string",  "finished_at": "string",  "created_at": "string"}