Zum Inhalt

Schnellstart

Senden Sie Ihre erste E-Mail in 5 Minuten.

1. API-Key erstellen

Registrieren Sie sich unter subscribeflow.net, öffnen Sie das Dashboard und erstellen Sie einen API-Key. Kopieren Sie ihn sofort -- er wird nur einmal angezeigt.

Ihr Key beginnt mit sf_live_ für Produktion oder sf_test_ für Tests.

2. SDK installieren

pip install subscribeflow
npm install @subscribeflow/sdk

Keine Installation nötig. Sie benötigen nur curl und Ihren API-Key.

3. Subscriber erstellen

import asyncio
from subscribeflow import SubscribeFlowClient

async def main():
    async with SubscribeFlowClient(api_key="sf_live_...") as client:
        subscriber = await client.subscribers.create(
            email="user@example.com",
            metadata={"source": "website"},
        )
        print(f"Erstellt: {subscriber.id}")

asyncio.run(main())
import { SubscribeFlowClient } from '@subscribeflow/sdk';

const client = new SubscribeFlowClient({
  apiKey: 'sf_live_...',
});

const subscriber = await client.subscribers.create({
  email: 'user@example.com',
  metadata: { source: 'website' },
});

console.log('Erstellt:', 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": "user@example.com",
    "metadata": {"source": "website"}
  }'

4. Tag hinzufügen

tag = await client.tags.create(
    name="Product Updates",
    description="Benachrichtigungen über neue Features",
)
print(f"Tag erstellt: {tag.name}")
const tag = await client.tags.create({
  name: 'Product Updates',
  description: 'Benachrichtigungen über neue Features',
});

console.log('Tag erstellt:', tag.name);
curl -X POST https://api.subscribeflow.net/api/v1/tags \
  -H "X-API-Key: sf_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Product Updates",
    "description": "Benachrichtigungen über neue Features"
  }'

5. E-Mail senden

result = await client.emails.send(
    template_slug="welcome-email",
    to="user@example.com",
    variables={"company": "Acme Inc"},
)
print(f"E-Mail eingereiht: {result.id}")
const result = await client.emails.send({
  template_slug: 'welcome-email',
  to: 'user@example.com',
  variables: { company: 'Acme Inc' },
});

console.log('E-Mail eingereiht:', 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": "user@example.com",
    "variables": {"company": "Acme Inc"}
  }'

Nächste Schritte