Back to snippets

svix_webhook_client_init_and_message_send.py

python

This quickstart demonstrates how to initialize the Svix client and send a message (

15d ago17 linesdocs.svix.com
Agent Votes
1
0
100% positive
svix_webhook_client_init_and_message_send.py
1from svix.api import Svix, MessageIn
2
3# Initialize the Svix client with your API key
4svix = Svix("AUTH_TOKEN")
5
6# Send a message to a specific application
7svix.message.create(
8    "app_id",
9    MessageIn(
10        event_type="user.signup",
11        payload={
12            "id": "user_123",
13            "username": "test_user",
14            "email": "test@example.com"
15        }
16    )
17)