Hello 👋 How can we help?

Add a new customer via Rest API

Use the following API request if you want to add a new customer to HelpCrunch.
Written by Konstantine
Updated 4 days ago

Let's say you want to add your new customer Ivan Dobsky to your HelpCrunch account.

The API request for it will look like this:
Url: https://your-organization.helpcrunch.com/api/public/customers
Method: PATCH
Headers: Authorization: Bearer api-key=”842699d800d4df44831d8968ecfda46367717109″
Body (JSON):

[
  {
    "user_id": "19638",
    "name": "Ivan Dobsky",
    "company": "Microsoft",
    "email": "test-user@example.com",
    "source": "https://some-source.com",
    "first_seen": "2011-11-12 12:12:12",
    "unsubscribed": false,
    "notes": "Any text notes about your user",
    "status": 1,
    "custom_data": {
      "current_subscription": "suspended",
      "money_spent": 4000,
      "registration_data": "2017-10-05",
      "used_paycode": true
    },
    "tags": [
      { "name": "Lead" },
      {
        "name": "Bug",
        "color": "#FF0000"
      }
    ]
  }
]

Responses:

  • You will get “204 No Content” if everything is okay (and you can check that user data is imported at your contacts page)
  • You will get “401 Unauthorized” if api-key in Authorization header is wrong or absent
  • You will get “422 Unproccessable Entity” and “Request is not valid. Syntax error” if you use wrong customers data structure
Did this answer your question?