Skip to content

Users

Get User

  • Endpoint:
GET /users/{id}
  • Allowed for:

users that has right user.read

  • Filters :
Name Comment Value
query filter on last name and first name ex: 'Ford'
name filter public/private first and last name ex: 'Ford'
email filter on public/private email ex: 'Ford'
mobile filter on public/private mobile/landline ex: 'Ford'
licence filter on public/private licence ex: 'Ford'
description filter on description ex: 'Ford'
created filter on created date ex: 'current_month'
updated filter on updated date ex: 'current_month'
license_expire_at filter on created date ex: 'current_month'
language filter on language ex: 'AR' 2 chars only
position filter on position ex: 'Ford'
linked_in filter on linked_in ex: 'Ford'
email_signature filter on email_signature ex: 'Ford'
use_email_signature filter on use_email_signature 1 or 0
user_fields filter on custom fields added in property ex: user_fields => ['1' =>'shi']

Curl example :

$ curl -X GET 'http://api-v2.mycrm.com/users?filters[firstName]=Sam'

Curl example with custom fields:

$ curl -X GET 'http://api-v2.mycrm.com/users?filters[user_fields]['1']=test'
  • Sorts (possible values are ASC or DESC for all sorts). Default value is ASC:
Name
last_name
email
mobile
role

Curl example :

$ curl -X GET 'http://api-v2.mycrm.com/users?sort=lastName&sort_order=DESC'
  • JSON response:
Name Type Read-only Comment
id integer yes Automatically assigned when the user is created
public array no see below
private array no see below
role string no Agent's role code
theme string no Theme of the user (onyx, carbon or crystal)
subscriptions array no List of user's notifications subscriptions
created_at string yes Agent creation date (W3C format)
updated_at string yes Agent updated date (W3C format)

Public

Name Type Read-only Comment
first_name string no Agent first name
last_name string no Agent last name
email string no Agent email that be used for feeds
phone string no The agent's phone used in feeds
photo File no Agent photo
licence string no Agent licence number
position string no Agent's job
languages array no Spoken languages
nationalities array no Nationalities
linked_in string no LinkedIn Profil link
descriptions Descriptions[] no Descriptions
licence_expired_at string yes Agent updated date (W3C format)

The descriptions array contains following data :

Name Type Read-only Comment
lang string no Language ISO - 2 letters
content string no User description

Private

Name Type Read-only Comment
first_name string no Agent first name
last_name string no Agent last name
email string no Agent email that be used for the login page
mobile string no The agent's mobile phone
landline string no The agent's landline
landline_extension string no The agent's extension that be used in the agent's office
lang string no Preferred lang of the user
licence string no Agent licence number
use_email_signature boolean no
email_signature string no Signature
photo File no Public agent photo
licence_expired_at string yes Agent updated date (W3C format)
  • JSON response example:
{
    "user": {
        "id": 3,
        "public": {
            "first_name": "David",
            "last_name": "",
            "email": "bob.o@test.com",
            "licence": "XDXDSEF5",
            "phone": "",
            "photo": null,
            "descriptions": [
                {
                    "lang": "en",
                    "content": "bar"
                }
            ],
            "position": "My position",
            "linked_in": "http:\/\/linkedin.com\/my-page",
            "nationalities": [
                "US",
                "FR"
            ],
            "languages": [
                "en",
                "fr"
            ],
        "licence_expired_at": "2018-12-01"
        },
        "private": {
            "first_name": "David",
            "last_name": "",
            "email": "bob.o@test.com",
            "mobile": "",
            "landline": "",
            "landline_extension": "",
            "lang": "en",
            "photo": 25,
            "licence": "BLABL4",
            "use_email_signature": true,
            "email_signature": "Best signature",
        "licence_expired_at": "2018-12-01"
        },
        "role": "agent",
        ...
    }
}

Get Authenticated User

  • Endpoint:
GET /users/me
  • Allowed for:

anyone

  • JSON response:

