Developers

API reference

REST API v1

Every endpoint of the HelpWell REST API v1 with request and response examples, authentication, errors, rate limits, idempotency and the workspace selector. Base URL: https://app.helpwell.ai/api/v1.

#Authentication

Send a workspace API key as a bearer token on every request:

Authorization: Bearer hwk_…
Content-Type: application/json

Create keys in Settings → API keys (owners and admins). Each key has a name, scopes, the products it may use (every product, including later ones, or a chosen list), an optional expiry (30, 90 or 365 days) and a rate limit (60 to 3,000 requests a minute, 600 by default). HelpWell stores only a hash and shows the first 12 characters afterwards. A workspace can hold 50 active keys; revoking one takes effect at once. Creating, granting and revoking keys, and every consent change, double opt-in, form subscription and deletion made with a key, are in the audit log.

ScopeAllows
contacts:readLook up contacts and their tags.
contacts:writeCreate and update contacts, tags, attributes and consent.
contacts:deletePermanently delete a contact and everything about them.
events:writeRecord events for journeys.
forms:writeSend form submissions.
segments:readList saved segments.
campaigns:readList newsletters and their status.
knowledge:readRead every help article and the screenshots articles may use.
knowledge:writeSend new and updated articles for review (or publishing, when the product says so) and screenshots, as a coding agent does.

A key belongs to the workspace, not to the person who created it: it keeps working when they leave, until it is revoked or expires.

#Workspaces

A key acts in its own workspace. An owner or admin of several workspaces can also grant a key access to the others (Settings → API keys → Workspaces), each with its own scopes and products. Name the workspace a request is about with a header, or the workspace query parameter:

HelpWell-Workspace: <workspace id>

Without it the request acts in the key's home workspace. A workspace the key cannot reach answers 403 workspace_not_allowed; header and query naming different workspaces answer 400 workspace_conflict. Each workspace's owners and admins can remove the key's access to their workspace.

#Products and contacts

For a pre-account funnel lead, POST /contacts accepts prospectId instead of externalId or sourceId. This creates a CRM contact without an authenticated app identity. New prospects require explicit consent or double opt-in before marketing email. Save the returned contact.id for events. A later verified account with the same email retains that contact, consent and history. Delayed prospect updates still reach it through the saved identity alias.

