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

# Webhook

> Send messages and embeds through Discord webhooks

## Overview

The webhook system allows you to send messages, embeds, or both through Discord webhooks with custom branding. Perfect for automated notifications, announcements, and professional-looking messages with customizable usernames and avatars.

<Info>
  Webhooks allow you to send messages that appear to come from a custom bot or user, complete with custom names and profile pictures.
</Info>

***

## Key Features

<CardGroup cols={2}>
  <Card title="Custom Branding" icon="palette">
    Set custom username and avatar for each webhook message
  </Card>

  <Card title="Flexible Content" icon="message">
    Send text messages, embeds, or both together
  </Card>

  <Card title="Variable Support" icon="brackets-curly">
    Use dynamic variables in messages and embeds
  </Card>

  <Card title="Saved Embeds" icon="floppy-disk">
    Send your pre-built embeds through webhooks
  </Card>
</CardGroup>

***

## Commands

<AccordionGroup>
  <Accordion title="/webhook send" icon="paper-plane">
    Send a message through a webhook with optional custom branding.

    <CodeGroup>
      ```bash Syntax theme={null}
      /webhook send webhook_url:<url> [content:<text>] [embed:<name>] [username:<name>] [avatar_url:<url>]
      ```

      ```bash Examples theme={null}
      # Send text message
      /webhook send webhook_url:https://discord.com/api/webhooks/... content:Hello everyone!

      # Send saved embed
      /webhook send webhook_url:https://... embed:announcement

      # Send with custom branding
      /webhook send webhook_url:https://... content:Server update! username:Update Bot avatar_url:https://...

      # Send text + embed
      /webhook send webhook_url:https://... content:Check this out! embed:promo

      # Complete example
      /webhook send webhook_url:https://... content:New event starting! embed:event-info username:Event Bot avatar_url:https://...
      ```
    </CodeGroup>

    **Parameters:**

    * **webhook\_url** (required) — Discord webhook URL from channel settings
    * **content** (optional) — Text message to send (supports variables)
    * **embed** (optional) — Name of your saved embed (from `/embed builder`)
    * **username** (optional) — Custom webhook username override
    * **avatar\_url** (optional) — Custom webhook avatar URL

    **Requirements:**

    * Must provide either `content` or `embed` (or both)
    * Embed must be saved to your account first
    * Webhook URL must be valid and active

    **Permissions:** Manage Server
  </Accordion>
</AccordionGroup>

***

## How to Get a Webhook URL

<Steps>
  <Step title="Open Channel Settings">
    Right-click the channel where you want to create a webhook and select **Edit Channel**
  </Step>

  <Step title="Navigate to Integrations">
    Go to the **Integrations** tab in channel settings
  </Step>

  <Step title="Create Webhook">
    Click **Create Webhook** or **View Webhooks**

    * Give your webhook a name
    * Optionally set a custom avatar
    * Click **Copy Webhook URL**
  </Step>

  <Step title="Use the URL">
    Paste the webhook URL into the `/webhook send` command
  </Step>
</Steps>

<Warning>
  **Keep Webhook URLs Secret**

  Anyone with your webhook URL can send messages through it. Don't share webhook URLs publicly or in untrusted locations.
</Warning>

***

## Usage Examples

<Tabs>
  <Tab title="Simple Message">
    ```bash theme={null}
    # Send a quick announcement
    /webhook send webhook_url:https://discord.com/api/webhooks/123/abc content:Server maintenance in 10 minutes!
    ```
  </Tab>

  <Tab title="Embed Only">
    ```bash theme={null}
    # Send a pre-built embed
    /webhook send webhook_url:https://discord.com/api/webhooks/123/abc embed:rules-embed
    ```
  </Tab>

  <Tab title="Custom Branding">
    ```bash theme={null}
    # Send with custom name and avatar
    /webhook send webhook_url:https://... content:Welcome to the server! username:Welcome Bot avatar_url:https://i.imgur.com/example.png
    ```
  </Tab>

  <Tab title="Message + Embed">
    ```bash theme={null}
    # Send both text and embed
    /webhook send webhook_url:https://... content:📢 New announcement! embed:announcement username:News Bot
    ```
  </Tab>

  <Tab title="With Variables">
    ```bash theme={null}
    # Use variables in content
    /webhook send webhook_url:https://... content:We now have {guild.member_count_ordinal} members! embed:milestone username:Stats Bot
    ```
  </Tab>