Will return a User object.

  • JSON response example:
{
  "user": {
    "id":                    35436,
    "public": {
      "first_name":            "Johnny",
    ...
    "subscriptions": {
        "type.property.created.and.assigned": {
                "receive_notification": false,
                "receive_email": false,
                "receive_sms": true,
        },
        ...
    },
    ...
    "updated_at":            "2011-05-05T10:38:52Z",
  }
}

Get Users

  • Endpoint:
GET /users
  • Allowed for:

users that has right user.read

  • JSON response:

This endpoint will return a list of Users.

  • JSON response example:
{
  "users": [
    {
      "id": 223443,
      "public": {
        "first_name": "Johnny",
      ...
    },
    {
      "id": 8678530,
      "public": {
        "first_name": "James",
      ...
    }
  ]
}

Create User

  • Endpoint:
POST /users
  • Allowed for:

users that has right user.update

  • JSON request
Name Type Read-only Comment
public array no see below
private array no see below
role string no Agent's role code
theme string no Theme of the user (onyx, carbon or crystal)
subscriptions array no List of user's notifications subscriptions
created_at string yes Agent creation date (W3C format)
updated_at string yes Agent updated date (W3C format)
fields array  depends custom field list

Public

Name Type Read-only Comment
first_name string no Agent first name
last_name string no Agent last name
email string no Agent email that be used for feeds
phone string no The agent's phone used in feeds
photo File no Agent photo
licence string no Agent licence number
position string no Agent's job
languages array no Spoken languages
nationalities array no Nationalities
linked_in string no LinkedIn Profil link
descriptions Descriptions[] no Descriptions
licence_expired_at string yes Expiry date (W3C format) or null

The descriptions array contains following data :

Name Type Read-only Comment
lang string no Language ISO - 2 letters
content string no User description

Private

Name Type Read-only Comment
first_name string no Agent first name
last_name string no Agent last name
email string no Agent email that be used for the login page
mobile string no The agent's mobile phone
landline string no The agent's landline
landline_extension string no The agent's extension that be used in the agent's office
lang string no Preferred lang of the user
licence string no Agent licence number
use_email_signature boolean no
email_signature string no Signature
photo File no Public agent photo
licence_expired_at string yes Expiry date (W3C format) or null
  • JSON request example:
{
  "user": {
      "id": 223443,
      "fields": {
        "1": "2 pets", // id of the field => value of the field
        "3": true
      },
      "public": {
        "first_name": "Johnny",
      ...
  },
}
  • JSON response:

This endpoint will return a User.

Update User

  • Endpoint:
PUT /users/{id}
  • Allowed for:

users that has right user.update

  • JSON request
Name Type Read-only Comment
public array no see below
private array no see below
role string no Agent's role code
theme string no Theme of the user (onyx, carbon or crystal)
subscriptions array no List of user's notifications subscriptions
created_at string yes Agent creation date (W3C format)
updated_at string yes Agent updated date (W3C format)

Public

Name Type Read-only Comment
first_name string no Agent first name
last_name string no Agent last name
email string no Agent email that be used for feeds
phone string no The agent's phone used in feeds
photo File no Agent photo
licence string no Agent licence number
position string no Agent's job
languages array no Spoken languages
nationalities array no Nationalities
linked_in string no LinkedIn Profil link
descriptions Descriptions[] no Descriptions
licence_expired_at string no Expiry date (W3C format) or null

The descriptions array contains following data :

Name Type Read-only Comment
lang string no Language ISO - 2 letters
content string no User description

Private

Name Type Read-only Comment
first_name string no Agent first name
last_name string no Agent last name
email string no Agent email that be used for the login page
mobile string no The agent's mobile phone
landline string no The agent's landline
landline_extension string no The agent's extension that be used in the agent's office
lang string no Preferred lang of the user
licence string no Agent licence number
use_email_signature boolean no
email_signature string no Signature
photo File no Public agent photo
licence_expired_at string yes Expiry date (W3C format) or null
  • JSON request example:
{
  "user": {
      "id": 223443,
      "public": {
          "first_name": "Johnny",
      ...
      "subscriptions": {
        "type.property.created.and.assigned": {
                "receive_notification": false,
                "receive_email": false,
                "receive_sms": true,
        },
        ...
    },
    ...
  },
}
  • JSON response:

This endpoint will return a User.

Bulk Deletes

DELETE /users
  • Allowed for:

users that has right user.update

  • JSON request:

An array of user ID. If you don't pass any ID, it will delete all users.

  • JSON request example:
{
    "users": [
        1, 2, 3
    ],
    "resources": [{
            "id": 2,
            "resource": "properties"
        }, {
            "id": 2,
            "resource": "leads"
        }, {
            "id": 2,
            "resource": "landlords"
    }]
}
  • JSON response:

Will return a 204 http code.

Delete User

  • Endpoint:
DELETE /users/{id}
  • JSON request example:
{
    "resources": [{
        "id": 2, // assignee user id
        "resource": "properties"
    }, {
        "id": 2,
        "resource": "leads"
    }, {
        "id": 2,
        "resource": "landlords"
    }]
}
  • Allowed for:

users that has right user.update

  • JSON request

The mandatory fields are similar than user creation.

  • JSON response:

This endpoint will return a 204 http code.