Skip to content
Reference/Customers/Assign Tags & Custom Fields

Assign Tags & Custom Fields

POSThttps://public.leadpattern.com/customer/assign-tags-custom-fields
application/json60 req/min

Upsert a customer by phone and assign tags and/or custom field values. Creates the contact if they don't exist.

  • Tags are matched by name and created on the fly when missing.
  • Creates the contact if the phone is unknown.

Headers

1 field
Authorizationstring
required
Your API key. Sent raw (e.g. 'lp_...'). No Bearer prefix required.

Body Parameters

5 fields
phonestring
required
Customer phone (with country code).
namestring
optional
Customer name to set.
optInboolean
optional
Marketing opt-in flag.
tagsarray<string>
optional
Tags to assign (created if missing).
customFieldsarray of objects
optional
Custom field values (field must already exist).
namestring
required
valuestring
required

Responses

JSON Response
{
  "type": "success",
  "data": {
    "customerId": "64a1bc...",
    "tags": {
      "added": [
        "VIP",
        "Renewal"
      ],
      "errored": []
    },
    "customFields": {
      "added": [
        "Plan",
        "Region"
      ],
      "errored": []
    }
  }
}

Sample Request Body

{
  "phone": "+9195XXXXXXXX",
  "name": "John Doe",
  "optIn": true,
  "tags": [
    "VIP",
    "Renewal"
  ],
  "customFields": [
    {
      "name": "Plan",
      "value": "Enterprise"
    },
    {
      "name": "Region",
      "value": "India"
    }
  ]
}