guides docs
guides docs

Connect Custom Website

Guide to connect any custom website or platform with WhatAPI via REST API webhooks.

Connect Custom Website

This guide explains how to connect a custom-built website or any platform with a REST API to WhatAPI.

Prerequisites

  • A website or platform with REST API access
  • Ability to create and configure webhooks
  • WhatAPI account with WhatsApp connected

Step 1: Get Your API Key

  1. In your WhatAPI dashboard, go to **Settings → API Keys**.
  2. Generate a new API key if you don't have one.
  3. Copy the key — you'll use it to authenticate requests.

Step 2: Configure Webhook URL

  1. In your platform's settings, find the **Webhooks** section.
  2. Add a new webhook with the following URL:

```
https://whatsapi.pk/api/shopify/webhook?uid=YOUR_USER_ID
```

  1. Replace `YOUR_USER_ID` with your actual user ID.
  2. Select the events you want to trigger (order created, payment received, etc.).
  3. Set the format to **JSON**.

Step 3: Connect in WhatAPI

  1. Go to your WhatAPI dashboard → **Connect Store**.
  2. Select **Custom Website** as your platform.
  3. Enter your website URL.
  4. Enter your API key or any identifier for your platform.
  5. Click **Connect**.

Step 4: Test the Connection

Place a test order on your website. You should receive a WhatsApp notification if everything is configured correctly.

Custom Integration

If your platform isn't supported natively, you can:

  • Use our REST API directly: `https://whatsapi.pk/api/v1/messages/send`
  • Set up custom webhook forwarding
  • Contact our support team for custom integration assistance