productId is required when the key can use more than one product; otherwise the key's only product is used. Contacts belong to a product. Name a contact with one of contactId (HelpWell's id), externalId (your stable user id; the widget identity's sub), sourceId (a product on its own install: its contact id) or email (when exactly one contact in the product has it). A contact's custom fields are in attributes (Custom fields).

#Idempotency

Every POST and DELETE accepts an Idempotency-Key header: 1 to 200 visible ASCII characters, unique per logical write (signup-user_123). The first answer is kept for 24 hours and a retry with the same key and body gets it again, with Idempotent-Replayed: true. The same key with a different body is refused with 422 idempotency_mismatch; while the first request still runs a repeat gets 409 idempotency_in_progress with Retry-After: 1. Rate limits and server errors are not kept, so their retry runs again.

#Rate limits

Every answer carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset (Unix seconds). Over the limit: 429 rate_limited with Retry-After. Limits are per key, across all of its workspaces. Requests with a wrong key count against the calling address, which is refused for a while after 30 in ten minutes.

#Errors

Every error has the same shape, and every answer an X-Request-Id header that errors repeat as requestId:

{ "error": { "code": "insufficient_scope", "message": "This API key needs the contacts:write scope.", "details": { "required": "contacts:write" } }, "requestId": "req_…" }
StatusCodesRetry?
400validation_failed (with details per field), invalid_json, product_required, contact_required, reserved_event, reserved_field, event_too_large, consent_timestamp_required, consent_in_future, email_required, conflicting_consent, invalid_idempotency_key, workspace_conflict, selection_required and invalid_selection (bulk consent)No, fix the request
401unauthorized: missing, unknown, revoked or expired keyNo
402plan_limit: double opt-in needs email marketing (Growth or a trial)After upgrading
403insufficient_scope, product_not_allowed, workspace_not_allowed, workspace_inactive (subscription needs attention; reads still work)No
404not_found, contact_not_foundNo
405method_not_allowedNo
409conflict (an email that belongs to another verified identity), ambiguous_contact, opted_out, suppressed, field_type_locked, selection_changed (bulk consent: the selection no longer has expected contacts), idempotency_in_progressOnly idempotency_in_progress
415unsupported_media_typeNo
422idempotency_mismatchNo, use a new key
429rate_limitedYes, after Retry-After
5xxinternalYes, with backoff and the same Idempotency-Key

#Limits

WhatLimit
Request body512 KB
Requests per key60 to 3,000 a minute (600 by default)
Refused requests per address30 in ten minutes
Active keys per workspace50
Idempotency answers kept24 hours
Custom fields per write100
Tags per contact100, 40 characters each
Event data50 keys, 8 KB
Form fields32 KB

#Not in v1

  • Transactional email. Workspaces send support replies and marketing through their own Resend streams; the API does not send email. Send account email from your own provider.
  • Creating audiences, newsletters, journeys or conversations: use the app, or the MCP server for AI assistants.
  • The product bridge (/bridge/:productId/:action) for a HelpWell install connected to Cloud keeps working with its connection token; new integrations should use this API.

Contacts

GET/contactscontacts:read

Find contacts by email, externalId or sourceId

Query parameters

  • productIdstring

    Required when the key can use more than one product.

  • emailstring

    An email address.

  • externalIdstring

    Your stable user id (hosted products).

  • sourceIdstring

    A product on its own install: its contact id.

Headers

  • HelpWell-Workspacestring

    The workspace id to act in. Default: the key’s own workspace. Only for a key that was granted access to other workspaces (Settings → API keys); otherwise 403 workspace_not_allowed. The workspace query parameter does the same.

Answers

  • 200
  • 400
  • 401
  • 403
  • 429

Request

curl "$HELPWELL_API_URL/contacts?email=ada%40example.com" \
  -H "Authorization: Bearer $HELPWELL_API_KEY"
// env: your server runtime’s environment (process.env, Deno.env, a Worker’s env).
const response = await fetch(`${env.HELPWELL_API_URL}/contacts?email=ada%40example.com`, {
  headers: {
    Authorization: `Bearer ${env.HELPWELL_API_KEY}`,
  },
});
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?email=ada%40example.com`, {
  headers: {
    Authorization: `Bearer ${process.env.HELPWELL_API_KEY}`,
  },
});
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.get(
    f"{os.environ['HELPWELL_API_URL']}/contacts",
    params={"email": "ada@example.com"},
    headers={
        "Authorization": f"Bearer {os.environ['HELPWELL_API_KEY']}",
    },
    timeout=10,
)
response.raise_for_status()
data = response.json()

Response 200

{
  "data": [
    {
      "id": "6f1c2b8e-3d4a-4f5b-9c7d-2a1e0b9f8c3d",
      "productId": "prd_7d2f19c4",
      "sourceId": "con_01JBW3Q8M2",
      "email": "ada@example.com",
      "name": "Ada Lovelace",
      "consent": {
        "status": "unknown",
        "source": null,
        "at": null
      },
      "tags": [
        "app-user"
      ],
      "attributes": {
        "plan": "trial",
        "seats": 3,
        "trial_ends": "2026-11-01"
      },
      "createdAt": "2026-10-05T14:03:11.000Z",
      "updatedAt": "2026-10-05T14:03:11.000Z"
    }
  ]
}
POST/contactscontacts:write

Create or update a contact

Creates or updates the contact for externalId (hosted products) or sourceId (a product on its own install). Attributes merge and null removes one. Never subscribes anyone by itself: send subscribe for a double opt-in email, or consent for a choice the person made that you recorded.

Body

  • productIdstring

    Required when the key can use more than one product.

  • externalIdstring

    Your stable user id; the same as the widget identity’s sub. At most 200 characters.

  • sourceIdstring

    For a product on its own install: its contact id. At most 150 characters.

  • prospectIdstring

    Stable pre-account lead id. Use the returned contact.id for events. A later account with the same email preserves this contact and its history. At most 140 characters.

  • emailstring

    An email address.

  • namestring

    At most 200 characters.

  • attributesobject

    Custom fields: strings, numbers, booleans or lists of strings; null removes one. Up to 100.

  • tagsobject
  • tags.addstring[]

    At most 100 items.

  • tags.removestring[]

    At most 100 items.

  • subscribeobject

    Send a double opt-in confirmation email. Needs email marketing.

  • subscribe.method"double_opt_in"Required
  • subscribe.consentTextstring

    The words beside the box they ticked. At most 1000 characters.

  • consentobject

    A choice the person made that you recorded. Subscribing needs when they agreed; existing opt-outs and suppressions always win.

  • consent.statusstringRequired

    One of subscribed, unsubscribed.

  • consent.sourcestringRequired

    Where they made the choice. At most 200 characters.

  • consent.timestampstring

    When they made it. Required to subscribe. Format: date-time.

  • consent.textstring

    The wording they agreed to. At most 1000 characters.

  • phonestring

    A mobile number in E.164 form, like +15551234567. Ten-digit numbers are taken as US numbers. At most 40 characters.

  • smsConsentobject

    Express consent to journey texts for this product, recorded with the exact words they agreed to. A phone number alone is never consent. STOP always wins.

  • smsConsent.statusstringRequired

    One of subscribed, unsubscribed.

  • smsConsent.textstring

    The exact consent words beside the box they ticked. Required to subscribe. At most 2000 characters.

  • smsConsent.versionstring

    Your version of that wording. At most 100 characters.

  • smsConsent.sourcestring

    Where they agreed, such as signup-form. At most 100 characters.

  • smsConsent.timestampstring

    When they agreed. Defaults to now. Format: date-time.

Headers

  • Idempotency-Keystring

    A unique value per logical write (1 to 200 visible ASCII characters). A retry with the same key and body gets the first answer for 24 hours; the same key with another body is refused with 422. At most 200 characters.

  • HelpWell-Workspacestring

    The workspace id to act in. Default: the key’s own workspace. Only for a key that was granted access to other workspaces (Settings → API keys); otherwise 403 workspace_not_allowed. The workspace query parameter does the same.

Answers

  • 200
  • 400
  • 401
  • 402
  • 403
  • 404
  • 409
  • 422
  • 429

Request

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",
  "tags": {
    "add": [
      "app-user"
    ]
  },
  "attributes": {
    "plan": "trial",
    "seats": 3,
    "trial_ends": "2026-11-01"
  }
}'
// 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',
    tags: { add: ['app-user'] },
    attributes: { plan: 'trial', seats: 3, trial_ends: '2026-11-01' },
  }),
});
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',
    tags: { add: ['app-user'] },
    attributes: { plan: 'trial', seats: 3, trial_ends: '2026-11-01' },
  }),
});
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",
        "tags": {"add": ["app-user"]},
        "attributes": {"plan": "trial", "seats": 3, "trial_ends": "2026-11-01"},
    },
    timeout=10,
)
response.raise_for_status()
data = response.json()

Response 200

{
  "contact": {
    "id": "6f1c2b8e-3d4a-4f5b-9c7d-2a1e0b9f8c3d",
    "productId": "prd_7d2f19c4",
    "sourceId": "con_01JBW3Q8M2",
    "email": "ada@example.com",
    "name": "Ada Lovelace",
    "consent": {
      "status": "unknown",
      "source": null,
      "at": null
    },
    "tags": [
      "app-user"
    ],
    "attributes": {
      "plan": "trial",
      "seats": 3,
      "trial_ends": "2026-11-01"
    },
    "createdAt": "2026-10-05T14:03:11.000Z",
    "updatedAt": "2026-10-05T14:03:11.000Z"
  }
}
POST/contacts/consentcontacts:write

Set marketing consent for many contacts

Sets marketing consent for contacts named by contactIds, emails or a saved segmentId (optionally one productId), with the source where they agreed or asked to stop. Subscribing never overrides an unsubscribe, a bounce, a spam complaint or a suppression: those contacts are skipped and counted in skipped. Automations triggered by Subscribed start only with startAutomations: true. Unsubscribing suppresses each address. Up to 1,000 contacts finish in the request (200); a larger change runs in the background (202): read its progress with GET /contacts/consent/{jobId}. Send expected to have the request refused (409) if the selection no longer has that many contacts.

Body

  • contactIdsstring[]

    These contacts (HelpWell ids). At most 10000 items.

  • emailsstring[]

    Every contact with one of these addresses. At most 10000 items.

  • segmentIdstring

    Everyone in this saved segment.

  • productIdstring

    Only this product’s contacts.

  • statusstringRequired

    One of subscribed, unsubscribed.

  • sourcestringRequired

    Where these people agreed, or asked to stop. At most 400 characters.

  • startAutomationsboolean

    Start automations triggered by Subscribed for the contacts subscribed.

  • expectedinteger

    Refuse (409) unless the selection has exactly this many contacts.

Headers

  • Idempotency-Keystring

    A unique value per logical write (1 to 200 visible ASCII characters). A retry with the same key and body gets the first answer for 24 hours; the same key with another body is refused with 422. At most 200 characters.

  • HelpWell-Workspacestring

    The workspace id to act in. Default: the key’s own workspace. Only for a key that was granted access to other workspaces (Settings → API keys); otherwise 403 workspace_not_allowed. The workspace query parameter does the same.

Answers

  • 200
  • 202
  • 400
  • 401
  • 403
  • 404
  • 409
  • 422
  • 429

Request

curl -X POST "$HELPWELL_API_URL/contacts/consent" \
  -H "Authorization: Bearer $HELPWELL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: consent-backfill-2026-10" \
  -d '{
  "segmentId": "seg_123",
  "status": "subscribed",
  "source": "Existing customer, opted in at signup",
  "startAutomations": false,
  "expected": 10327
}'
// env: your server runtime’s environment (process.env, Deno.env, a Worker’s env).
const response = await fetch(`${env.HELPWELL_API_URL}/contacts/consent`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${env.HELPWELL_API_KEY}`,
    'Content-Type': 'application/json',
    'Idempotency-Key': 'consent-backfill-2026-10',
  },
  body: JSON.stringify({
    segmentId: 'seg_123',
    status: 'subscribed',
    source: 'Existing customer, opted in at signup',
    startAutomations: false,
    expected: 10327,
  }),
});
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/consent`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.HELPWELL_API_KEY}`,
    'Content-Type': 'application/json',
    'Idempotency-Key': 'consent-backfill-2026-10',
  },
  body: JSON.stringify({
    segmentId: 'seg_123',
    status: 'subscribed',
    source: 'Existing customer, opted in at signup',
    startAutomations: false,
    expected: 10327,
  }),
});
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/consent",
    headers={
        "Authorization": f"Bearer {os.environ['HELPWELL_API_KEY']}",
        "Idempotency-Key": "consent-backfill-2026-10",
    },
    json={
        "segmentId": "seg_123",
        "status": "subscribed",
        "source": "Existing customer, opted in at signup",
        "startAutomations": False,
        "expected": 10327,
    },
    timeout=10,
)
response.raise_for_status()
data = response.json()

