@indiefin/freshsales
v1.8.0
Published
Freshsales JS client
Downloads
32
Readme
Freshsales
This is a modest and ever-incomplete client, for the Freshsales API.
Installation
npm i @indiefin/freshsales
Usage
import { Client } from "@indiefin/freshsales"
// You can define your API key and domain in a couple ways:
// 1. As the first and second parameters to the constructor
// 2. As FRESHSALES_KEY and FRESHSALES_DOMAIN environment variables
const client = new Client(/* FRESHSALES_KEY, FRESHSALES_DOMAIN */)
// creating a new lead
const { id } = await client.createLead({
/* lead data */
})
// viewing an existing lead
const lead = await client.viewLead(id)
// deleting a lead
await client.deleteLead(id)
Roadmap
- ~~these~~ are now implemented.
- Manage other entities: ~~contacts~~, accounts, ~~deals~~ etc.
- More advanced lead operations: bulk assignment, ~~activities~~, ~~conversion~~ etc.
- Decorated responses
Feedback
You can reach out on Twitter for questions and support.