</Tabs>

***

## Variable Support

Webhook messages and embeds support all standard variables:

<AccordionGroup>
  <Accordion title="User Variables" icon="user">
    * `{user}` — Username
    * `{user.mention}` — Mention the user
    * `{user.id}` — User ID
    * `{user.avatar}` — User avatar URL
    * `{user.created_at}` — Account creation date

    [See all user variables →](/variables)
  </Accordion>

  <Accordion title="Server Variables" icon="server">
    * `{guild.name}` — Server name
    * `{guild.count}` — Member count
    * `{guild.member_count_ordinal}` — Member count with suffix (1st, 2nd, etc.)
    * `{guild.boost_count}` — Server boost count
    * `{guild.icon}` — Server icon URL

    [See all server variables →](/variables)
  </Accordion>

  <Accordion title="Channel Variables" icon="hashtag">
    * `{channel}` — Channel mention
    * `{channel.name}` — Channel name
    * `{channel.id}` — Channel ID
    * `{channel.topic}` — Channel topic

    [See all channel variables →](/variables)
  </Accordion>

  <Accordion title="Time Variables" icon="clock">
    * `{timestamp}` — Current timestamp (full date & time)
    * `{date}` — Current date only
    * `{time}` — Relative time (e.g., "2 minutes ago")
    * `{unix}` — Unix timestamp

    [See all time variables →](/variables)
  </Accordion>
</AccordionGroup>

***

## Common Use Cases

<AccordionGroup>
  <Accordion title="Automated Announcements" icon="bullhorn">
    ```bash theme={null}
    # Create a professional announcement
    /webhook send webhook_url:https://... embed:announcement username:Server News avatar_url:https://...
    ```

    Perfect for:

    * Server updates
    * Event notifications
    * Rule changes
    * Feature announcements
  </Accordion>

  <Accordion title="Status Updates" icon="signal">
    ```bash theme={null}
    # Send status messages
    /webhook send webhook_url:https://... content:🟢 All systems operational username:Status Bot
    ```

    Great for:

    * Uptime notifications
    * Service status
    * System alerts
    * Maintenance notices
  </Accordion>

  <Accordion title="Welcome Messages" icon="hand-wave">
    ```bash theme={null}
    # Send personalized welcomes
    /webhook send webhook_url:https://... content:Welcome {user.mention}! embed:welcome username:Welcome Committee
    ```

    Use for:

    * New member greetings
    * Server introduction
    * Rules reminder
    * Community guidelines
  </Accordion>

  <Accordion title="Event Notifications" icon="calendar">
    ```bash theme={null}
    # Announce events
    /webhook send webhook_url:https://... content:Event starting in 1 hour! embed:event-details username:Event Manager
    ```

    Ideal for:

    * Event reminders
    * Schedule updates
    * Activity announcements
    * Tournament info
  </Accordion>

  <Accordion title="Custom Branding" icon="paintbrush">
    ```bash theme={null}
    # Use different "bots" for different purposes
    /webhook send webhook_url:https://... content:Moderation update embed:mod-log username:Mod Team avatar_url:https://...
    ```

    Perfect for:

    * Department-specific messages
    * Role-playing scenarios
    * Multi-bot appearance
    * Professional presentation
  </Accordion>
</AccordionGroup>

***

## Tips & Best Practices

