mailingLists API
The mailingLists API allows to access and manage the user’s mailing lists.
Permissions
The following permissions influence the behavior of the API. Depending on which permissions are requested, additional methods might be available, or certain data may be included in responses.
Hint
Request permissions only when needed. Unnecessary requests may result in rejection during ATN review.
addressBooks
Read and modify your address books and contacts.
Functions
addMember(id, contactId)
– [Added in TB 64]
Adds a contact to the mailing list with id id. If the contact and mailing list are in different address books, the contact will also be copied to the list’s address book.
Required permissions
create(parentId, properties)
– [Added in TB 64]
Creates a new mailing list in the address book with id parentId.
Parameters
parentId
properties
Required permissions
delete(id)
– [Added in TB 64]
Removes the mailing list.
Required permissions
get(id)
– [Added in TB 64]
Gets a single mailing list.
Required permissions
list(parentId)
– [Added in TB 64]
Gets all the mailing lists in the address book with id parentId.
Required permissions
listMembers(id)
– [Added in TB 64]
Gets all contacts that are members of the mailing list with id id.
Required permissions
removeMember(id, contactId)
– [Added in TB 64]
Removes a contact from the mailing list with id id. This does not delete the contact from the address book.
Required permissions
update(id, properties)
– [Added in TB 64]
Edits the properties of a mailing list.
Parameters
id
properties
Required permissions
Events
onCreated
– [Added in TB 64]
Fired when a mailing list is created.
Parameters for onCreated.addListener(listener)
listener(node)
A function that will be called when this event occurs.
Required permissions
onDeleted
– [Added in TB 64]
Fired when a mailing list is deleted.
Parameters for onDeleted.addListener(listener)
listener(parentId, id)
A function that will be called when this event occurs.
Required permissions
onMemberAdded
– [Added in TB 64]
Fired when a contact is added to the mailing list.
Parameters for onMemberAdded.addListener(listener)
listener(node)
A function that will be called when this event occurs.
Required permissions
onMemberRemoved
– [Added in TB 64]
Fired when a contact is removed from the mailing list.
Parameters for onMemberRemoved.addListener(listener)
listener(parentId, id)
A function that will be called when this event occurs.
Required permissions
onUpdated
– [Added in TB 64]
Fired when a mailing list is changed.
Parameters for onUpdated.addListener(listener)
listener(node)
A function that will be called when this event occurs.
Required permissions
Types
MailingListNode
– [Added in TB 64]
A node representing a mailing list.
object
description
id
The unique identifier for the node. IDs are unique within the current profile, and they remain valid even after the program is restarted.
name
nickName
type
contacts
A list of contacts held by this node’s address book or mailing list.
parentId
The id of the parent object.
readOnly
Indicates if the object is read-only.
remote
Indicates if the object came from a remote address book.