Adds a mailing list to the account.
address required | string A valid email address for the mailing list, e.g. developers@mailgun.net, or Developers devs@mg.net |
name | string Mailing list name, e.g. Developers |
description | string A description |
access_level | string List access level, one of: readonly, members, everyone. Defaults to readonly |
reply_preference | string Set where replies should go: list or sender. Defaults to list |
{ "address": "developers@mailgun.net", "name": "Developers", "description": "Describe the mailing list", "access_level": "readonly", "reply_preference": "list" }
{- "list": {
- "address": "developers@mailgun.net",
- "name": "Developers",
- "description": "Describe the mailing list",
- "access_level": "readonly",
- "reply_preference": "list",
- "created_at": "Tue, 09 Aug 2011 20:50:27 -0000",
- "members_count": 2
}, - "message": "Mailing list has been created"
}
A mailing list is a group of members (recipients) which itself has an email address. This address becomes an ID for this mailing list.
{- "total_count": 1,
- "items": [
- {
- "address": "developers@mailgun.net",
- "name": "Developers",
- "description": "Describe the mailing list",
- "access_level": "readonly",
- "reply_preference": "list",
- "created_at": "Tue, 09 Aug 2011 20:50:27 -0000",
- "members_count": 2
}
]
}
Lists members in a given mailing list
{- "total_count": 1,
- "items": [
- {
- "address": "alice@example.com",
- "name": "Alice",
- "vars": {
- "gender": "female",
- "age": 27
}, - "subscribed": true
}
]
}
Adds a new member to the mailing list.
{ "address": "alice@example.com", "name": "Alice", "vars": { "gender": "female", "age": 27 }, "subscribed": true, "upsert": true }
{- "member": {
- "address": "alice@example.com",
- "name": "Alice",
- "vars": {
- "gender": "female",
- "age": 27
}, - "subscribed": true
}, - "message": "Mailing list member has been created"
}
Adds multiple members, up to 1000 per call, to a mailing list, using JSON array format. If the request includes more than 100 entries, the mailing list will be updated asynchronously.
{- "list": {
- "address": "developers@mailgun.net",
- "name": "Developers",
- "description": "Describe the mailing list",
- "access_level": "readonly",
- "reply_preference": "list",
- "created_at": "Tue, 09 Aug 2011 20:50:27 -0000",
- "members_count": 2
}, - "task-id": "4321",
- "message": "Mailing list upload started in background"
}
Adds multiple members, up to 1000 per call, to a mailing list via CSV file.
{ "upsert": true, "members": "absolute/path/to/file/members.csv" }
{- "list": {
- "address": "developers@mailgun.net",
- "name": "Developers",
- "description": "Describe the mailing list",
- "access_level": "readonly",
- "reply_preference": "list",
- "created_at": "Tue, 09 Aug 2011 20:50:27 -0000",
- "members_count": 2
}, - "task-id": "4321",
- "message": "Mailing list upload started in background"
}
Get details about a specific mailing list member
{- "address": "alice@example.com",
- "name": "Alice",
- "vars": {
- "gender": "female",
- "age": 27
}, - "subscribed": true
}
Updates a mailing list member with the given properties. Existing properties not included in the request will not be changed.
{ "address": "alice@example.com", "name": "Alice", "vars": { "gender": "female", "age": 27 }, "subscribed": true }
{- "member": {
- "address": "alice@example.com",
- "name": "Alice",
- "vars": {
- "gender": "female",
- "age": 27
}, - "subscribed": true
}, - "message": "Mailing list member has been updated"
}
Deletes a member from a mailing list
{- "member": {
- "address": "alice@example.com"
}, - "message": "Mailing list member has been deleted"
}
Update mailing list properties, such as address, description or name
{ "address": "developers@mailgun.net", "name": "Developers", "description": "Describe the mailing list", "access_level": "readonly", "reply_preference": "list", "list_id": "123" }
{- "message": "Mailing list has been updated",
- "list": {
- "address": "developers@mailgun.net",
- "name": "Developers",
- "description": "Describe the mailing list",
- "access_level": "readonly",
- "reply_preference": "list",
- "created_at": "Tue, 09 Aug 2011 20:50:27 -0000",
- "members_count": 2
}
}
Returns the matching mailing list for the given address
{- "list": {
- "address": "developers@mailgun.net",
- "name": "Developers",
- "description": "Describe the mailing list",
- "access_level": "readonly",
- "reply_preference": "list",
- "created_at": "Tue, 09 Aug 2011 20:50:27 -0000",
- "members_count": 2
}
}
Paginate over mailing lists
OK
object | |
Array of objects |
{- "paging": {
}, - "items": [
- {
- "access_level": "everyone",
- "address": "dev@samples.mailgun.org",
- "created_at": "Tue, 06 Mar 2012 05:44:45 GMT",
- "description": "Mailgun developers list",
- "members_count": 1,
- "name": ""
}, - {
- "access_level": "readonly",
- "address": "bar@example.com",
- "created_at": "Wed, 06 Mar 2013 11:39:51 GMT",
- "description": "",
- "members_count": 2,
- "name": ""
}
]
}
Paginate over list members in a given mailing list in ascending order
OK
object | |
Array of objects |
{- "paging": {
}, - "items": [
- {
- "access_level": "everyone",
- "address": "dev@samples.mailgun.org",
- "created_at": "Tue, 06 Mar 2012 05:44:45 GMT",
- "description": "Mailgun developers list",
- "members_count": 1,
- "name": ""
}, - {
- "access_level": "readonly",
- "address": "bar@example.com",
- "created_at": "Wed, 06 Mar 2013 11:39:51 GMT",
- "description": "",
- "members_count": 2,
- "name": ""
}
]
}