Add Contacts to List

crm/add-contacts-to-list@1.0.1
2 providers

Add Contacts to List

Adds contacts to an existing contact list. Use the `crm/lists` profile to get the list ID.

Input
List ID
Contact e-mails

1.Choose a provider

2.Use AddContactsToList with mock in your code

npm i @superfaceai/one-sdk
const { SuperfaceClient } = require('@superfaceai/one-sdk');

const sdk = new SuperfaceClient();

async function run() {
  // Load the profile
  const profile = await sdk.getProfile('crm/add-contacts-to-list@1.0.1');

  // Use the profile
  const result = await profile
    .getUseCase('AddContactsToList')
    .perform({
      listId: '',
      emails: [
        ''
      ]
    }, {
      provider: 'mock'
    });

  // Handle the result
  try {
    const data = result.unwrap();
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

run();

Structure details

Input (object)

listId
Unique ID of the list to add a contact to.
emails
E-mail addresses of the contacts to add to the list.

Example

{
  "listId": "",
  "emails": [
    ""
  ]
}

Implementation details

Provider
mock
Use case
AddContactsToList
Author
@superface
Source
Verified