<Info>
  **Design Tips**

  * Create embeds first with `/embed builder` before using webhooks
  * Use custom usernames to organize different types of announcements
  * Set avatar URLs that match the webhook's purpose
  * Test webhooks in a private channel first
  * Use variables to make messages dynamic and personalized
</Info>

<Note>
  **Message Formatting**

  * Combine text content with embeds for maximum impact
  * Keep webhook usernames short and descriptive
  * Use high-quality images for avatar URLs (square images work best)
  * Variables work in both content and embeds
  * You can send up to 10 embeds in a single webhook message
</Note>

<Warning>
  **Security Reminders**

  * Never share webhook URLs publicly
  * Delete webhooks you're no longer using
  * Regenerate webhook URLs if compromised
  * Only give webhook URLs to trusted team members
  * Monitor webhook usage for unauthorized access
</Warning>

***

## Webhook vs Bot Messages

<CardGroup cols={2}>
  <Card title="Regular Bot Messages" icon="robot">
    **Pros:**

    * Bot's actual name and avatar
    * Shows as the bot in message
    * Direct bot identity

    **Cons:**

    * Less flexible branding
    * Single identity
  </Card>

  <Card title="Webhook Messages" icon="webhook">
    **Pros:**

    * Custom names per message
    * Custom avatars per message
    * Professional appearance
    * Multiple "identities"

    **Cons:**

    * Requires webhook setup
    * URL management needed
  </Card>
</CardGroup>

***

## Troubleshooting

### Invalid Webhook URL

**Symptoms:** Error message about invalid webhook URL format

**Solutions:**

1. Verify URL starts with `https://discord.com/api/webhooks/`
2. Copy the URL directly from Discord (don't type it manually)
3. Check that webhook hasn't been deleted
4. Ensure no extra spaces or characters in URL

### Webhook Not Found

**Symptoms:** Error that webhook may have been deleted

**Solutions:**

1. Go to channel settings → Integrations
2. Verify webhook still exists
3. If deleted, create a new webhook
4. Update commands with new URL

### Invalid Avatar URL

**Symptoms:** Error about invalid avatar URL

**Solutions:**

1. Use direct image URLs (ending in .png, .jpg, .gif, .webp)
2. Try Discord CDN or Imgur for hosting
3. Verify URL is accessible (test in browser)
4. Remove avatar\_url parameter if URL is problematic

### Embed Not Found

**Symptoms:** Error that embed `name` not found

**Solutions:**

1. Run `/embed list` to see your saved embeds
2. Check spelling of embed name (case-sensitive)
3. Create embed first with `/embed builder`
4. Verify you're the owner of the embed

### Must Provide Content or Embed

**Symptoms:** Error requiring content or embed

**Solutions:**

1. Add `content:` parameter with a message
2. Add `embed:` parameter with saved embed name
3. You can include both for richer messages

***

## Permission Requirements

<CardGroup cols={2}>
  <Card title="Bot Permissions" icon="robot">
    Not applicable - webhooks don't require bot permissions in the channel
  </Card>

  <Card title="User Permissions" icon="user">
    **Manage Server** — Required to use `/webhook send` command
  </Card>

  <Card title="Channel Permissions" icon="hashtag">
    Users need **Manage Webhooks** permission to create webhooks in Discord's channel settings
  </Card>

  <Card title="Webhook Owner" icon="key">
    Anyone with the webhook URL can send through it (keep URLs secure)
  </Card>
</CardGroup>

***

## Related Features

<CardGroup cols={2}>
  <Card title="Embed Builder" icon="code" href="/embed-builder">
    Create embeds to send through webhooks
  </Card>

  <Card title="Variables" icon="brackets-curly" href="/variables">
    Use dynamic variables in webhook messages
  </Card>

  <Card title="Auto Responders" icon="reply" href="/auto-responders">
    Automated message responses
  </Card>

  <Card title="Vanity Tracking" icon="link" href="/vanity-tracking">
    Send webhooks when vanity is detected
  </Card>
</CardGroup>
