Instantly-Go is a Go library for accessing the Instantly.ai API, making it easier for you to manage campaigns, leads, accounts, and other resources. The library provides easy-to-use interfaces for interacting with the Instantly service, allowing you to focus on building your applications.
- Manage campaigns: create, list, modify, and delete campaigns
- Manage leads: add, update, and delete leads from campaigns
- Manage accounts: list, check vitals, and manage warmup status
- Flexible configuration: set custom host, API version, rate limit, and HTTP client
go get github.com/bjornpagen/instantly-go
Import the package:
import instantly "github.com/bjornpagen/instantly-go"
Create a new client with your API key:
client := instantly.New("your_api_key")
List Campaigns
campaigns, err := client.ListCampaigns()
if err != nil {
log.Fatal(err)
}
fmt.Println(campaigns)
Add Leads to Campaign
leads := []instantly.Lead{
{Email: "email@example.com", FirstName: "John", LastName: "Doe"},
{Email: "another-email@example.com", FirstName: "Jane", LastName: "Smith"},
}
resp, err := client.AddLeadsToCampaign("campaign_id", leads)
if err != nil {
log.Fatal(err)
}
fmt.Println(resp)
For detailed documentation and available methods, please refer to the Godoc.
Please feel free to open an issue or submit a pull request if you'd like to contribute to the project. All contributions are welcome!
instantly-go is released under the Zero-Clause BSD License.