Skip to content

Class: Contacts

Defined in: contacts.ts:15

Contact management operations.

Constructors

Constructor

ts
new Contacts(client): Contacts;

Defined in: contacts.ts:16

Parameters

ParameterType
clientHttpClient

Returns

Contacts

Methods

create()

ts
create(input, groupId): Promise<Result<Contact, MNotifyError>>;

Defined in: contacts.ts:24

Creates a new contact in the specified group.

Parameters

ParameterTypeDescription
inputCreateContactInputContact details (name, phone, etc.).
groupIdstringThe ID of the group to add the contact to (required by mNotify v2 API).

Returns

Promise<Result<Contact, MNotifyError>>


list()

ts
list(): Promise<Result<Contact[], MNotifyError>>;

Defined in: contacts.ts:51

Lists all contacts.

Returns

Promise<Result<Contact[], MNotifyError>>