Response 200 · Finished

{
  "job": {
    "id": "cj_8d2f…",
    "status": "done",
    "consent": "subscribed",
    "source": "API: Existing customer, opted in at signup · key hwk_ab12cd34",
    "startAutomations": false,
    "total": 10327,
    "processed": 10327,
    "changed": 10100,
    "skipped": [
      {
        "reason": "unsubscribed",
        "label": "unsubscribed earlier",
        "count": 150
      },
      {
        "reason": "bounced",
        "label": "bounced",
        "count": 60
      },
      {
        "reason": "already_subscribed",
        "label": "already subscribed",
        "count": 17
      }
    ],
    "skippedTotal": 227,
    "createdAt": "2026-10-06T18:00:00Z",
    "finishedAt": "2026-10-06T18:02:10Z"
  }
}

Response 202 · Running

{
  "job": {
    "id": "cj_8d2f…",
    "status": "running",
    "consent": "subscribed",
    "source": "API: Existing customer, opted in at signup · key hwk_ab12cd34",
    "startAutomations": false,
    "total": 10327,
    "processed": 500,
    "changed": 488,
    "skipped": [
      {
        "reason": "unsubscribed",
        "label": "unsubscribed earlier",
        "count": 12
      }
    ],
    "skippedTotal": 12,
    "createdAt": "2026-10-06T18:00:00Z",
    "finishedAt": null
  }
}
GET/contacts/consent/{jobId}contacts:read

Get a bulk consent change

A bulk consent change’s progress and outcome: queued, running, done or failed, how many contacts it covers, changed and skipped (by reason).

Path parameters

  • jobIdstringRequired

Headers

  • HelpWell-Workspacestring

    The workspace id to act in. Default: the key’s own workspace. Only for a key that was granted access to other workspaces (Settings → API keys); otherwise 403 workspace_not_allowed. The workspace query parameter does the same.

Answers

  • 200
  • 401
  • 403
  • 404
  • 429

Request

curl "$HELPWELL_API_URL/contacts/consent/$JOB_ID" \
  -H "Authorization: Bearer $HELPWELL_API_KEY"
// env: your server runtime’s environment (process.env, Deno.env, a Worker’s env).
const response = await fetch(`${env.HELPWELL_API_URL}/contacts/consent/${jobId}`, {
  headers: {
    Authorization: `Bearer ${env.HELPWELL_API_KEY}`,
  },
});
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/consent/${jobId}`, {
  headers: {
    Authorization: `Bearer ${process.env.HELPWELL_API_KEY}`,
  },
});
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.get(
    f"{os.environ['HELPWELL_API_URL']}/contacts/consent/{job_id}",
    headers={
        "Authorization": f"Bearer {os.environ['HELPWELL_API_KEY']}",
    },
    timeout=10,
)
response.raise_for_status()
data = response.json()

Response 200

{
  "job": {
    "id": "cj_8d2f…",
    "status": "done",
    "consent": "subscribed",
    "source": "API: Existing customer, opted in at signup · key hwk_ab12cd34",
    "startAutomations": false,
    "total": 10327,
    "processed": 10327,
    "changed": 10100,
    "skipped": [
      {
        "reason": "unsubscribed",
        "label": "unsubscribed earlier",
        "count": 150
      },
      {
        "reason": "bounced",
        "label": "bounced",
        "count": 60
      },
      {
        "reason": "already_subscribed",
        "label": "already subscribed",
        "count": 17
      }
    ],
    "skippedTotal": 227,
    "createdAt": "2026-10-06T18:00:00Z",
    "finishedAt": "2026-10-06T18:02:10Z"
  }
}
GET/contacts/{contactId}contacts:read

Get a contact

Path parameters

  • contactIdstringRequired

Headers

  • HelpWell-Workspacestring

    The workspace id to act in. Default: the key’s own workspace. Only for a key that was granted access to other workspaces (Settings → API keys); otherwise 403 workspace_not_allowed. The workspace query parameter does the same.

Answers

  • 200
  • 401
  • 403
  • 404
  • 429

Request

curl "$HELPWELL_API_URL/contacts/$CONTACT_ID" \
  -H "Authorization: Bearer $HELPWELL_API_KEY"
// env: your server runtime’s environment (process.env, Deno.env, a Worker’s env).
const response = await fetch(`${env.HELPWELL_API_URL}/contacts/${contactId}`, {
  headers: {
    Authorization: `Bearer ${env.HELPWELL_API_KEY}`,
  },
});
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/${contactId}`, {
  headers: {
    Authorization: `Bearer ${process.env.HELPWELL_API_KEY}`,
  },
});
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.get(
    f"{os.environ['HELPWELL_API_URL']}/contacts/{contact_id}",
    headers={
        "Authorization": f"Bearer {os.environ['HELPWELL_API_KEY']}",
    },
    timeout=10,
)
response.raise_for_status()
data = response.json()

