Get user by email or create a new user.

Resource url

https://Your project.userecho.com/api/v2/users/get_or_create.json

Parameters

Parameter Value Required? Default Options Description
email String yes User's email. This is the only parameter we check to find a user (and email_verified in some cases). If user does not found we will use parameters bellow to create a new one.
name String no first part of email User's display name.
language String no project default language en, ru, es, fr, de, nl, is, et, kk, pt-br, uk, cs, da, fi, hu, it, ja, ko, sv, tr, zh-hans, ca, pl, nb, he, ar User's default language. Options are limited by your project selected languages.
email_verified Boolean no true Status of user's email. if "false" we will check users with unverified emails only.
send_new_user_invitation Boolean no false Send "true" if you want new user receives an invitation email.

Request example #1

{
  "email":"test@test.com", 
  "name":"Test user"
}

Response example

{
    "status": "success", 
    "data": {
        "rating": 0.0, 
        "is_created": true, 
        "name": "Test user", 
        "name_and_title": "Test user", 
        "title": "", 
        "is_authenticated": true, 
        "avatar_url": "https://secure.gravatar.com/avatar/b642b4217b34b1e8d3bd915fc65c4452?default=https%3A%2F%2Fcdn.userecho.com%2Fcharacters%2F84.png%3F1&s=48", 
        "slug": "test-user", 
        "language": "en", 
        "is_staff": false, 
        "last_activity": "2016-01-06T19:53:55.688Z", 
        "email": "test@test.com", 
        "id": 3, 
        "date_joined": "2016-01-06T19:53:55.664Z"
    }
}