For developers

Connect your own channel to HAPP

Incoming webhook + outgoing endpoint — and any platform gets an AI assistant in 10 minutes.

Without HAPP

Custom AI integration — costly and slow

HAPP handles the AI, message queue, and security — you just connect two endpoints.

Development

6+

months of dev work

NLP, dialog handling, context storage — without a ready solution the team spends months on infrastructure instead of business logic.

Scale

3×

extra infrastructure

Reliable message delivery requires queues, retry logic, and alerts — a separate infrastructure that needs ongoing maintenance.

Security

HMAC

Without HMAC signatures anyone can send spoofed messages. Implementing and maintaining security costs time.

Endpoints

2

Features

What the integration gives you

Connect any platform — website, mobile app, CRM — to your HAPP AI assistant via two endpoints.

POST/webhook/cm_abc123
sender_id"user_42"
text"Hello!"
metadata{…}

Incoming webhook — any platform

Send a POST request with sender_id and text — HAPP processes the message and returns the AI reply.

24/7

AI replies instantly around the clock

Any platform gets an AI assistant that replies nights, weekends, and holidays.

Website
iOS App
Android
CRM
Telegram
Custom

Any platform in 10 minutes

Website, CRM, mobile app, internal tool — two endpoints and the integration is done.

POST/webhook/cm_abc123200
POST/your-endpoint200
POST/webhook/cm_abc123200
POST/your-endpoint500

Full request log for debugging

Every incoming and outgoing request — payload, status code, and response time — is logged in HAPP.

Incoming request
sender_id"user_42"
text"Hello!"
metadata{…}
HAPP reply
to"user_42"
text"Hi! How can I help?"
channel_id"cm_abc123"

Minimal payload — maximum flexibility

Two fields for the incoming request, HMAC signature for security. Pass metadata — HAPP returns it in the reply.

sender_id + text — the only required fields
X-HAPP-Signature: HMAC-SHA256 in every reply
metadata is passed through unchanged both ways
Before you start

What you need to connect

An HTTPS endpoint on your side and a HAPP account — nothing else required.

HAPP account

Active account with a configured assistant. No account yet? Sign up at my.happ.tools.

HTTPS outgoing endpoint

Your server URL where HAPP will POST AI replies. HTTPS only — HTTP is not supported for security reasons.

Access to your platform code

You need to add a POST request to the HAPP webhook URL when a message arrives from your user.

HMAC secret (optional)

HAPP signs every request with HMAC-SHA256. Verify the signature on your side — protection against spoofed requests.

Setup

How to connect your custom channel

Three steps: copy the webhook URL, configure message sending, and provide the outgoing endpoint for replies.

my.happ.tools / integrations

Integrations

Messengers

Telegram
Telegram
Receive incoming messages from customers
Send messages on behalf of the assistant
Telegram Bot
Telegram Bot
Connect your Telegram bot to receive messages
Automated responses via Bot API
Instagram
Instagram
Receive incoming messages and requests
Send messages and automate responses
Messenger
Messenger
Integration with Facebook Messenger
Receive and send messages
WhatsApp Bus...
WhatsApp Bus...
Receive messages from customers in WhatsApp Business
Send messages and automated replies
WhatsApp
WhatsApp
Receive messages from customers in WhatsApp
Send messages and auto-replies
Viber E-chat
Viber E-chat
Template responses and automated messaging
Customer correspondence and chat management
Cu
Custom Messe...
Connect your own messenger via webhooks
Send AI replies back to your system
Wi
Widget
Embeddable chat widget for your website
Real-time conversations with AI assistant

Push Notifications

Step 1: Find Custom Messenger

Open Integrations → Messengers → Custom Messenger → Connect

Payload format

Simple JSON — any language, any framework

Incoming and outgoing payload — minimal JSON. Integrate in just a few lines of code in any language.

my.happ.tools / integrations / custom-messenger
CM

My Website

Connected

Custom Messenger

Settings
Webhook URL
Request Log

Recent requests

POST

/cm/abc12xyz

just now

2000.6s
POST

/cm/abc12xyz

2m

2000.5s
POST

/cm/abc12xyz

5m

2000.7s
POST

/cm/abc12xyz

12m

2000.4s
POST

/cm/abc12xyz

18m

2000.8s

Request detail

200 OK0.6s

Incoming (your platform → HAPP)

{
  "sender_id": "user_42",
  "text": "Hello!",
  "sender_name": "Dmytro",
  "metadata": {    "source": "website"  }}
POSTapplication/json

Outgoing (HAPP → your endpoint)

{
  "reply": "Hi Dmytro!",
  "sender_id": "user_42",
  "channel": "custom_messenger",
  "metadata": {    "source": "website"  }}
X-HAPP-Signature: sha256=a1b2c3…

Minimal schema