Response 200

{
  "contact": {
    "id": "6f1c2b8e-3d4a-4f5b-9c7d-2a1e0b9f8c3d",
    "productId": "prd_7d2f19c4",
    "sourceId": "con_01JBW3Q8M2",
    "email": "ada@example.com",
    "name": "Ada Lovelace",
    "consent": {
      "status": "unknown",
      "source": null,
      "at": null
    },
    "tags": [
      "app-user"
    ],
    "attributes": {
      "plan": "trial",
      "seats": 3,
      "trial_ends": "2026-11-01"
    },
    "createdAt": "2026-10-05T14:03:11.000Z",
    "updatedAt": "2026-10-05T14:03:11.000Z"
  }
}
DELETE/contacts/{contactId}contacts:delete

Permanently delete a contact

Deletes the contact and everything about them, as Contacts → Delete contact does. An unsubscribe or bounce is kept only as a salted hash.

Path parameters

  • contactIdstringRequired

Headers

  • Idempotency-Keystring

    A unique value per logical write (1 to 200 visible ASCII characters). A retry with the same key and body gets the first answer for 24 hours; the same key with another body is refused with 422. At most 200 characters.

  • HelpWell-Workspacestring

    The workspace id to act in. Default: the key’s own workspace. Only for a key that was granted access to other workspaces (Settings → API keys); otherwise 403 workspace_not_allowed. The workspace query parameter does the same.

Answers

  • 200
  • 401
  • 403
  • 404
  • 422
  • 429

Request

curl -X DELETE "$HELPWELL_API_URL/contacts/$CONTACT_ID" \
  -H "Authorization: Bearer $HELPWELL_API_KEY" \
  -H "Idempotency-Key: delete-6f1c2b8e"
// env: your server runtime’s environment (process.env, Deno.env, a Worker’s env).
const response = await fetch(`${env.HELPWELL_API_URL}/contacts/${contactId}`, {
  method: 'DELETE',
  headers: {
    Authorization: `Bearer ${env.HELPWELL_API_KEY}`,
    'Idempotency-Key': 'delete-6f1c2b8e',
  },
});
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/${contactId}`, {
  method: 'DELETE',
  headers: {
    Authorization: `Bearer ${process.env.HELPWELL_API_KEY}`,
    'Idempotency-Key': 'delete-6f1c2b8e',
  },
});
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.delete(
    f"{os.environ['HELPWELL_API_URL']}/contacts/{contact_id}",
    headers={
        "Authorization": f"Bearer {os.environ['HELPWELL_API_KEY']}",
        "Idempotency-Key": "delete-6f1c2b8e",
    },
    timeout=10,
)
response.raise_for_status()
data = response.json()

Response 200

{
  "deleted": true,
  "id": "6f1c2b8e-3d4a-4f5b-9c7d-2a1e0b9f8c3d"
}
GET/contacts/{contactId}/email-statuscontacts:read

Read recent email delivery receipts and address suppression

Returns up to 20 messages, newest first, with provider events and suppression. Optionally restrict messages to one workflow. Provider acceptance is distinct from delivery, opens and bounces. Message bodies and private links are not returned.

Path parameters

  • contactIdstringRequired

Query parameters

  • workflowIdstring

Headers

  • HelpWell-Workspacestring

    The workspace id to act in. Default: the key’s own workspace. Only for a key that was granted access to other workspaces (Settings → API keys); otherwise 403 workspace_not_allowed. The workspace query parameter does the same.

Answers

  • 200
  • 401
  • 403
  • 404
  • 429

Request

curl "$HELPWELL_API_URL/contacts/$CONTACT_ID/email-status" \
  -H "Authorization: Bearer $HELPWELL_API_KEY"
// env: your server runtime’s environment (process.env, Deno.env, a Worker’s env).
const response = await fetch(`${env.HELPWELL_API_URL}/contacts/${contactId}/email-status`, {
  headers: {
    Authorization: `Bearer ${env.HELPWELL_API_KEY}`,
  },
});
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/${contactId}/email-status`, {
  headers: {
    Authorization: `Bearer ${process.env.HELPWELL_API_KEY}`,
  },
});
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.get(
    f"{os.environ['HELPWELL_API_URL']}/contacts/{contact_id}/email-status",
    headers={
        "Authorization": f"Bearer {os.environ['HELPWELL_API_KEY']}",
    },
    timeout=10,
)
response.raise_for_status()
data = response.json()

Response 200

{
  "contactId": "6f1c2b8e-3d4a-4f5b-9c7d-2a1e0b9f8c3d",
  "checkedAt": "2026-10-23T16:00:00Z",
  "suppression": null,
  "messages": []
}
POST/contacts/{contactId}/tagscontacts:write

Add and remove tags

Path parameters

  • contactIdstringRequired

Body

  • addstring[]

    Tags to add. At most 100 items.

  • removestring[]

    Tags to remove. At most 100 items.

Headers

  • Idempotency-Keystring

    A unique value per logical write (1 to 200 visible ASCII characters). A retry with the same key and body gets the first answer for 24 hours; the same key with another body is refused with 422. At most 200 characters.

  • HelpWell-Workspacestring

    The workspace id to act in. Default: the key’s own workspace. Only for a key that was granted access to other workspaces (Settings → API keys); otherwise 403 workspace_not_allowed. The workspace query parameter does the same.

Answers

  • 200
  • 400
  • 401
  • 403
  • 404
  • 422
  • 429

Request

