This library provides a client for interacting with the Outreach API, allowing you to perform various operations such as fetching accounts, creating prospects, updating account names, and more.
- Installation
- Usage
- Initialization
- #methods
- Methods Reference
- Accounts
- Prospects
- Sequences
- Users
- Mailboxes
To install this library, run:
yarn add https://github.com/ekohe/outreach-js-client
First, import and initialize the OutreachClient
:
import OutreachClient from 'outreach-js-client';
const client = OutreachClient({
handleBaseURL: (baseURL) => `${baseURL}`
});
This library provides various methods to interact with the Outreach API. Below are some examples.
client.getAccountById(accountId, token)
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
client.createAccount({
name: 'New Account',
domain: 'example.com',
ownerId: 123
}, token)
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
Fetch an account by its ID.
- Parameters:
id
(number): The account ID.token
(string): The API token.
- Returns: Promise with account data.
Create a new account.
- Parameters:
params
(object): Account details (name
,domain
,ownerId
).token
(string): The API token.
- Returns: Promise with created account data.
Update the name of an account.
- Parameters:
params
(object): Containsid
(account ID) andname
(new name).token
(string): The API token.
- Returns: Promise with updated account data.
Fetch a prospect by its ID.
- Parameters:
id
(number): The prospect ID.token
(string): The API token.
- Returns: Promise with prospect data.
Fetch a prospect by email.
- Parameters:
email
(string): The prospect email.token
(string): The API token.
- Returns: Promise with prospect data.
Create a new prospect.
- Parameters:
params
(object): Prospect details (emails
,firstName
,middleName
,lastName
,title
,accountId
,ownerId
).token
(string): The API token.
- Returns: Promise with created prospect data.
Update a prospect.
- Parameters:
params
(object): Containsid
(prospect ID) and other attributes to update.token
(string): The API token.
- Returns: Promise with updated prospect data.
Fetch sequences.
- Parameters:
params
(object): Query parameters.token
(string): The API token.
- Returns: Promise with sequence data.
Fetch a sequence by its ID.
- Parameters:
id
(number): The sequence ID.token
(string): The API token.
- Returns: Promise with sequence data.
Add a prospect to a sequence.
- Parameters:
params
(object): ContainsprospectId
,sequenceId
, andmailboxId
.token
(string): The API token.
- Returns: Promise with sequence state data.
Fetch user information.
- Parameters:
params
(object): Containsid
(user ID) and optionalsearchParams
.token
(string): The API token.
- Returns: Promise with user data.
Fetch mailboxes.
- Parameters:
params
(object): ContainsuserId
.token
(string): The API token.
- Returns: Promise with mailbox data.
Test the synchronization of a mailbox.
- Parameters:
params
(object): ContainsmailboxId
.token
(string): The API token.
- Returns: Promise with mailbox data.
This project is licensed under the MIT License - see the LICENSE file for details.