A typed, importable Python client for the Instantly.ai V2 API.
client.campaigns.list(...), client.leads.create(...).Instantly / AsyncInstantly).Status: pre-1.0 (
0.x). Minor version bumps may include breaking changes until1.0.0– pin accordingly. See the changelog.
pip install instantlyai
Set INSTANTLY_API_KEY in your environment, or pass api_key=... explicitly.
"""Quickstart: authenticate and list your campaigns.
Runnable as-is once ``INSTANTLY_API_KEY`` is set in the environment. Also
executed in CI (see ``tests/test_examples.py``) against a mocked API, so this
file can never drift from what actually works.
"""
from __future__ import annotations
import instantlyai
def main(client: instantlyai.Instantly) -> None:
for campaign in client.campaigns.list(limit=10):
print(campaign.id, campaign.name)
if __name__ == "__main__":
with instantlyai.Instantly() as client: # reads INSTANTLY_API_KEY from the environment
main(client)
Async usage is the same shape, with AsyncInstantly and await/async for.
Full documentation, including the tutorial and API reference, lives at https://exprtec.github.io/instantlyai-python-sdk.
See CONTRIBUTING.md.