curl -X POST "$HELPWELL_API_URL/contacts/$CONTACT_ID/tags" \
  -H "Authorization: Bearer $HELPWELL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: tags-6f1c2b8e-beta" \
  -d '{
  "add": [
    "beta"
  ],
  "remove": [
    "trial"
  ]
}'
// env: your server runtime’s environment (process.env, Deno.env, a Worker’s env).
const response = await fetch(`${env.HELPWELL_API_URL}/contacts/${contactId}/tags`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${env.HELPWELL_API_KEY}`,
    'Content-Type': 'application/json',
    'Idempotency-Key': 'tags-6f1c2b8e-beta',
  },
  body: JSON.stringify({ add: ['beta'], remove: ['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/${contactId}/tags`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.HELPWELL_API_KEY}`,
    'Content-Type': 'application/json',
    'Idempotency-Key': 'tags-6f1c2b8e-beta',
  },
  body: JSON.stringify({ add: ['beta'], remove: ['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/{contact_id}/tags",
    headers={
        "Authorization": f"Bearer {os.environ['HELPWELL_API_KEY']}",
        "Idempotency-Key": "tags-6f1c2b8e-beta",
    },
    json={"add": ["beta"], "remove": ["trial"]},
    timeout=10,
)
response.raise_for_status()
data = response.json()

Response 200

{
  "contact": {
    "id": "6f1c2b8e-3d4a-4f5b-9c7d-2a1e0b9f8c3d",
    "productId": "prd_7d2f19c4",
    "sourceId": "con_01JBW3Q8M2",
    "email": "ada@example.com",
    "name": "Ada Lovelace",
    "consent": {
      "status": "unknown",
      "source": null,
      "at": null
    },
    "tags": [
      "app-user",
      "beta"
    ],
    "attributes": {
      "plan": "trial",
      "seats": 3,
      "trial_ends": "2026-11-01"
    },
    "createdAt": "2026-10-05T14:03:11.000Z",
    "updatedAt": "2026-10-05T14:03:11.000Z"
  }
}

Events

POST/eventsevents:write

Track an event

Records something a contact did. Known product telemetry names (page.visited, login.succeeded, article.viewed and the like) are kept as they are; any other name is a custom event that journeys, goals and segments match by name. Billing, email, form and journey names are reserved. Events can start active journeys.

Body

  • productIdstring

    Required when the key can use more than one product.

  • contactIdstring
  • externalIdstring
  • sourceIdstring
  • emailstring

    An email address.

  • idstring

    A stable id for this occurrence; a repeat is recorded once. Pattern ^[A-Za-z0-9_.:-]{1,100}$.

  • namestringRequired

    Pattern ^[A-Za-z][A-Za-z0-9_.:-]{0,79}$.

  • dataobject

    Up to 50 keys and 8 KB of JSON.

Headers

  • Idempotency-Keystring

    A unique value per logical write (1 to 200 visible ASCII characters). A retry with the same key and body gets the first answer for 24 hours; the same key with another body is refused with 422. At most 200 characters.

  • HelpWell-Workspacestring

    The workspace id to act in. Default: the key’s own workspace. Only for a key that was granted access to other workspaces (Settings → API keys); otherwise 403 workspace_not_allowed. The workspace query parameter does the same.

Answers

  • 200
  • 201
  • 400
  • 401
  • 403
  • 404
  • 409
  • 422
  • 429

Request

curl -X POST "$HELPWELL_API_URL/events" \
  -H "Authorization: Bearer $HELPWELL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "productId": "'"$HELPWELL_PRODUCT_ID"'",
  "externalId": "user_123",
  "name": "project_created",
  "id": "project-981",
  "data": {
    "template": "blank",
    "collaborators": 2
  }
}'
// env: your server runtime’s environment (process.env, Deno.env, a Worker’s env).
const response = await fetch(`${env.HELPWELL_API_URL}/events`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${env.HELPWELL_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    productId: env.HELPWELL_PRODUCT_ID,
    externalId: 'user_123',
    name: 'project_created',
    id: 'project-981',
    data: { template: 'blank', collaborators: 2 },
  }),
});
const data = await response.json();
if (!response.ok) throw new Error(`HelpWell: ${data.error.code}`);
const response = await fetch(`${process.env.HELPWELL_API_URL}/events`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.HELPWELL_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    productId: process.env.HELPWELL_PRODUCT_ID,
    externalId: 'user_123',
    name: 'project_created',
    id: 'project-981',
    data: { template: 'blank', collaborators: 2 },
  }),
});
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']}/events",
    headers={
        "Authorization": f"Bearer {os.environ['HELPWELL_API_KEY']}",
    },
    json={
        "productId": os.environ["HELPWELL_PRODUCT_ID"],
        "externalId": "user_123",
        "name": "project_created",
        "id": "project-981",
        "data": {"template": "blank", "collaborators": 2},
    },
    timeout=10,
)
response.raise_for_status()
data = response.json()

Response 201 · Recorded

{
  "event": {
    "id": "project-981",
    "name": "project_created",
    "contactId": "6f1c2b8e-3d4a-4f5b-9c7d-2a1e0b9f8c3d",
    "duplicate": false
  }
}

Forms

POST/forms/submitforms:write

Submit a form

A form on your site, verified by your server. HelpWell applies its form rules: a ticked consent box on a form with double opt-in (the default) sends a confirmation email, and nobody is subscribed until they confirm.

Body

  • productIdstring

    Required when the key can use more than one product.

  • idstring

    A stable id for this submission. Pattern ^[A-Za-z0-9_.:-]{1,120}$.

  • formIdstringRequired

    Pattern ^[A-Za-z0-9_.:-]{1,120}$.

  • formNamestringRequired

    At most 200 characters.

  • formTypestring

    contact, newsletter, lead_magnet, waitlist, webinar, feedback, custom and so on. Pattern ^[a-z_]{1,40}$.

  • emailstringRequired

    An email address.

  • namestring
  • externalIdstring
  • sourceIdstring
  • fieldsobject
  • attributesobject
  • consentobject
  • consent.statestringRequired

    One of granted, denied, none.

  • consent.textstring or null

    At most 2000 characters.

  • pageobject
  • page.urlstring
  • page.pathstring
  • referrerstring
  • utmobject
  • submittedAtstring

    Format: date-time.

Headers

  • Idempotency-Keystring

    A unique value per logical write (1 to 200 visible ASCII characters). A retry with the same key and body gets the first answer for 24 hours; the same key with another body is refused with 422. At most 200 characters.

  • HelpWell-Workspacestring

    The workspace id to act in. Default: the key’s own workspace. Only for a key that was granted access to other workspaces (Settings → API keys); otherwise 403 workspace_not_allowed. The workspace query parameter does the same.

Answers

  • 200
  • 201
  • 400
  • 401
  • 403
  • 404
  • 409
  • 422
  • 429

Request

curl -X POST "$HELPWELL_API_URL/forms/submit" \
  -H "Authorization: Bearer $HELPWELL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: form-7f3a91" \
  -d '{
  "productId": "'"$HELPWELL_PRODUCT_ID"'",
  "formId": "newsletter",
  "formName": "Newsletter",
  "formType": "newsletter",
  "email": "ada@example.com",
  "name": "Ada Lovelace",
  "consent": {
    "state": "granted",
    "text": "Email me product news. Unsubscribe any time."
  },
  "page": {
    "url": "https://example.com/blog"
  }
}'
// env: your server runtime’s environment (process.env, Deno.env, a Worker’s env).
const response = await fetch(`${env.HELPWELL_API_URL}/forms/submit`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${env.HELPWELL_API_KEY}`,
    'Content-Type': 'application/json',
    'Idempotency-Key': 'form-7f3a91',
  },
  body: JSON.stringify({
    productId: env.HELPWELL_PRODUCT_ID,
    formId: 'newsletter',
    formName: 'Newsletter',
    formType: 'newsletter',
    email: 'ada@example.com',
    name: 'Ada Lovelace',
    consent: {
      state: 'granted',
      text: 'Email me product news. Unsubscribe any time.',
    },
    page: { url: 'https://example.com/blog' },
  }),
});
const data = await response.json();
if (!response.ok) throw new Error(`HelpWell: ${data.error.code}`);
const response = await fetch(`${process.env.HELPWELL_API_URL}/forms/submit`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.HELPWELL_API_KEY}`,
    'Content-Type': 'application/json',
    'Idempotency-Key': 'form-7f3a91',
  },
  body: JSON.stringify({
    productId: process.env.HELPWELL_PRODUCT_ID,
    formId: 'newsletter',
    formName: 'Newsletter',
    formType: 'newsletter',
    email: 'ada@example.com',
    name: 'Ada Lovelace',
    consent: {
      state: 'granted',
      text: 'Email me product news. Unsubscribe any time.',
    },
    page: { url: 'https://example.com/blog' },
  }),
});
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']}/forms/submit",
    headers={
        "Authorization": f"Bearer {os.environ['HELPWELL_API_KEY']}",
        "Idempotency-Key": "form-7f3a91",
    },
    json={
        "productId": os.environ["HELPWELL_PRODUCT_ID"],
        "formId": "newsletter",
        "formName": "Newsletter",
        "formType": "newsletter",
        "email": "ada@example.com",
        "name": "Ada Lovelace",
        "consent": {
            "state": "granted",
            "text": "Email me product news. Unsubscribe any time.",
        },
        "page": {"url": "https://example.com/blog"},
    },
    timeout=10,
)
response.raise_for_status()
data = response.json()

Response 201 · Received

{
  "submission": {
    "id": "sub_4c1d2e",
    "status": "confirmation_sent",
    "duplicate": false
  },
  "contactId": "6f1c2b8e-3d4a-4f5b-9c7d-2a1e0b9f8c3d"
}

Segments

GET/segmentssegments:read

List saved segments

Headers

  • HelpWell-Workspacestring

    The workspace id to act in. Default: the key’s own workspace. Only for a key that was granted access to other workspaces (Settings → API keys); otherwise 403 workspace_not_allowed. The workspace query parameter does the same.

Answers

  • 200
  • 401
  • 403
  • 429

Request

curl "$HELPWELL_API_URL/segments" \
  -H "Authorization: Bearer $HELPWELL_API_KEY"
// env: your server runtime’s environment (process.env, Deno.env, a Worker’s env).
const response = await fetch(`${env.HELPWELL_API_URL}/segments`, {
  headers: {
    Authorization: `Bearer ${env.HELPWELL_API_KEY}`,
  },
});
const data = await response.json();
if (!response.ok) throw new Error(`HelpWell: ${data.error.code}`);
const response = await fetch(`${process.env.HELPWELL_API_URL}/segments`, {
  headers: {
    Authorization: `Bearer ${process.env.HELPWELL_API_KEY}`,
  },
});
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.get(
    f"{os.environ['HELPWELL_API_URL']}/segments",
    headers={
        "Authorization": f"Bearer {os.environ['HELPWELL_API_KEY']}",
    },
    timeout=10,
)
response.raise_for_status()
data = response.json()

Response 200

{
  "data": [
    {
      "id": "seg_trials",
      "name": "Active trials",
      "count": 182,
      "createdAt": "2026-09-12T09:30:00.000Z"
    }
  ]
}

Newsletters

GET/campaignscampaigns:read

List newsletters (read-only)

Query parameters

  • statusstring

    One of draft, ready, scheduled, sending, sent, cancelled.

Headers

  • HelpWell-Workspacestring

    The workspace id to act in. Default: the key’s own workspace. Only for a key that was granted access to other workspaces (Settings → API keys); otherwise 403 workspace_not_allowed. The workspace query parameter does the same.

Answers

  • 200
  • 400
  • 401
  • 403
  • 429

Request

curl "$HELPWELL_API_URL/campaigns?status=sent" \
  -H "Authorization: Bearer $HELPWELL_API_KEY"
// env: your server runtime’s environment (process.env, Deno.env, a Worker’s env).
const response = await fetch(`${env.HELPWELL_API_URL}/campaigns?status=sent`, {
  headers: {
    Authorization: `Bearer ${env.HELPWELL_API_KEY}`,
  },
});
const data = await response.json();
if (!response.ok) throw new Error(`HelpWell: ${data.error.code}`);
const response = await fetch(`${process.env.HELPWELL_API_URL}/campaigns?status=sent`, {
  headers: {
    Authorization: `Bearer ${process.env.HELPWELL_API_KEY}`,
  },
});
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.get(
    f"{os.environ['HELPWELL_API_URL']}/campaigns",
    params={"status": "sent"},
    headers={
        "Authorization": f"Bearer {os.environ['HELPWELL_API_KEY']}",
    },
    timeout=10,
)
response.raise_for_status()
data = response.json()

Response 200

{
  "data": [
    {
      "id": "cmp_october",
      "name": "October product news",
      "status": "sent",
      "productId": "prd_7d2f19c4",
      "subject": "What shipped in October",
      "scheduledAt": "2026-10-01T15:00:00.000Z",
      "createdAt": "2026-09-28T11:12:00.000Z",
      "recipients": 4210
    }
  ]
}

Fields

GET/fieldscontacts:read

List contact fields

Every contact field in the workspace: HelpWell’s own, the ones your app sends or defined in Settings → Fields and events, and the read-only ones Stripe and enrichment keep. set says where POST /contacts writes a field (attributes.<key>, email, name, tags or consent); null means only HelpWell or an integration writes it.

Headers

  • HelpWell-Workspacestring

    The workspace id to act in. Default: the key’s own workspace. Only for a key that was granted access to other workspaces (Settings → API keys); otherwise 403 workspace_not_allowed. The workspace query parameter does the same.

Answers

  • 200
  • 401
  • 403
  • 429

Request

curl "$HELPWELL_API_URL/fields" \
  -H "Authorization: Bearer $HELPWELL_API_KEY"
// env: your server runtime’s environment (process.env, Deno.env, a Worker’s env).
const response = await fetch(`${env.HELPWELL_API_URL}/fields`, {
  headers: {
    Authorization: `Bearer ${env.HELPWELL_API_KEY}`,
  },
});
const data = await response.json();
if (!response.ok) throw new Error(`HelpWell: ${data.error.code}`);
const response = await fetch(`${process.env.HELPWELL_API_URL}/fields`, {
  headers: {
    Authorization: `Bearer ${process.env.HELPWELL_API_KEY}`,
  },
});
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.get(
    f"{os.environ['HELPWELL_API_URL']}/fields",
    headers={
        "Authorization": f"Bearer {os.environ['HELPWELL_API_KEY']}",
    },
    timeout=10,
)
response.raise_for_status()
data = response.json()

Response 200

{
  "data": [
    {
      "key": "email",
      "label": "Email",
      "type": "text",
      "source": "helpwell",
      "locked": true,
      "set": "email"
    },
    {
      "key": "seats",
      "label": "Seats",
      "type": "number",
      "source": "app",
      "locked": true,
      "set": "attributes.seats",
      "description": "Paid seats on the account"
    },
    {
      "key": "stripe.mrr",
      "label": "MRR",
      "type": "number",
      "source": "stripe",
      "locked": true,
      "set": null,
      "unit": "cents"
    }
  ]
}
POST/fieldscontacts:write

Define a custom field

Creates a custom field before your app sends its first value, so segments and journeys can use it now and imports follow its type. Writing a value with POST /contacts also creates a field (its type is guessed); defining it first locks the type. A field already locked to the same type is returned as it is (200); a different type is refused with 409, because a person chose it.

Body

  • keystringRequired

    A letter, then letters, digits or underscores; 60 at most. Pattern ^[a-zA-Z][a-zA-Z0-9_]{0,59}$.

  • labelstringRequired

    What people see in HelpWell. At most 80 characters.

  • typestringRequired

    One of text, number, money, date, boolean, list, event.

  • descriptionstring

    At most 300 characters.

Headers

  • Idempotency-Keystring

    A unique value per logical write (1 to 200 visible ASCII characters). A retry with the same key and body gets the first answer for 24 hours; the same key with another body is refused with 422. At most 200 characters.

  • HelpWell-Workspacestring

    The workspace id to act in. Default: the key’s own workspace. Only for a key that was granted access to other workspaces (Settings → API keys); otherwise 403 workspace_not_allowed. The workspace query parameter does the same.

Answers

  • 200
  • 201
  • 400
  • 401
  • 403
  • 409
  • 422
  • 429

Request

curl -X POST "$HELPWELL_API_URL/fields" \
  -H "Authorization: Bearer $HELPWELL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: field-seats" \
  -d '{
  "key": "seats",
  "label": "Seats",
  "type": "number",
  "description": "Paid seats on the account"
}'
// env: your server runtime’s environment (process.env, Deno.env, a Worker’s env).
const response = await fetch(`${env.HELPWELL_API_URL}/fields`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${env.HELPWELL_API_KEY}`,
    'Content-Type': 'application/json',
    'Idempotency-Key': 'field-seats',
  },
  body: JSON.stringify({
    key: 'seats',
    label: 'Seats',
    type: 'number',
    description: 'Paid seats on the account',
  }),
});
const data = await response.json();
if (!response.ok) throw new Error(`HelpWell: ${data.error.code}`);
const response = await fetch(`${process.env.HELPWELL_API_URL}/fields`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.HELPWELL_API_KEY}`,
    'Content-Type': 'application/json',
    'Idempotency-Key': 'field-seats',
  },
  body: JSON.stringify({
    key: 'seats',
    label: 'Seats',
    type: 'number',
    description: 'Paid seats on the account',
  }),
});
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']}/fields",
    headers={
        "Authorization": f"Bearer {os.environ['HELPWELL_API_KEY']}",
        "Idempotency-Key": "field-seats",
    },
    json={
        "key": "seats",
        "label": "Seats",
        "type": "number",
        "description": "Paid seats on the account",
    },
    timeout=10,
)
response.raise_for_status()
data = response.json()

Response 200 · Already defined with this type

{
  "field": {
    "key": "seats",
    "label": "Seats",
    "type": "number",
    "source": "app",
    "locked": true,
    "set": "attributes.seats",
    "description": "Paid seats on the account"
  },
  "created": false
}

Response 201 · Created

{
  "field": {
    "key": "seats",
    "label": "Seats",
    "type": "number",
    "source": "app",
    "locked": true,
    "set": "attributes.seats",
    "description": "Paid seats on the account"
  },
  "created": true
}

Knowledge base

GET/knowledge/articlesknowledge:read

Read the help articles

Every help article of a hosted product as its whole Markdown file, front matter included, with its collections and the screenshots articles may show. The HelpWell docs workflow gives this to your coding agent before it updates the articles.

Query parameters

  • productIdstring

    Required when the key can use more than one product.

Headers

  • HelpWell-Workspacestring

    The workspace id to act in. Default: the key’s own workspace. Only for a key that was granted access to other workspaces (Settings → API keys); otherwise 403 workspace_not_allowed. The workspace query parameter does the same.

Answers

  • 200
  • 401
  • 403
  • 404
  • 429

Request

curl "$HELPWELL_API_URL/knowledge/articles?productId=prd_7d2f19c4" \
  -H "Authorization: Bearer $HELPWELL_API_KEY"
// env: your server runtime’s environment (process.env, Deno.env, a Worker’s env).
const response = await fetch(`${env.HELPWELL_API_URL}/knowledge/articles?productId=prd_7d2f19c4`, {
  headers: {
    Authorization: `Bearer ${env.HELPWELL_API_KEY}`,
  },
});
const data = await response.json();
if (!response.ok) throw new Error(`HelpWell: ${data.error.code}`);
const response = await fetch(`${process.env.HELPWELL_API_URL}/knowledge/articles?productId=prd_7d2f19c4`, {
  headers: {
    Authorization: `Bearer ${process.env.HELPWELL_API_KEY}`,
  },
});
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.get(
    f"{os.environ['HELPWELL_API_URL']}/knowledge/articles",
    params={"productId": "prd_7d2f19c4"},
    headers={
        "Authorization": f"Bearer {os.environ['HELPWELL_API_KEY']}",
    },
    timeout=10,
)
response.raise_for_status()
data = response.json()

Response 200

{
  "product": {
    "id": "prd_7d2f19c4",
    "name": "Acme"
  },
  "collections": [
    {
      "id": "billing",
      "title": "Billing"
    }
  ],
  "articles": [
    {
      "path": "billing/download-invoices.md",
      "slug": "billing/download-invoices",
      "title": "Download your invoices",
      "collection": "billing",
      "description": "Get a PDF of any invoice.",
      "status": "published",
      "markdown": "---\ntitle: Download your invoices\ndescription: Get a PDF of any invoice.\nstatus: published\n---\n\nOpen **Billing** and choose **Download**."
    }
  ],
  "screenshots": [
    {
      "ref": "../_screenshots/billing.png",
      "path": "/settings/billing"
    }
  ]
}
POST/knowledge/proposalsknowledge:write

Send updated and new articles

Up to 100 articles your coding agent wrote: update for an article that exists (keep its path) and new for one that does not. They wait in Knowledge base → Code updates for review, or are published at once when the product publishes code-driven updates automatically. Articles that did not change, and images that are neither screenshots nor already in the article, are left out. Send screenshots first.

Body

  • productIdstring

    Required when the key can use more than one product.

  • repositorystringRequired

    The repository the change is from, like acme/app.

  • modestring

    One of update, build.

  • baseShastring
  • headShastring
  • agentstring

    Who wrote them, like claude-code or codex.

  • summarystring

    What changed for customers.

  • proposalsobject[]Required

    At most 100 items.

Headers

  • HelpWell-Workspacestring

    The workspace id to act in. Default: the key’s own workspace. Only for a key that was granted access to other workspaces (Settings → API keys); otherwise 403 workspace_not_allowed. The workspace query parameter does the same.

Answers

  • 201
  • 400
  • 401
  • 403
  • 404
  • 429

Request

curl -X POST "$HELPWELL_API_URL/knowledge/proposals" \
  -H "Authorization: Bearer $HELPWELL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "productId": "'"$HELPWELL_PRODUCT_ID"'",
  "repository": "acme/app",
  "baseSha": "9f2c1e7",
  "headSha": "4b8d0a3",
  "mode": "update",
  "agent": "claude-code",
  "summary": "Invoices can be downloaded as CSV too.",
  "proposals": [
    {
      "kind": "update",
      "path": "billing/download-invoices.md",
      "reason": "CSV downloads are new.",
      "markdown": "---\ntitle: Download your invoices\nstatus: published\n---\n\nOpen **Billing**, choose **Download**, then PDF or CSV."
    }
  ]
}'
// env: your server runtime’s environment (process.env, Deno.env, a Worker’s env).
const response = await fetch(`${env.HELPWELL_API_URL}/knowledge/proposals`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${env.HELPWELL_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    productId: env.HELPWELL_PRODUCT_ID,
    repository: 'acme/app',
    baseSha: '9f2c1e7',
    headSha: '4b8d0a3',
    mode: 'update',
    agent: 'claude-code',
    summary: 'Invoices can be downloaded as CSV too.',
    proposals: [
      {
        kind: 'update',
        path: 'billing/download-invoices.md',
        reason: 'CSV downloads are new.',
        markdown: '---
title: Download your invoices
status: published
---

Open **Billing**, choose **Download**, then PDF or CSV.',
      },
    ],
  }),
});
const data = await response.json();
if (!response.ok) throw new Error(`HelpWell: ${data.error.code}`);
const response = await fetch(`${process.env.HELPWELL_API_URL}/knowledge/proposals`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.HELPWELL_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    productId: process.env.HELPWELL_PRODUCT_ID,
    repository: 'acme/app',
    baseSha: '9f2c1e7',
    headSha: '4b8d0a3',
    mode: 'update',
    agent: 'claude-code',
    summary: 'Invoices can be downloaded as CSV too.',
    proposals: [
      {
        kind: 'update',
        path: 'billing/download-invoices.md',
        reason: 'CSV downloads are new.',
        markdown: '---
title: Download your invoices
status: published
---

Open **Billing**, choose **Download**, then PDF or CSV.',
      },
    ],
  }),
});
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']}/knowledge/proposals",
    headers={
        "Authorization": f"Bearer {os.environ['HELPWELL_API_KEY']}",
    },
    json={
        "productId": os.environ["HELPWELL_PRODUCT_ID"],
        "repository": "acme/app",
        "baseSha": "9f2c1e7",
        "headSha": "4b8d0a3",
        "mode": "update",
        "agent": "claude-code",
        "summary": "Invoices can be downloaded as CSV too.",
        "proposals": [
            {
                "kind": "update",
                "path": "billing/download-invoices.md",
                "reason": "CSV downloads are new.",
                "markdown": "---\ntitle: Download your invoices\nstatus: published\n---\n\nOpen **Billing**, choose **Download**, then PDF or CSV.",
            },
        ],
    },
    timeout=10,
)
response.raise_for_status()
data = response.json()

Response 201 · Filed

{
  "batchId": "cub_5e0a",
  "status": "review",
  "proposals": 1,
  "skipped": []
}
POST/knowledge/screenshotsknowledge:write

Send a screenshot

One PNG of up to 6 MB, base64-encoded, kept at _screenshots/<name>.png. Articles show it as ![What it shows](../_screenshots/<name>.png). Sending the same picture again changes nothing.

Body

  • productIdstring

    Required when the key can use more than one product.

  • namestringRequired

    Letters, digits and dashes are kept.

  • pathstring

    The page of the app it shows, like /settings/billing.

  • pngstringRequired

    The PNG, base64-encoded.

Headers

  • HelpWell-Workspacestring

    The workspace id to act in. Default: the key’s own workspace. Only for a key that was granted access to other workspaces (Settings → API keys); otherwise 403 workspace_not_allowed. The workspace query parameter does the same.

Answers

  • 200
  • 400
  • 401
  • 403
  • 404
  • 429

Request

curl -X POST "$HELPWELL_API_URL/knowledge/screenshots" \
  -H "Authorization: Bearer $HELPWELL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "productId": "'"$HELPWELL_PRODUCT_ID"'",
  "name": "billing",
  "path": "/settings/billing",
  "png": "iVBORw0KGgo…"
}'
// env: your server runtime’s environment (process.env, Deno.env, a Worker’s env).
const response = await fetch(`${env.HELPWELL_API_URL}/knowledge/screenshots`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${env.HELPWELL_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    productId: env.HELPWELL_PRODUCT_ID,
    name: 'billing',
    path: '/settings/billing',
    png: 'iVBORw0KGgo…',
  }),
});
const data = await response.json();
if (!response.ok) throw new Error(`HelpWell: ${data.error.code}`);
const response = await fetch(`${process.env.HELPWELL_API_URL}/knowledge/screenshots`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.HELPWELL_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    productId: process.env.HELPWELL_PRODUCT_ID,
    name: 'billing',
    path: '/settings/billing',
    png: 'iVBORw0KGgo…',
  }),
});
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']}/knowledge/screenshots",
    headers={
        "Authorization": f"Bearer {os.environ['HELPWELL_API_KEY']}",
    },
    json={
        "productId": os.environ["HELPWELL_PRODUCT_ID"],
        "name": "billing",
        "path": "/settings/billing",
        "png": "iVBORw0KGgo…",
    },
    timeout=10,
)
response.raise_for_status()
data = response.json()

Response 200 · Kept

{
  "name": "billing",
  "ref": "../_screenshots/billing.png",
  "changed": true
}