> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zavu.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Senders

> Manage sender profiles with the Python SDK

Senders are phone numbers or identities used to send messages. Each project can have multiple senders with one designated as default.

## List Senders

```python theme={null}
result = client.senders.list()
for sender in result.items:
    print(sender.id, sender.name, sender.phone_number)
    if sender.is_default:
        print("(Default sender)")

# With pagination
result = client.senders.list(
    limit=50,
    cursor="cursor_xxx"
)
```

## Get Sender

```python theme={null}
result = client.senders.get(sender_id="snd_abc123")

print(result.id)
print(result.name)
print(result.phone_number)
print(result.is_default)
```

## Create Sender

```python theme={null}
result = client.senders.create(
    name="Marketing",
    phone_number="+15551234567",
    set_as_default=True
)

print(result.id)  # snd_xxx
```

### With Webhook

```python theme={null}
result = client.senders.create(
    name="Marketing",
    phone_number="+15551234567",
    webhook_url="https://your-app.com/webhooks",
    webhook_events=["message.inbound", "message.delivered", "message.failed"]
)

# Webhook secret is only returned on create
if result.webhook and result.webhook.secret:
    print(f"Save this secret: {result.webhook.secret}")
```

## Update Sender

```python theme={null}
result = client.senders.update(
    sender_id="snd_abc123",
    name="Support",
    set_as_default=True
)
```

### Update Webhook Configuration

```python theme={null}
result = client.senders.update(
    sender_id="snd_abc123",
    webhook_url="https://new-url.com/webhooks",
    webhook_events=["message.inbound"],
    webhook_active=True
)
```

### Disable Webhook

```python theme={null}
result = client.senders.update(
    sender_id="snd_abc123",
    webhook_active=False
)
```

### Remove Webhook

```python theme={null}
result = client.senders.update(
    sender_id="snd_abc123",
    webhook_url=None
)
```

## Delete Sender

```python theme={null}
client.senders.delete(sender_id="snd_abc123")
```

<Note>
  You cannot delete the default sender. Set another sender as default first.
</Note>

## Regenerate Webhook Secret

If your webhook secret is compromised, generate a new one:

```python theme={null}
result = client.senders.regenerate_webhook_secret(
    sender_id="snd_abc123"
)

print(f"New secret: {result.secret}")
```

<Warning>
  After regenerating the secret, update your webhook handler to use the new secret. The old secret will no longer work.
</Warning>

## WhatsApp Business Profile

Manage the WhatsApp Business Profile for senders with a connected WhatsApp Business Account.

### Get Profile

```python theme={null}
response = client.senders.get_profile(sender_id="snd_abc123")

print(response.profile.about)
print(response.profile.description)
print(response.profile.address)
print(response.profile.email)
print(response.profile.websites)
print(response.profile.vertical)
print(response.profile.profile_picture_url)
```

### Update Profile

```python theme={null}
response = client.senders.update_profile(
    sender_id="snd_abc123",
    about="Your trusted online store",
    description="Best products at competitive prices",
    address="123 Main St, San Francisco, CA",
    email="support@example.com",
    websites=["https://example.com"],
    vertical="RETAIL"
)
```

### Upload Profile Picture

```python theme={null}
response = client.senders.upload_profile_picture(
    sender_id="snd_abc123",
    image_url="https://example.com/logo.png",
    mime_type="image/png"
)
```

<Note>
  Profile methods are only available for senders with a WhatsApp Business Account connected.
</Note>

## Using Senders in Messages

Specify a sender when sending a message:

```python theme={null}
result = client.messages.send(
    to="+14155551234",
    text="Hello!",
    zavu_sender="snd_abc123"
)
```

If no sender is specified, the default sender is used.
