Quickstart
Send your first email in 5 minutes.
1. Get your API key
Sign up at subscribeflow.net, open the Dashboard, and create an API key. Copy it immediately -- it is only shown once.
Your key starts with sf_live_ for production or sf_test_ for testing.
2. Install the SDK
3. Create a subscriber
import asyncio
from subscribeflow import SubscribeFlowClient
async def main():
async with SubscribeFlowClient(api_key="sf_live_...") as client:
subscriber = await client.subscribers.create(
email="[email protected]",
metadata={"source": "website"},
)
print(f"Created: {subscriber.id}")
asyncio.run(main())
import { SubscribeFlowClient } from '@subscribeflow/sdk';
const client = new SubscribeFlowClient({
apiKey: 'sf_live_...',
});
const subscriber = await client.subscribers.create({
email: '[email protected]',
metadata: { source: 'website' },
});
console.log('Created:', subscriber.id);
curl -X POST https://api.subscribeflow.net/api/v1/subscribers \
-H "X-API-Key: sf_live_..." \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]",
"metadata": {"source": "website"}
}'
4. Add a tag
5. Send an email
result = await client.emails.send(
template_slug="welcome-email",
to="[email protected]",
variables={"company": "Acme Inc"},
)
print(f"Email queued: {result.id}")
const result = await client.emails.send({
template_slug: 'welcome-email',
to: '[email protected]',
variables: { company: 'Acme Inc' },
});
console.log('Email queued:', result.id);
curl -X POST https://api.subscribeflow.net/api/v1/emails/send \
-H "X-API-Key: sf_live_..." \
-H "Content-Type: application/json" \
-d '{
"template_slug": "welcome-email",
"to": "[email protected]",
"variables": {"company": "Acme Inc"}
}'
Next steps
- Authentication -- API key scopes and rate limits
- SDK Setup -- configuration, error handling, and advanced options
- Subscribers guide -- full subscriber management
- Tags guide -- organize subscribers with tags
- Sending Emails guide -- templates, campaigns, and triggers