← Documentation home
POST/hyax-api/v1/people/add

Create or update person

Base URL: https://platform.hyax.com · Replace YOUR_API_KEY with your team API key.

Request body

FieldRequiredDescription
emailYesTrimmed, lowercased
nameNoDisplay name
tagsNoString array; merged with existing on update
sourceNoSignup source (default `API` on create)
purchaseValueNoNumber; validation error if NaN
phoneNo
address1No
address2No
cityNo
stateNo
zipCodeNo
countryNo
notesNoStored in metadata
ipNoOverride inferred client IP; stored in metadata
referrerNoMax 1000 chars
utm_sourceNoMax 200 chars
utm_mediumNoMax 200 chars
utm_campaignNoMax 200 chars
utm_contentNoMax 200 chars
utm_termNoMax 200 chars
keywordNoMax 200 chars

Request examples

Same request in cURL, Node.js (fetch), and PHP (ext-curl).

curl -X POST 'https://platform.hyax.com/hyax-api/v1/people/add' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "email": "[email protected]",
    "name": "Ada Lovelace",
    "tags": [
      "newsletter",
      "vip"
    ],
    "source": "Landing page",
    "purchaseValue": 0,
    "phone": "+1-555-0100",
    "address1": "123 Main St",
    "address2": "Apt 4B",
    "city": "San Francisco",
    "state": "CA",
    "zipCode": "94105",
    "country": "US",
    "notes": "VIP customer",
    "ip": "203.0.113.42",
    "referrer": "https://google.com",
    "utm_source": "google",
    "utm_medium": "cpc",
    "utm_campaign": "spring-sale",
    "utm_content": "hero-banner",
    "utm_term": "saas tools",
    "keyword": "email marketing"
  }'

Example response

Shape varies by data; values are illustrative.

{
  "success": true,
  "message": "Person created",
  "data": {
    "id": "clx…",
    "email": "[email protected]",
    "name": "Ada Lovelace",
    "tags": ["newsletter", "vip"],
    "signupSource": "Landing page",
    "metadata": null,
    "purchaseValue": 0,
    "isNew": true
  }
}