# Create user

You can create a user. The table below includes any possible attributes that can be updated. You can also set up any custom attribute of your choice. Custom attributes have to be created in the User.com app before sending them within requests.

POST /users/

Attributes Type Required Description
company_custom_id string no A unique identifier for the company which is provided by the client.
custom_attr string no A name of your custom attribute.
email string no A user email address.
first_name string no A first name for a user (the maximum number of characters is 40).
last_name string no A last name for a user (the maximum number of characters is 40).
tags list(string) no A list of tag names.

# Request

  • CURL
  • JavaScript
  • PHP
  • Python
 curl -X POST -H "Authorization: Token <your_64_char_api_key>"
     -H "Accept: */*; version=2" -H "Content-Type: application/json" -d '{
  "email": "myemail@example.org",
  "first_name": "John",
  "last_name": "Doe",
  "tags": ["new", "verified"]
}' "https://<your_app_subdomain>.user.com/api/public/users/"

# Response

{
  "updated_at": "2017-06-13T12:22:38.748397Z",
  "companies": [
    {
      "id": 14,
      "name": "Company name",
      "member_since": "2018-06-14T08:49:56.515083Z"
    }
  ],
  "key": "xSoYQG00fg9z",
  "city": null,
  "linkedin_url": null,
  "tags": [],
  "last_contacted": null,
  "phone_number": null,
  "facebook_url": null,
  "notifications": true,
  "region": null,
  "timezone": null,
  "status": "visitor",
  "gravatar_url": null,
  "twitter_url": null,
  "google_url": null,
  "os_type": null,
  "email": "myemail@example.org",
  "score": 0,
  "unsubscribed": false,
  "first_seen": null,
  "page_views": 0,
  "last_ip": null,
  "chat_id": "Chat ID is deprecated and will be removed in future",
  "browser": null,
  "gender": "unknown",
  "resolution": null,
  "country": null,
  "name": "John Doe",
  "created_at": "2017-06-13T12:22:38.748373Z",
  "last_seen": null,
  "lists": [],
  "attributes": [],
  "browser_language": null,
  "id": 20901703
}