Hello 👋🏼 How can we help?

Get full customer data via REST API

You can retrieve all customer personal data using the following REST API request.
Written by Konstantine
Updated 1 year ago

You can retrieve all customer personal data (including events, excluding your private notes and tags) by sending a GET request with customer id in your URL or by sending id, user_id or email in your get-parameters. This can come in handy for a full GDPR compliance.

Url: https://your-organization.helpcrunch.com/api/public/customers/1244343
Alternative: https://your-organization.helpcrunch.com/api/public/customers?email=test@example.com
Alternative: https://your-organization.helpcrunch.com/api/public/customers?id=1244343&user_id=8989899&email=test@example.com
Method: GET
Headers: Authorization: Bearer api-key=”842699d800d4df44831d8968ecfda46367717109″

    "id": 3360752,
    "name": "John Doe",
    "user_id": "123123",
    "email": "test@example.com",
    "referrer": "https://example.com/",
    "source": "https://example.com/somepage.html",
    "company": "Test",
    "phone": "+38093090909",
    "first_seen": "2018-05-24T08:05:28+0000",
    "locale": "en_US",
    "timezone": "Europe/Kiev",
    "last_seen": "2018-05-24T08:05:27+0000",
    "sessions": 9,
    "ip": "",
    "country": "Ukraine",
    "country_code": "UA",
    "region": "Kyiv City",
    "city": "Kiev",
    "hostname": "yoursite.com",
    "last_page": "https://yoursite.com/somepage.html",
    "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0"
  • You will get “401 Unauthorized” if api-key in Authorization header is wrong or absent
  • You will get “403 Access denied” if you are trying to get data from a customer that does not belong to your organization
  • You will get “404 Customers could not be found” if a customer does not exist or you sent no data
  • You will get “422 Unprocessable Entity” and “Request is not valid. Syntax error” if you use wrong customers data structure
Did this answer your question?