Find user by email


Easiest way to find a certain user. By providing an email address (which can be probably retrieved from your app) you'll get a response of user model.

GET

/users/search/?email=:email

Attributes
Type
Description
email
string
Email address of a user you want to search for
curl -X GET -H "Authorization: Token <your_64_char_api_key>" "https://app.userengage.com/api/public/users/search/?email=:email"

Example response

{
 "facebook_url": null,
  "region": null,
  "notifications": true,
  "last_ip": null,
  "attributes": [
    {
      "value": true,
      "name": "Example attr",
      "name_std": "example_attr",
      "id": 1109
    },
    {
      "value": "attribute value",
      "name": "My string attr",
      "name_std": "my_string_attr",
      "id": 2429
    }
  ],
  "country": null,
  "resolution": null,
  "name": "Jane Doe",
  "browser_language": null,
  "email": "example@email.com",
  "os_type": null,
  "created_at": "2017-06-07T09:41:13.466897Z",
  "unsubscribed": false,
  "timezone": null,
  "gravatar_url": null,
  "chat_id": "Chat ID is deprecated and will be removed in future",
  "browser": null,
  "key": "g3FaYocCy0U6",
  "id": 19678376,
  "updated_at": "2017-06-07T10:29:15.955873Z",
  "score": 0,
  "google_url": null,
  "city": null,
  "first_seen": null,
  "status": "visitor",
  "tags": [
    {
      "name": "tag",
      "id": 1441
    }
  ],
  "gender": "unknown",
  "linkedin_url": null,
  "twitter_url": null,
  "last_contacted": null,
  "phone_number": null,
  "lists": [],
  "last_seen": null,
  "page_views": 0
}
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://app.userengage.com/api/public/users/search/?email=:email",
  "method": "GET",
  "headers": {
    "authorization": "Token <your_64_char_api_key>"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://app.userengage.com/api/public/users/search/?email=:email");
xhr.setRequestHeader("authorization", "Token <your_64_char_api_key>");

xhr.send(data);
var request = require("request");

var options = { method: 'GET',
  url: 'https://app.userengage.com/api/public/users/search/',
  qs: { email: ':email' },
  headers: { authorization: 'Token <your_64_char_api_key>' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
<?php

$request = new HttpRequest();
$request->setUrl('https://app.userengage.com/api/public/users/search/');
$request->setMethod(HTTP_METH_GET);

$request->setQueryData(array(
  'email' => ':email'
));

$request->setHeaders(array(
  'authorization' => 'Token <your_64_char_api_key>'
));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
import requests

url = "https://app.userengage.com/api/public/users/search/"

querystring = {"email":":email"}

headers = {'authorization': 'Token <your_64_char_api_key>'}

response = requests.request("GET", url, headers=headers, params=querystring)

print(response.text)