Developers

Developers

HelpWell developer docs

Connect your app to HelpWell: send contacts on signup, keep custom fields current, track events, collect subscriptions with consent and identify people in the chat widget.

#Quick start

  1. Create an API key. In HelpWell open Settings → API keys → Create API key (owners and admins). Choose the scopes and products it may use. The key (hwk_…) is shown once.
  2. Set three environment variables on your server. Paste the key yourself into your host's secret settings; never put it in code, a browser bundle or a chat.
HELPWELL_API_URL=https://app.helpwell.ai/api/v1
HELPWELL_PRODUCT_ID=<your product id, shown on Settings → API keys>
HELPWELL_API_KEY=<paste the key into your secret manager>
  1. Send your first contact.
curl -X POST "$HELPWELL_API_URL/contacts" \
  -H "Authorization: Bearer $HELPWELL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: signup-user_123" \
  -d '{
  "productId": "'"$HELPWELL_PRODUCT_ID"'",
  "externalId": "user_123",
  "email": "ada@example.com",
  "name": "Ada Lovelace",
  "attributes": {
    "plan": "trial"
  }
}'
// env: your server runtime’s environment (process.env, Deno.env, a Worker’s env).
const response = await fetch(`${env.HELPWELL_API_URL}/contacts`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${env.HELPWELL_API_KEY}`,
    'Content-Type': 'application/json',
    'Idempotency-Key': 'signup-user_123',
  },
  body: JSON.stringify({
    productId: env.HELPWELL_PRODUCT_ID,
    externalId: 'user_123',
    email: 'ada@example.com',
    name: 'Ada Lovelace',
    attributes: { plan: 'trial' },
  }),
});
const data = await response.json();
if (!response.ok) throw new Error(`HelpWell: ${data.error.code}`);
const response = await fetch(`${process.env.HELPWELL_API_URL}/contacts`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.HELPWELL_API_KEY}`,
    'Content-Type': 'application/json',
    'Idempotency-Key': 'signup-user_123',
  },
  body: JSON.stringify({
    productId: process.env.HELPWELL_PRODUCT_ID,
    externalId: 'user_123',
    email: 'ada@example.com',
    name: 'Ada Lovelace',
    attributes: { plan: 'trial' },
  }),
});
const data = await response.json();
if (!response.ok)
  throw new Error(`HelpWell ${response.status} ${data.error.code}: ${data.error.message} (${data.requestId})`);
import os

import requests

response = requests.post(
    f"{os.environ['HELPWELL_API_URL']}/contacts",
    headers={
        "Authorization": f"Bearer {os.environ['HELPWELL_API_KEY']}",
        "Idempotency-Key": "signup-user_123",
    },
    json={
        "productId": os.environ["HELPWELL_PRODUCT_ID"],
        "externalId": "user_123",
        "email": "ada@example.com",
        "name": "Ada Lovelace",
        "attributes": {"plan": "trial"},
    },
    timeout=10,
)
response.raise_for_status()
data = response.json()

The person appears in Contacts with the field plan. Nobody is subscribed to email until they ask (Newsletter and form subscriptions).

Server to server only

The API sends no CORS headers and a key must never reach browser JavaScript, a mobile app or a public repository. The chat widget uses its own signed identity instead (Identify widget visitors).

#Base URL

All endpoints live under https://app.helpwell.ai/api/v1. Requests and answers are JSON; timestamps are ISO 8601. The OpenAPI 3.1 description is at https://developers.helpwell.ai/openapi.json (also https://app.helpwell.ai/api/v1/openapi.json), for client generators and API tools.

#Using an AI coding agent?

Settings → API keys and the widget's Install page have Wire this website to HelpWell: one Agent Instruction that adds the widget with signed identity, syncs signups and contacts, tracks key events and submits forms through this API. It names the environment variables and never contains a key.

Guides