Pipes.bot
BYON

BYON Quickstart

Clone and run the BYON demo app to connect a WhatsApp Business number, manage templates, and send messages.

Get up and running with BYON by cloning the demo app. It covers the full lifecycle — connecting a number via Embedded Signup, listing templates, and sending messages.

Prerequisites

  • A Pro or Pro+ Pipes.bot plan
  • An App API key (ak_...) — see Creating an App
  • Node.js 18+
  • pnpm

Setup

Clone the repo and install dependencies:

git clone https://github.com/id49/pipes-bot-byon-demo.git
cd pipes-bot-byon-demo
pnpm install

Create a .env file with the following variables:

VariableDescription
PIPES_APP_API_KEYYour App API key (ak_...)
PIPES_APP_SLUGYour App's slug
PARTNER_REDIRECT_URLRedirect URL after Embedded Signup
PIPES_API_BASE_URLAPI base (default: https://api.pipes.bot)

Start the development server:

pnpm dev

What the demo covers

The demo app walks through four BYON flows:

Connect

Starts the Embedded Signup flow by generating a token via POST /v1/apps/token and redirecting the user to onboard their WhatsApp Business number.

See Embedded Signup for the full reference.

Templates

Fetches approved message templates for a connected number via GET /v1/pool-numbers/{id}/templates.

See Template Management for details on listing and using templates.

Send Template

Sends a template message to a recipient via POST /v1/messages/passthrough. Templates let you initiate conversations outside the 24-hour service window.

See Passthrough Messages for the full endpoint reference.

Send Message

Sends a plain text message via POST /v1/messages/app/send to a recipient on a connected BYON number.

See Sending Messages for the full endpoint reference.

Next steps

On this page