Required fields: sender_id and text. Optional: sender_name, metadata — your arbitrary data, HAPP passes it back in the reply.

HMAC-SHA256 signature

HAPP adds an X-HAPP-Signature header with an HMAC-SHA256 signature of the request body. Verify on your side to prevent spoofing.

Automatic retries

If the outgoing endpoint returns an error or doesn't respond within 10 seconds, HAPP retries 3 times with exponential backoff.

Common errors

What to do if it won't connect

Every error has a specific cause — find yours and fix it in under a minute.

?

Support

Can't find your error?

Our support team will sort out your situation individually — message us on Telegram.

Contact support
X-HAPP-Signature✗ invalid

Received

sha256=a1b2c3d4e5f6…

Computed from secret

●●●●●●●●●●●●●

HMAC_MISMATCH

Signature

Request signature mismatch

Make sure you compute HMAC-SHA256 from the request body (not the URL) using the correct secret from HAPP settings.

request.json
422
{
"text":"Hello"
"sender_id"required
}

Payload

Invalid JSON or missing fields

Make sure the request body is valid JSON and contains required fields sender_id and text. Content-Type must be application/json.

POST /webhooktimeout
Response time10.0s
0s5s10s
No response received

Timeout

Outgoing endpoint timed out

HAPP waits 10 seconds for a response. If the endpoint is slow — optimize your handler or return HTTP 200 immediately and process asynchronously.

Endpoint URL
http://api.site…
https://api.site…

SSL

Outgoing endpoint requires HTTPS

HAPP only sends replies to HTTPS addresses. Install a TLS certificate on your server or use a reverse proxy (nginx, Caddy).

Request rate429
limit 100

Rate limit

Incoming request rate limit exceeded

Custom Messenger accepts up to 100 incoming messages per second per channel. Add a queue on your platform side for even load distribution.

Outbound delivery503
HAPP
your server
connect ECONNREFUSED https://api…

Endpoint

Outgoing endpoint unreachable

HAPP cannot reach your outgoing endpoint. Check that the server is running, the port is open, and the URL is accessible from the internet.

Integration management

Disconnecting and reconnecting

What happens to your data and how to properly disconnect or restore the Custom Messenger channel.

Disconnect

How to disconnect the channel

Three steps — the channel stops, your data stays.

  1. 1Go to HAPP → Integrations → Custom Messenger.
  2. 2Click Disconnect next to the channel name.
  3. 3Confirm the action in the dialog.

What happens after disconnecting

  • Incoming Webhook URL will stop accepting requests
  • Outgoing endpoint will no longer receive replies
  • Webhook URL can be reactivated at any time
  • Request log and conversations are preserved in HAPP

Reconnect

How to reconnect the channel

Re-activate — all settings and data are preserved.

  1. 1Go to HAPP → Integrations → Custom Messenger.
  2. 2Click Connect and confirm the outgoing endpoint.
  3. 3Click Test connection — the channel is ready.

What is preserved after reconnecting

  • Incoming Webhook URL stays the same
  • All channel settings and HMAC secret
  • Request log and full conversation history
  • Assistant and filter settings
Frequently asked questions

FAQ

Answers to the most common questions about Custom Messenger integration.

What fields are required in the incoming request?

Required: sender_id (string — unique sender ID in your system) and text (string — message text). Optional: sender_name (display name), metadata (object — arbitrary data, HAPP returns it in the reply).

What does HAPP send to the outgoing endpoint?

A POST request with JSON: { "to": "<sender_id>", "text": "<AI reply>", "channel_id": "<channel id>", "metadata": <your metadata> }. The X-HAPP-Signature header contains the HMAC-SHA256 signature of the request body.

How do I verify the HMAC-SHA256 signature?

Compute HMAC-SHA256 from the request body (raw bytes) using the HMAC secret from HAPP channel settings. Compare the hex result with the X-HAPP-Signature header value. Use constant-time comparison to avoid timing attacks.

How many channels can I connect?

The number of Custom Messenger channels is unlimited. Each channel gets its own Incoming Webhook URL, HMAC secret, and can have its own assistant or operator team.

Are media files (images, files) supported?

Yes. Pass an attachments field in the incoming request — an array of objects with type (image/file/audio) and url. HAPP passes media to the assistant and stores it in the conversation log.

What happens if my endpoint returns an error?

If the outgoing endpoint returns HTTP 4xx or 5xx or doesn't respond within 10 seconds — HAPP retries 3 more times at 5, 15, and 60 second intervals. All failed attempts are logged.

How do I test the integration locally?

Use ngrok or Cloudflare Tunnel to get a public HTTPS URL for your local server. After connecting, use the Send test button in HAPP channel settings — HAPP will send a real request to your endpoint.

Ready to connect
your custom channel?

+380

We use cookies to analyze site traffic and improve your experience. Privacy Policy