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

# Webhooks Quickstart

> Get up and running with Slate POV Platform integrations in minutes

# Quickstart Guide

Get started with Slate POV Platform integrations in just a few steps. This guide will walk you through setting up webhooks and basic API access.

## Prerequisites

Before you begin, ensure you have:

* Access to the Slate POV Platform Dashboard
* A webhook endpoint URL for receiving events
* Basic knowledge of HTTP and JSON

## Step 1: Access Your Dashboard

1. Log in to your [Slate POV Platform Dashboard](https://app.homestar.com.au)
2. Navigate to the **Integrations** section
3. Locate the **Webhooks** configuration area

## Step 2: Configure Webhooks

### Create a Webhook Endpoint

1. In the Dashboard, go to **Webhooks** → **Add Endpoint**
2. Enter your webhook URL (e.g., `https://your-domain.com/webhooks/homestar`)
3. Select the events you want to receive:
   * `contact.created` - New customer contacts
   * `application.started` - Application initiation
   * `application.submitted` - Application submission
   * `application.pre_approved` - Pre-approval status
   * `application.fully_approved` - Full approval
   * `document.uploaded` - Document uploads

### Verify Your Endpoint

```bash theme={null}
# Test webhook endpoint
curl -X POST https://your-domain.com/webhooks/homestar \
  -H "Content-Type: application/json" \
  -d '{
    "event": "test",
    "timestamp": "2024-01-15T10:30:00Z",
    "source": "homestar_pov_platform",
    "data": {"test": true}
  }'
```

```javascript theme={null}
// Express.js webhook handler
app.post('/webhooks/homestar', (req, res) => {
  const { event, data } = req.body;
  
  console.log('Received webhook:', event);
  
  // Handle different event types
  switch (event) {
    case 'contact.created':
      handleContactCreated(data);
      break;
    case 'application.submitted':
      handleApplicationSubmitted(data);
      break;
    // ... handle other events
  }
  
  res.status(200).json({ received: true });
});
```

## Step 3: Implement Webhook Verification

For security, always verify webhook signatures:

```javascript theme={null}
// Using Svix library
const { headers, rawBody } = req;
const svix = new Svix(webhookSecret);

try {
  const payload = svix.verify(rawBody, headers);
  // Process verified payload
} catch (err) {
  res.status(400).json({ error: 'Invalid signature' });
}
```

## Step 4: Handle Events

Implement handlers for the events you've subscribed to:

```javascript theme={null}
function handleContactCreated(data) {
  const { slatePrimaryContactId, email, firstName, lastName } = data;
  
  // Create contact in your CRM
  createContactInCRM({
    externalId: slatePrimaryContactId,
    email,
    firstName,
    lastName
  });
}

function handleApplicationSubmitted(data) {
  const { slateApplicationId, applicationData } = data;
  
  // Update application status in your system
  updateApplicationStatus(slateApplicationId, 'submitted');
  
  // Send notification to relevant team
  notifyTeam('New application submitted', applicationData);
}
```

## Step 5: Test Your Integration

1. Create a test contact in Slate POV Platform
2. Start a test application
3. Monitor your webhook endpoint for incoming events
4. Verify that your handlers are processing events correctly

## Next Steps

* Explore the [Webhook Events](/webhooks/events) documentation for detailed event schemas
* Learn about [Webhooks Security](/webhooks/security) best practices

## Need Help?

If you encounter any issues during setup:

* Check the [Webhooks Security](/webhooks/security) guide for troubleshooting
* Contact support at [support@homestar.com.au](mailto:support@homestar.com.au)
* Review webhook delivery logs in your Slate POV Platform Dashboard
