Creates a target group based on a given contact filter.
1 |
POST https://api.maileon.com/1.0/targetgroups |
Body Data
You need to set an entity of a target group.
Parameter | Required/ | Description |
name | / true | Name of the group. The name must be unique within the account. The name length must be in the range from 3 to 64 and should only contain alphanumeric characters or spaces. |
type | / true | The type of the group. Can be one of ‘regular’ and ‘test’. |
contact_filter_id |
/ true | The ID of the contact filter to base the group on. |
Body Example
1 2 3 4 5 |
<targetgroup> <name>test1234</name> <type>regular</type> <contact_filter_id>2765</contact_filter_id> </targetgroup> |
Response Codes
HTTP status code | Description |
---|---|
201 Created |
Default status when everything worked well. |
400 Bad request |
Something with the request is wrong, e.g. wrong xml syntax or missing values. |
404 Not found |
The contact filter with the given ID does not exist. |
409 Conflict |
A filter with the given name already exists. |
500 Conflict |
An unexpected error occured. |
Example
1 2 |
POST https://api.maileon.com/1.0/targetgroups Content-Type: application/vnd.maileon.api+xml; charset=utf-8 |
1 2 3 |
Status: 201 Created Content-Type: application/vnd.maileon.api+xml; charset=utf-8 <id>13</id> |