NAV
shell ruby

nocrm.io API

Welcome to the nocrm API! You can use this API to access data of your account. It will enable you to create, update and retrieve leads and users. It will also allow you to get notifications when particular events happen, thanks to our Webhooks.

We have examples with shell commands and Ruby. You can view code examples in the dark area to the right, and you can switch of programming language of the examples with the tabs in the top right. All the examples are made twice, one with an API key and one with the USER token to help you understand some parameters in the requests.

This is a traditional and simple REST API. It means that requests are passed to our servers through https (secure http) following a standard scheme. Each request is independant from the previous one (stateless) and it's language independant. To use this API you will need:

There are two ways to connect on the API and it depends on what you intend to do:

IMPORTANT: Your private keys are like your admin password. These keys should only be used for authentification. This key is only for signing purpose.

Note: The generated API key is a key generated by you from your account to access the API. You can generate one different key for each application. You can delete it at any time and generate a new one if necessary. When a key is deleted, the application using this key won't be able to connect to your account anymore and won't access to any of your data.

Note 2: The user token is a token returned by a login method and is available for 30 days or until you logout.

Each time you want to access, add, modify or delete something through the API you have to:

REST defines which http method is to be used depending on wich kind of request your performing.

If you're not familiar with REST and HTTP methods, don't worry it's very simple and our documentation is well explained (at least we do our best). You can also check out this nice introduction to REST philosophy at http://rest.elkstein.org/.

Data are sent to and retrieved from our servers in JSON format (http://json.org for more info).

All parameters sent in the URL must be encoded to be interpreted correctly.

If you're only interested in creating leads you can also check our email API which do not need any coding skill.

Usage of the API:

Like our application, a fair usage of the API is asked. A quota is applied to your account, 2000 requests per day are allowed. Pass this number of requests, all the requests received won't be processed and will return an error code 429 with the message Too many requests.

When receiving an error status 429, you can get in response two headers : - API-RETRY-AFTER: The number of seconds before the next retry of API call. - API-LIMIT-RESET: The timestamp of when the API limit is reset

When receiving an error status 4XX, your integration has to process the error properly. Failing to process the errors might end by a deactivation of your API key or a ban from our API until you fix your integration.

Don't hesitate to contact us at support@youdontneedacrm.com if you need any help and/or you would like to have more data access from the API.

Authentication

In order to secure your transaction, we ask you to use one of your generated api key or your user token with any https transaction.

In this version 2 of the API, you have the choice of making your requests:

Ping API

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/ping"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/ping", header
JSON.parse(response)

With the USER token

curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/ping"
require 'rest-client'
token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/ping", header
JSON.parse(response)

The above commands return JSON structure like this:

{"status":200,"message":"Your API key is correct."}

Ping the API with one of your API key or the USER token received to make sure that the key to authenticate the requests is correct.

Return a status 200 if the API key or the USER token you are using to authenticate your requests is valid.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/ping

Http Status Code

Code type
200 ok
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
422 missing_parameter
429 too_many_requests

Log as

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/auth/log_as?user_id=514"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/auth/log_as?user_id=514", header
JSON.parse(response)

With the USER token

Not applicable with a USER token
Not applicable with a USER token

The above commands return JSON structure like this:

{
  "token": "ITd-Jb3EC_nCXI2fez4hhg",
  "slug": "THE_SUBDOMAIN_OF_THE_ACCOUNT",
  "locale": "en",
  "time_zone": "America/Denver",
  "user_id": 514,
  "user_email": "stef@example.com",
  "is_admin": true,
  "currency":
  {
    "code": "USD",
    "symbol": "$"
  }
}

Already logged using the API key, log as a specific user of the account.

It returns a USER token that should be used instead of the API key for all the actions that have to be done as the user.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/auth/log_as

Parameters

Parameter Description
user_id required User id or email to retrieve the USER token for this user.

Http Status Code

Code type
200 ok
400 user_not_found
401 unauthorized_wrong_token unauthorized_user unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
422 missing_parameter
429 too_many_requests

Login

With the API key

Not applicable with an API key.
Not application with an API key.

With the USER token

curl -u "user_email@domain.com:user_password" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/auth/login"
require 'rest-client'
header = { content_type: :json, accept: "application/json" }
response = RestClient.get "https://user_email%40domain.com:user_password@YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/auth/login", header
token = JSON.parse(response)

The above commands return JSON structure like this:

{
  "token": "ITd-Jb3EC_nCXI2fez4hhg",
  "slug": "THE_SUBDOMAIN_OF_THE_ACCOUNT",
  "locale": "en",
  "time_zone": "America/Denver",
  "user_id": 514,
  "user_email": "stef@example.com",
  "is_admin": true,
  "currency":
  {
    "code": "USD",
    "symbol": "$"
  }
}

To receive a USER token in order to do the request with a specified user, you have to login first.

To pass secretly your email and password, we use the basic authentication with a https request.

DO NOT SEND your email and password as a parameter of the request.

cURL and Ruby automatically encode your email/password when using like the examples.

Make sure to escape properly your email and password in case they contain specific characters. For example if your password is qwerty$1 make sure to escape it like that qwerty%241.

If a manual encoding is necessary, use the following method:

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/auth/login

HEADERS

Name Value
Authorization Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==

Http Status Code

Code type
200 ok
401 invalid_credentials unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
422 missing_parameter
429 too_many_requests

Logout

With the API key

Not applicable with an API key.
Not applicable with an API key.

With the USER token

curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/auth/logout"
require 'rest-client'
token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/auth/logout", header

The above commands return nothing with the following statuses

status 200: logout successful
status 304: nothing has been done

Logout from the API which invalidates the USER token. For further requests, a new login will be necessary.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/auth/logout

Http Status Code

Code type
200 ok
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
422 missing_parameter
429 too_many_requests

Pagination

When requesting a list of resources that will be paginated, a header will be returned, "X-TOTAL-COUNT", corresponding to the total number of resources before pagination is applied.

Steps

List the steps

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/steps"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/steps", header
steps = JSON.parse(response)

With the USER token

curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/steps"
require 'rest-client'
key = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/steps", header
steps = JSON.parse(response)

The above commands return JSON structure like this:

[
  {
    "id": 1189,
    "name": "Incoming",
    "position": 1,
    "created_at": "2015-04-22T22:03:20.000Z",
    "updated_at": "2015-04-22T22:03:20.000Z",
    "pipeline_id": 25,
    "pipeline":  {
      "id": 25,
      "name": "Sales funnel",
      "is_default": true,
      "created_at": "2016-04-22T22:03:20.000Z",
      "updated_at": "2016-04-22T22:03:20.000Z"
    }
  },
  {
    "id": 1190,
    "name": "In-touch",
    "position": 2,
    "created_at": "2015-04-22T22:03:20.000Z",
    "updated_at": "2015-04-22T22:03:20.000Z",
    "pipeline_id": 25,
    "pipeline":  {
      "id": 25,
      "name": "Sales funnel",
      "is_default": true,
      "created_at": "2016-04-22T22:03:20.000Z",
      "updated_at": "2016-04-22T22:03:20.000Z"
    }
  },
  {
    "id": 1191,
    "name": "Closing",
    "position": 3,
    "created_at": "2015-04-22T22:03:20.000Z",
    "updated_at": "2015-04-22T22:03:20.000Z",
    "pipeline_id": 25,
    "pipeline":  {
      "id": 25,
      "name": "Sales funnel",
      "is_default": true,
      "created_at": "2016-04-22T22:03:20.000Z",
      "updated_at": "2016-04-22T22:03:20.000Z"
    }
  }
]

Return the list of steps, previously created in your account.

The steps are returned ordered by their position.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/steps

Parameters

Parameter Default Description
direction optional asc Return data order by their position in ascending or descending. The value should be asc or desc.

Http Status Code

Code type
200 ok
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
422 missing_parameter
429 too_many_requests

Retrieve a step

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/steps/1189"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/steps/1189", header
step = JSON.parse(response)

With the USER token shell curl -H "X-USER-TOKEN": ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/steps/1189"

require 'rest-client'

token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/steps/1189", header
step = JSON.parse(response)

The above commands return JSON structured like this:

{
  "id": 1189,
  "name": "Incoming",
  "position": 1,
  "created_at": "2015-04-22T22:03:20.000Z",
  "updated_at": "2015-04-22T22:03:20.000Z",
  "pipeline_id": 25,
  "pipeline":  {
    "id": 25,
    "name": "Sales funnel",
    "is_default": true,
    "created_at": "2016-04-22T22:03:20.000Z",
    "updated_at": "2016-04-22T22:03:20.000Z"
  }
}

Retrieve a step previously created with its id.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/steps/{id}

Parameters

Parameter Description
id required Step's id or step's name. The identifier of the step that could be its id or its name.

Http Status Code

Code type
200 ok
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
404 step_not_found
422 missing_parameter missing_parameter
429 too_many_requests

Pipelines

List the pipelines

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/pipelines"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/pipelines", header
pipelines = JSON.parse(response)

With the USER token

curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/pipelines"
require 'rest-client'
key = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/pipelines", header
pipelines = JSON.parse(response)

The above commands return JSON structure like this:

[
  {
    "id": 25,
    "name": "Sales funnel",
    "is_default": true,
    "created_at": "2016-04-22T22:03:20.000Z",
    "updated_at": "2016-04-22T22:03:20.000Z"
  },
  {
    "id": 26,
    "name": "Accounting funnel",
    "is_default": false,
    "created_at": "2016-04-26T22:03:20.000Z",
    "updated_at": "2016-04-26T22:03:20.000Z"
  }
]

Return the list of pipelines, previously created in your account.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/pipelines

Http Status Code

Code type
200 ok
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
422 missing_parameter
429 too_many_requests

Client folders

List the client folders

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/clients"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/clients", header
clients = JSON.parse(response)

With the USER token

curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/clients"
require 'rest-client'
key = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/clients", header
clients = JSON.parse(response)

The above commands return JSON structure like this:

[
  {
    "id": 12,
    "name": "Acme",
    "description": "",
    "is_active": true,
    "created_at": "2015-04-22T22:03:20.000Z",
    "user_id": 514
  },
  {
    "id": 2,
    "name": "Corporate",
    "description": "",
    "is_active": false,
    "created_at": "2015-04-22T22:03:20.000Z",
    "user_id": 514
  }
]

Return the list of client folders, previously created in your account.

The client folders are returned ordered by their name by default.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/clients

Parameters

Parameter Default Description
direction optional asc Return data order by their order in ascending or descending. The value should be asc or desc.
order optional name Return data order by their name or id. The value should be name or id.

Http Status Code

Code type
200 ok
400 unrecognized_parameter
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
422 missing_parameter
429 too_many_requests

Create a client folder

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" -H "Content-Type: application/json" -d '{"name":"Blue Client","description":"Address: 2344 Paradise Av, Eden CA 90001","user_id":"stef@example.com"}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/clients"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
parameters = {
  "name":"Blue Client",
  "description":"Address: 2344 Paradise Av, Eden CA 90001",
  "user_id":"stef@example.com"
}
response = RestClient.post "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/clients", parameters, header
client = JSON.parse(response)

With the USER token

curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" -H "Content-Type: application/json" -d '{"name":"Blue Client","description":"Address: 2344 Paradise Av, Eden CA 90001"}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/clients"
require 'rest-client'
key = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => key, content_type: :json, accept: "application/json" }
parameters = {
  "name":"Blue Client",
  "description":"Address: 2344 Paradise Av, Eden CA 90001"
}
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/clients", parameters, header
client = JSON.parse(response)

The above commands return JSON structure like this:

{
  "id": 12,
  "name": "Blue Client",
  "description": "Address: 2344 Paradise Av, Eden CA 90001",
  "is_active": true,
  "created_at": "2017-02-17T22:03:20.000Z",
  "user_id": 514,
  "extended_info": {
    "permalink": "https://YOUR_SUBDOMAIN_HERE.nocrm.io/clients/12",
    "fields": {
      "email": null,
      "phone": null,
      "mobile": null,
      "address": "2344 Paradise Av, Eden CA 90001",
      "web": null,
      "first_name": null,
      "last_name": null,
      "full_name": null,
      "job": null,
      "fax": null,
      "vat": null,
      "city": null,
      "zipcode": null,
      "state": null,
      "country": null
    },
    "fields_by_name": {
      "Address": "2344 Paradise Av, Eden CA 90001",
      "Billing address": null
    },
    "user": {
      "id": 514,
      "lastname": "Stone",
      "firstname": "Stéphanie",
      "email": "stef@example.com",
      "phone": "+33609090909",
      "mobile_phone": ""
    }
  }
}

Return the client folder created.

Http request

POST https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/clients

Parameters

Parameter Description
name required The name of the client folder.
description optional The client folder's description.
user_id optional User’s email address or id to assign the client folder to the user. This parameter returns an error in case you are using the login user method to authenticate (USER token)

Http Status Code

Code type
201 created
400 unauthorized_parameter user_not_found
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
422 missing_parameter missing_parameter
429 too_many_requests

Retrieve a client folder

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/clients/12"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/clients/12", header
client = JSON.parse(response)

With the USER token

curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/clients/12"
require 'rest-client'
key = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/clients/12", header
client = JSON.parse(response)

The above commands return JSON structure like this:

{
  "id": 12,
  "name": "Blue Client",
  "description": "Address: 2344 Paradise Av, Eden CA 90001",
  "is_active": true,
  "created_at": "2017-02-17T22:03:20.000Z",
  "user_id": 514,
  "extended_info": {
    "permalink": "https://YOUR_SUBDOMAIN_HERE.nocrm.io/clients/12",
    "fields": {
      "email": null,
      "phone": null,
      "mobile": null,
      "address": "2344 Paradise Av, Eden CA 90001",
      "web": null,
      "first_name": null,
      "last_name": null,
      "full_name": null,
      "job": null,
      "fax": null,
      "vat": null,
      "city": null,
      "zipcode": null,
      "state": null,
      "country": null
    },
    "fields_by_name": {
      "Address": "2344 Paradise Av, Eden CA 90001",
      "Billing address": null
    },
    "user": {
      "id": 514,
      "lastname": "Stone",
      "firstname": "Stéphanie",
      "email": "stef@example.com",
      "phone": "+33609090909",
      "mobile_phone": ""
    }
  }
}

Return the client folder, previously created in your account.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/clients/{id}

Parameters

Parameter Description
id required The identifier of the lead

Http Status Code

Code type
200 ok
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
404 record_not_found
422 missing_parameter
429 too_many_requests

Update a client folder

With the API key

curl -XPUT -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" -H "Content-Type: application/json" -d '{"name": "Blue Corp"}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/clients/12"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
parameters = {
  name: "Blue Corp"
}
response = RestClient.put "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/clients/12", parameters, header
client = JSON.parse(response)

With the USER token

curl -XPUT -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" -H "Content-Type: application/json" -d '{"name": "Blue Corp"}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/clients/12"
require 'rest-client'
key = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => key, content_type: :json, accept: "application/json" }
parameters = {
  name: "Blue Corp"
}
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/clients/12", parameters, header
client = JSON.parse(response)

The above commands return JSON structure like this:

{
  "id": 12,
  "name": "Blue Client",
  "description": "Address: 2344 Paradise Av, Eden CA 90001",
  "is_active": true,
  "created_at": "2017-02-17T22:03:20.000Z",
  "user_id": 514,
  "extended_info": {
    "permalink": "https://YOUR_SUBDOMAIN_HERE.nocrm.io/clients/12",
    "fields": {
      "email": null,
      "phone": null,
      "mobile": null,
      "address": "2344 Paradise Av, Eden CA 90001",
      "web": null,
      "first_name": null,
      "last_name": null,
      "full_name": null,
      "job": null,
      "fax": null,
      "vat": null,
      "city": null,
      "zipcode": null,
      "state": null,
      "country": null
    },
    "fields_by_name": {
      "Address": "2344 Paradise Av, Eden CA 90001",
      "Billing address": null
    },
    "user": {
      "id": 514,
      "lastname": "Stone",
      "firstname": "Stéphanie",
      "email": "stef@example.com",
      "phone": "+33609090909",
      "mobile_phone": ""
    }
  }
}

Update the client folder previously created.

Http request

PUT https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/clients/{id}

Parameters

Parameter Description
id required The identifier of the client folder
name optional The new name of the client folder
description optional The new description of the client folder
is_active optional Boolean to activate or inactivate the client folder

Http Status Code

Code type
200 ok
400 bad_request
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
404 record_not_found
422 missing_parameter
429 too_many_requests

Delete a client folder

With the API key

curl -XDELETE -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/clients/12"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.delete "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/clients/12", header
client = JSON.parse(response)

With the USER token

curl -XDELETE -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/clients/12"
require 'rest-client'
key = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/clients/12", header
client = JSON.parse(response)

The above commands return JSON structure like this:

{
  "id": 12
}

Delete the client folder previously created from its id.

Http request

DELETE https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/clients/{id}

Parameters

Parameter Description
id required The identifier of the client folder

Http Status Code

Code type
200 ok
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
404 record_not_found
422 missing_parameter
429 too_many_requests

Partners

Activate partner key

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" -H "X-API-PARTNER-KEY: ASfTFxrey" -H "Content-Type: application/json" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/partners/activate"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
partner_key = "ASfTFxrey"
header = { 'X-API-KEY' => key, 'X-API-PARTNER-KEY' => partner_key, content_type: :json, accept: "application/json" }
parameters = {}
response = RestClient.post "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/partners/activate", parameters, header
hsh_response = JSON.parse(response)

The above commands return JSON structured like this:

{
    "valid_api_key": true,
    "valid_partner_key": true,
    "activated": true
}

This url allow to associate a partner (Eg: VoIP) to a customer.

Http request

POST https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/partners/activate

Http Status Code

Code type
200 ok
401 unauthorized not_api_key unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
422 missing_parameter
429 too_many_requests

Revoke partner key

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" -H "X-API-PARTNER-KEY: ASfTFxrey" -H "Content-Type: application/json" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/partners/revoke"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
partner_key = "ASfTFxrey"
header = { 'X-API-KEY' => key, 'X-API-PARTNER-KEY' => partner_key, content_type: :json, accept: "application/json" }
parameters = {}
response = RestClient.post "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/partners/revoke", parameters, header
hsh_response = JSON.parse(response)

The above commands return JSON structured like this:

{
    "valid_api_key": true,
    "valid_partner_key": true,
    "activated": false
}

This url allow to disassociate a partner (Eg: VoIP) with a customer.

Http request

POST https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/partners/revoke

Http Status Code

Code type
200 ok
401 unauthorized not_api_key unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
422 missing_parameter
429 too_many_requests

Categories

List the categories

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/categories?include_tags=true"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
parameters = { include_tags: true }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/categories", parameters, header
categories = JSON.parse(response)

With the USER token

curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/categories?include_tags=true"
require 'rest-client'
key = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => key, content_type: :json, accept: "application/json" }
parameters = { include_tags: true }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/categories", parameters, header
categories = JSON.parse(response)

The above commands return JSON structure like this:

[
  {
    "id": 12,
    "name": "Origin",
    "is_required": false,
    "updated_at": "2015-09-06T22:45:06.000Z",
    "created_at": "2015-09-06T22:45:06.000Z",
    "supertags": [
    {
      "id": 54,
      "name": "US",
      "category": "Origin",
      "category_id": 12,
      "created_at": "2015-09-06T22:46:06.000Z",
      "position": null
    },
    {
      "id": 58,
      "name": "Europe",
      "category": "Origin",
      "category_id": 12,
      "created_at": null,
      "position": null
    },
    {
      "id": 59,
      "name": "Asia",
      "category": "Origin",
      "category_id": 12,
      "created_at": null,
      "position": null
    }]
  },
  {
    "id": 13,
    "name": "Product",
    "is_required": false,
    "updated_at": "2015-09-06T22:45:06.000Z",
    "created_at": "2015-09-06T22:45:06.000Z",
    "supertags": [
    {
      "id": 60,
      "name": "Phone",
      "category": "Product",
      "category_id": 13,
      "created_at": "2015-09-06T22:46:06.000Z",
      "position": null
    },
    {
      "id": 61,
      "name": "Tablet",
      "category": "Product",
      "category_id": 13,
      "created_at": null,
      "position": null
    },
    {
      "id": 62,
      "name": "Computer",
      "category": "Product",
      "category_id": 13,
      "created_at": null,
      "position": null
    }]
  },
]

Return the list of categories with their tags if option added, previously created in your account.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/categories

Parameters

Parameter Default Description
include_tags optional false Include the supertags under each categories returned.

Http Status Code

Code type
200 ok
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
422 missing_parameter
429 too_many_requests

Create a category

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8"
  "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/category"
  -d '{"name": "My category"}'
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
parameters = { name: 'My category' }
response = RestClient.post "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/category", parameters, header
category = JSON.parse(response)

The above commands return JSON structure like this:

{
  "id":3,
  "name":"My category",
  "is_required":false,
  "updated_at":"2020-06-18T11:59:27.000Z",
  "created_at":"2020-06-18T11:59:27.000Z",
  "position":null
}

Return the created category.

Http request

POST https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/category

Parameters

Parameter Default Description
name required The category name

Http Status Code

Code type
201 created
401 unauthorized_non_admin unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
422 missing_parameter missing_parameter
429 too_many_requests

Predefined tags

List the predefined tags

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/predefined_tags"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/predefined_tags", header
categories = JSON.parse(response)

With the USER token

curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/predefined_tags"
require 'rest-client'
key = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/predefined_tags", header
categories = JSON.parse(response)

The above commands return JSON structure like this:

[
  {
    "id": 54,
    "name": "US",
    "category": "Origin",
    "category_id": 23,
    "created_at": "2015-09-06T22:46:06.000Z",
    "position": null
  },
  {
    "id": 58,
    "name": "Europe",
    "category": "Origin",
    "category_id": 23,
    "created_at": null,
    "position": null
  },
  {
    "id": 59,
    "name": "Asia",
    "category": "Origin",
    "category_id": 23,
    "created_at": null,
    "position": null
  },
  {
    "id": 60,
    "name": "Phone",
    "category": "Product",
    "category_id": 24,
    "created_at": "2015-09-06T22:46:06.000Z",
    "position": null
  },
  {
    "id": 61,
    "name": "Tablet",
    "category": "Product",
    "category_id": 24,
    "created_at": null,
    "position": null
  },
  {
    "id": 62,
    "name": "Computer",
    "category": "Product",
    "category_id": 24,
    "created_at": null,
    "position": null
  }
]

Return the list of predefined tags, previously created in your account.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/predefined_tags

Http Status Code

Code type
200 ok
401 unauthorized_non_admin unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
422 missing_parameter
429 too_many_requests

Create a predefined tag

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8"
  "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/predefined_tags"
  -d '{"name": "My tag", "category_id": 2}'
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
parameters = { name: 'My tag', category_id: 2 }
response = RestClient.post "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/predefined_tags", parameters, header
tag = JSON.parse(response)

The above commands return JSON structure like this:

{
  "id":4,
  "name":"My tag",
  "category":"My category",
  "category_id": 42,
  "created_at":"2020-06-18T12:55:55.000Z",
  "position":null
}

Return the created predefined tag.

Http request

POST https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/predefined_tags

Parameters

Parameter Default Description
name required The tag name
category_id required The category id where the tag should be added

Http Status Code

Code type
201 created
400 category_not_found
401 unauthorized_non_admin unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
422 missing_parameter missing_parameter
429 too_many_requests

Fields

List the fields

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/fields"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/fields", header
fields = JSON.parse(response)

With the USER token

curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/fields"
require 'rest-client'
key = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/fields", header
fields = JSON.parse(response)

The above commands return JSON structure like this:

[
  {
    "id": 1,
    "name": "Firstname",
    "type": "first_name",
    "parent_type": "lead",
    "position": 1,
    "created_at": "2013-09-13T20:34:05.000Z",
    "updated_at": "2015-01-13T23:51:58.000Z"
  },
  {
    "id": 2,
    "name": "Lastname",
    "type": "last_name",
    "parent_type": "lead",
    "position": 2,
    "created_at": "2013-09-13T20:53:00.000Z",
    "updated_at": "2015-01-13T23:52:04.000Z"
  },
  {
    "id": 3,
    "name": "Email",
    "type": "email",
    "parent_type": "lead",
    "position": 3,
    "created_at": "2013-09-13T20:53:28.000Z",
    "updated_at": "2013-09-13T20:53:28.000Z"
  },
  {
    "id": 1189,
    "name": "Shipping Address",
    "type": "address",
    "parent_type": "client",
    "position": 1,
    "created_at": "2015-04-03T21:32:37.000Z",
    "updated_at": "2017-02-20T18:39:28.000Z"
  }
]

Return the list of fields defined for your leads and clients.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/fields

Parameters

Parameter Default Description
type optional To restrict the type of fields you want. The values can be lead or client.

Http Status Code

Code type
200 ok
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
422 missing_parameter
429 too_many_requests

Create a field

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8"
  "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/fields"
  -d '{"name": "Country", "parent_type": "lead", "type": "country", "is_key": true}'
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
parameters = { name: 'Country', parent_type: 'lead', type: 'country', is_key: true }
response = RestClient.post "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/fields", parameters, header
field = JSON.parse(response)

The above commands return JSON structure like this:

{
    "id": 640137,
    "name": "Country",
    "type": "country",
    "parent_type": "lead",
    "position": 8,
    "is_key": true,
    "created_at": "2020-11-04T14:50:06.000Z",
    "updated_at": "2020-11-04T14:50:06.000Z"
}

Return the created fields.

Http request

POST https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/fields

Parameters

Parameter Default Description
name required Name of the field (max 32 characters)
parent_type required Element on which the field will be associated. Possible values: lead, client
type optional unset Type of the field. Possible values: unset, email, phone, mobile, address, web, first_name, last_name, full_name, job, fax, vat, city, zipcode, state, country, company_id, custom1 (not available in starter edition), custom2 (not available in starter edition), custom3 (not available in starter edition), custom4 (not available in starter edition), custom5 (not available in starter edition)
is_key optional false If true, the field will be used to detect potential duplicate leads

Http Status Code

Code type
201 created
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
422 unprocessable_entity missing_parameter missing_parameter
429 too_many_requests

Activities

List the activities

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/activities"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/activities", header
activities = JSON.parse(response)

With the USER token

curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/activities"
require 'rest-client'
key = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/activities", header
activities = JSON.parse(response)

The above commands return JSON structure like this:

[
  {
    "id": 271,
    "name": "Call",
    "icon": "phone",
    "parent_id": null,
    "color": null,
    "kind": "call",
    "is_disabled": false,
    "position": null
  },
  {
    "id": 272,
    "name": "Answered",
    "icon": "phone",
    "parent_id": 271,
    "color": "green",
    "kind": "call",
    "is_disabled": false,
    "position": null
  },
  {
    "id": 273,
    "name": "Unanswered",
    "icon": "phone",
    "parent_id": 271,
    "color": "red",
    "kind": "call",
    "is_disabled": false,
    "position": null
  },
  {
    "id": 274,
    "name": "E-mail",
    "icon": "envelope",
    "parent_id": null,
    "color": null,
    "kind": "email",
    "is_disabled": false,
    "position": null
  },
  {
    "id": 275,
    "name": "Meeting",
    "icon": "handshake-o",
    "parent_id": null,
    "color": null,
    "kind": "meeting",
    "is_disabled": false,
    "position": null
  }
]

Return the list of activities, previously created in your account.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/activities

Http Status Code

Code type
200 ok
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 forbidden_action upgrade_edition
422 missing_parameter
429 too_many_requests

Leads

List the leads

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads", header
leads = JSON.parse(response)

With the USER token

curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads"
require 'rest-client'
token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads", header
leads = JSON.parse(response)

The above commands return JSON structure like this:

[
  {
    "id": 8113,
    "title": "Loretta Inc.",
    "pipeline": null,
    "step": "Incoming",
    "step_id": 45,
    "status": "standby",
    "amount": 2400.0,
    "probability": 30,
    "currency": "USD",
    "starred": true,
    "next_action_at": "2014-03-12T07:30:00.000Z",
    "remind_date": "2014-03-12",
    "remind_time": "09:30",
    "created_at": "2014-02-28T17:37:33.000Z",
    "estimated_closing_date": null,
    "updated_at": "2014-02-28T17:38:05.000Z",
    "second_number": null,
    "amount_percentage": null,
    "closed_at": null,
    "description": "Firstname: Natalia\nLastname: Bawer\nFull name: Natalia Bawer\nEmail: natalia.bawer@loretta-inc.com\nPhone: 801 274 6798\nMobile: 832 764 1930 \nAddress: 1234 N 7864 W President Bld - Salt Lake City, UT 84105\nWeb: http://more-info-loretta.com\nDepartment: Sales\n--- Entrez une description ci-dessous ---\n \n--- \nMet Natalia at a seminar. She could be interested.\nShe is on business trip. Have to call her when she is back.",
    "html_description": "Firstname: Natalia\u003Cbr /\u003ELastname: Bawer\u003Cbr /\u003EFull name: Natalia Bawer\u003Cbr /\u003EEmail: natalia.bawer@loretta-inc.com\u003Cbr /\u003EPhone: 801 274 6798\u003Cbr /\u003EMobile: 832 764 1930\u0026nbsp;\u003Cbr /\u003EAddress: 1234 N 7864 W President Bld - Salt Lake City, UT 84105\u003Cbr /\u003EWeb: http://more-info-loretta.com\u003Cbr /\u003EDepartment: Sales\u003Cbr /\u003E\r\n\u003Cp class=\"lead-desc-separator\"\u003E--- Entrez une description ci-dessous ---\u003C/p\u003E\r\n\u003Cdiv\u003E\u0026nbsp;\u003C/div\u003E\r\n\u003Cbr /\u003E--- \u003Cbr /\u003E\r\n\u003Cp\u003EMet Natalia at a seminar. She could be interested.\u003Cbr /\u003EShe is on business trip. Have to call her when she is back.\u003C/p\u003E",
    "tags": ["small","US"],
    "created_from": "api",
    "closed_at": null,
    "attachment_count": 0,
    "created_by_id": 514,
    "user_id": 514,
    "client_folder_id": 1,
    "client_folder_name": "Acme",
    "team_id": 2,
    "team_name": "Sales"
  },
  {
    "id": 8112,
    "title": "Acme Corp",
    "pipeline": null,
    "step": "Incoming",
    "step_id": 45,
    "status": "todo",
    "amount": 1500.0,
    "probability": 70,
    "currency": "USD",
    "starred": null,
    "next_action_at": "2014-02-28T01:00:01.000Z",
    "remind_date": null,
    "remind_time": null,
    "created_at": "2014-02-28T17:31:04.000Z",
    "estimated_closing_date": null,
    "updated_at": "2014-02-28T17:31:04.000Z",
    "second_number": null,
    "amount_percentage": null,
    "closed_at": null,
    "text_description": "Firstname: John\nLastname: Doe\nEmail: john.doe@acme.corp.com\nPhone: 201 418 1625\n---\nJohn is very interested by our service. He wants a quote asap.\n",
    "html_description": "Firstname: John\u003Cbr /\u003ELastname: Doe\u003Cbr /\u003EEmail: john.doe@acme.corp.com\u003Cbr /\u003EPhone: 201 418 1625\u003Cbr /\u003E\r\n---\r\n\u003Cp\u003EJohn is very interested by our service. He wants a quote asap.\u003Cbr /\u003E\u003Cbr /\u003E\u003C/p\u003E",
    "tags": [],
    "created_from": "api",
    "closed_at": null,
    "attachment_count": 0,
    "created_by_id": 514,
    "user_id": 514,
    "client_folder_id": 1,
    "client_folder_name": "Acme",
    "team_id": 2,
    "team_name": "Sales"
  }
]

Return a list of leads, previously created in your account.

The leads are returned with a limit of 100 by default. However it is possible to lower this limit. To get more than 100 leads, you need to do multiple requests and use the offset parameter to shift the data.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads

Parameters

Parameter Default Description
direction optional desc Direction for ordering the data returned in ascending or descending. The value should be asc or desc.
order optional id Attribute to order the data returned. Could be: id, creation_date, last_update, next_action, sale_step, amount, probability, probalized_amount, alphabetically.
limit optional 100 Maximum count of data returned by request.
status optional Array of status names separated by a comma. Return the leads with the specified statuses. The status could be one of these values: todo, standby, won, cancelled, lost.
step optional Array of step names separated by a comma. Return the leads for the specified steps. The step should be the exact name entered in the application.
starred optional If set to true, returned all starred leads.
user_id optional User id or email to retrieve the leads belonging to this user only.
email optional Email address entered in the lead's description or in a comment. Return the leads containing this email address.
field_key optional Field name entered in the lead's description which has been set as a key to detect duplicates. It has to be used with the field_value parameter. This parameter is only available for Expert accounts.
field_value optional Field value corresponding to the field_key parameter. Return the leads containing this value in the field_key. It has to be used with the field_key parameter. This parameter is only available for Expert accounts.
tags optional An array of tags. Return the leads containing all the tags of the array. The tags could also include the Predefined tags of your account.
offset optional Shift the returned data by the offset value. Option used with the limit parameter in order to paginate the return.
updated_after optional Date from which leads will be retrieved according to their last update (can conflict with date_range_type parameter)
start_date optional Date from which leads will be retrieved according to the date_range_type parameter
end_date optional Date until which leads will be retrieved according to the date_range_type parameter
date_range_type optional creation Type of date range when using start_date and/or end_date parameters. Could be: creation, update, next_action, closed
include_unassigned optional false Include or not the unassigned leads when listing or searching the leads. false by default. If using the USER_TOKEN authentication, the user has to be able to see the unassigned leads.

Http Status Code

Code type
200 ok
400 bad_request unrecognized_parameter step_not_found not_found bad_parameter_format bad_parameter_format bad_parameter_format user_not_found
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 forbidden_action upgrade_edition
422 missing_parameter
429 too_many_requests

Create a lead

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" -H "Content-Type: application/json" -d '{"title":"Awesome Company","description":"Firstname%3A+John%0ALastname%3A+Doe%0AEmail%3A+john.doe%40company.com","user_id":"stef@example.com","tags":["prospect","google"],"step":"Contacted"}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
parameters = {
  title: "Awesome Company",
  description: "Firstname: John\nLastname: Doe\nEmail: john.doe@company.com",
  user_id: "stef@example.com",
  tags: ["prospect","google"],
  step: "Contacted"
}
response = RestClient.post "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads", parameters, header
lead = JSON.parse(response)

With the USER token

curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" -H "Content-Type: application/json" -d '{"title":"Awesome Company","description":"Firstname%3A+John%0ALastname%3A+Doe%0AEmail%3A+john.doe%40company.com","tags":["prospect","google"],"step":"Contacted"}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads"
require 'rest-client'

token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
parameters = {
  title: "Awesome Company",
  description: "Firstname: John\nLastname: Doe\nEamil: john.doe@company.com",
  tags: ["prospect","google"],
  step: "Contacted"
}
response = RestClient.post "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads", parameters, header
lead = JSON.parse(response)

The above commands return JSON structure like this:

{
  "id": 8113,
  "title": "Syl Loretta Incr.",
  "pipeline": null,
  "step": "In-touch",
  "step_id": 45,
  "status": "Standby",
  "amount": 1562.89,
  "probability": 85,
  "currency": "USD",
  "starred": true,
  "next_action_at": "2014-03-12T07:00:00.000Z",
  "remind_date": null,
  "remind_time": null,
  "reminder_at": null,
  "reminder_duration": null,
  "created_at": "2014-02-28T17:37:33.000Z",
  "estimated_closing_date": null,
  "updated_at": "2014-02-28T17:38:05.000Z",
  "second_number": null,
  "amount_percentage": null,
  "reminder_activity_id": null,
  "reminder_activity_log_id": null,
  "reminder_note": "",
  "comment_count": 0,
  "closed_at": null,
  "description": "Firstname: Natalia\nLastname: Bawer\nFull name: Natalia Bawer\nEmail: natalia.bawer@loretta-inc.com\nPhone: 801 274 6798\nMobile: 832 764 1930 \nAddress: 1234 N 7864 W President Bld - Salt Lake City, UT 84105\nWeb: http://more-info-loretta.com\nDepartment: Sales\n--- Entrez une description ci-dessous ---\n \n--- \nMet Natalia at a seminar. She could be interested.\nShe is on business trip. Have to call her when she is back.",
  "html_description": "Firstname: Natalia<br />Lastname: Bawer<br />Full name: Natalia Bawer<br />Email: natalia.bawer@loretta-inc.com<br />Phone: 801 274 6798<br />Mobile: 832 764 1930&nbsp;<br />Address: 1234 N 7864 W President Bld - Salt Lake City, UT 84105<br />Web: http://more-info-loretta.com<br />Department: Sales<br />\r\n<p class=\"lead-desc-separator\">--- Entrez une description ci-dessous ---</p>\r\n<div>&nbsp;</div>\r\n<br />--- <br />\r\n<p>Met Natalia at a seminar. She could be interested.<br />She is on business trip. Have to call her when she is back.</p>",
  "tags": [
    "small",
    "US"
  ],
  "created_from": "api",
  "created_by_id": 514,
  "user_id": 514,
  "team_id": null,
  "client_folder_id": null,
  "client_folder_name": null,
  "attachment_count": 0,
  "extended_info": {
    "first_contact_email": "natalia.bawer@loretta-inc.com",
    "all_contact_emails": [
      "natalia.bawer@loretta-inc.com"
    ],
    "permalink": "https://YOUR_SUBDOMAIN_HERE.nocrm.io/leads/8113",
    "fields": {
      "email": "natalia.bawer@loretta-inc.com",
      "phone": "801 274 6798",
      "mobile": "832 764 1930 ",
      "address": "1234 N 7864 W President Bld - Salt Lake City, UT 84105",
      "web": "http://more-info-loretta.com",
      "first_name": "Natalia",
      "last_name": "Bawer",
      "full_name": "Natalia Bawer",
      "job": "Sales",
      "fax": null,
      "vat": null
    },
    "fields_by_name": {
      "Firstname": "Natalia",
      "Lastname": "Bawer",
      "Full name": "Natalia Bawer",
      "Email": "natalia.bawer@loretta-inc.com",
      "Phone": "801 274 6798",
      "Mobile": "832 764 1930 ",
      "Address": "1234 N 7864 W President Bld - Salt Lake City, UT 84105",
      "Web": "http://more-info-loretta.com",
      "Department": "Sales"
    },
    "comment_count": 0,
    "bcc_count": 0,
    "team": null,
    "user": {
      "id": 514,
      "lastname": "Stone",
      "firstname": "Stéphanie",
      "email": "stef@example.com",
      "phone": "+33609090909",
      "mobile_phone": ""
    },
    "client_folder": null,
    "created_by": {
      "id": 514,
      "lastname": "Stone",
      "firstname": "Stéphanie",
      "email": "stef@example.com",
      "phone": "+33609090909",
      "mobile_phone": ""
    },
    "business_card_id": null,
    "visible_by_count": 1,
    "follow_ups": [

    ]
  }
}

To create a new lead, you have to pass the required parameters.

Depending on the key you used, with only the required parameters the lead will belong to:

In case you are using the API key and you want to assign directly the lead to a collaborator, you need to add the email address or the id of the user as parameter. If we cannot retrieve any user registered in the account an error is returned.

When using the "direct assignment" The user won't receive a notification when the lead is created. If a notification has to be sent, create the lead unassigned and use the method assign to assign the lead to the user. With this method, the user is notified.

The user_id parameter returns an error when using the USER token.

Http request

POST https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads

Parameters

Parameter Description
title required Lead's title. Usually it corresponds to the company name.
description required Lead's description. Usually it contains the information of the contact in the company.
user_id optional User's email address or id to assign the lead to the user. This parameter returns an error in case you are using the login user method to authenticate (USER token)
tags optional An array of tags describing the lead. If the tags don't exist they are automatically created. The tags could also include the Predefined tags of your account.
created_at optional Date of lead's creation with the following format: YYYY-MM-DD HH:MM:SS in the time zone of the account and the time in 24h format. The time can be also be in UTC with this specific format: YYYY-MM-DDTHH:MM:SS.sssZ. Do not use this parameter if you don't want to past date your lead creation.
step optional Step's id or Step's name for the lead. If the step is not found, an error 404 is returned. For information if you have steps in different pipeline that have the same name, it is better to use the step's id. The step can only be set if the lead is assigned.

Http Status Code

Code type
201 created
400 unauthorized_parameter disabled_user unprocessable_entity bad_parameter_format user_not_found
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
404 step_not_found client_not_found
422 unprocessable_entity missing_parameter missing_parameter
429 too_many_requests

Duplicate a lead

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" -H "Content-Type: application/json" -d '{"step":"In Touch"}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/3456/duplicate_lead"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
parameters = {
  step: "In Touch"
}
response = RestClient.post "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/3456/duplicate_lead", parameters, header
duplicated_lead = JSON.parse(response)

With the USER token

curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" -H "Content-Type: application/json" -d '{"step":"In Touch"}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/3456/duplicate_lead"
require 'rest-client'

token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
parameters = {
  step: "In Touch"
}
response = RestClient.post "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/3456/duplicate_lead", parameters, header
duplicated_lead = JSON.parse(response)

The above commands return JSON structure like this:

{
  "id": 8113,
  "title": "Syl Loretta Incr.",
  "pipeline": null,
  "step": "In-touch",
  "step_id": 45,
  "status": "Standby",
  "amount": 1562.89,
  "probability": 85,
  "currency": "USD",
  "starred": true,
  "next_action_at": "2014-03-12T07:00:00.000Z",
  "remind_date": null,
  "remind_time": null,
  "reminder_at": null,
  "reminder_duration": null,
  "created_at": "2014-02-28T17:37:33.000Z",
  "estimated_closing_date": null,
  "updated_at": "2014-02-28T17:38:05.000Z",
  "second_number": null,
  "amount_percentage": null,
  "reminder_activity_id": null,
  "reminder_activity_log_id": null,
  "reminder_note": "",
  "comment_count": 0,
  "closed_at": null,
  "description": "Firstname: Natalia\nLastname: Bawer\nFull name: Natalia Bawer\nEmail: natalia.bawer@loretta-inc.com\nPhone: 801 274 6798\nMobile: 832 764 1930 \nAddress: 1234 N 7864 W President Bld - Salt Lake City, UT 84105\nWeb: http://more-info-loretta.com\nDepartment: Sales\n--- Entrez une description ci-dessous ---\n \n--- \nMet Natalia at a seminar. She could be interested.\nShe is on business trip. Have to call her when she is back.",
  "html_description": "Firstname: Natalia<br />Lastname: Bawer<br />Full name: Natalia Bawer<br />Email: natalia.bawer@loretta-inc.com<br />Phone: 801 274 6798<br />Mobile: 832 764 1930&nbsp;<br />Address: 1234 N 7864 W President Bld - Salt Lake City, UT 84105<br />Web: http://more-info-loretta.com<br />Department: Sales<br />\r\n<p class=\"lead-desc-separator\">--- Entrez une description ci-dessous ---</p>\r\n<div>&nbsp;</div>\r\n<br />--- <br />\r\n<p>Met Natalia at a seminar. She could be interested.<br />She is on business trip. Have to call her when she is back.</p>",
  "tags": [
    "small",
    "US"
  ],
  "created_from": "api",
  "created_by_id": 514,
  "user_id": 514,
  "team_id": null,
  "client_folder_id": null,
  "client_folder_name": null,
  "attachment_count": 0,
  "extended_info": {
    "first_contact_email": "natalia.bawer@loretta-inc.com",
    "all_contact_emails": [
      "natalia.bawer@loretta-inc.com"
    ],
    "permalink": "https://YOUR_SUBDOMAIN_HERE.nocrm.io/leads/8113",
    "fields": {
      "email": "natalia.bawer@loretta-inc.com",
      "phone": "801 274 6798",
      "mobile": "832 764 1930 ",
      "address": "1234 N 7864 W President Bld - Salt Lake City, UT 84105",
      "web": "http://more-info-loretta.com",
      "first_name": "Natalia",
      "last_name": "Bawer",
      "full_name": "Natalia Bawer",
      "job": "Sales",
      "fax": null,
      "vat": null
    },
    "fields_by_name": {
      "Firstname": "Natalia",
      "Lastname": "Bawer",
      "Full name": "Natalia Bawer",
      "Email": "natalia.bawer@loretta-inc.com",
      "Phone": "801 274 6798",
      "Mobile": "832 764 1930 ",
      "Address": "1234 N 7864 W President Bld - Salt Lake City, UT 84105",
      "Web": "http://more-info-loretta.com",
      "Department": "Sales"
    },
    "comment_count": 0,
    "bcc_count": 0,
    "team": null,
    "user": {
      "id": 514,
      "lastname": "Stone",
      "firstname": "Stéphanie",
      "email": "stef@example.com",
      "phone": "+33609090909",
      "mobile_phone": ""
    },
    "client_folder": null,
    "created_by": {
      "id": 514,
      "lastname": "Stone",
      "firstname": "Stéphanie",
      "email": "stef@example.com",
      "phone": "+33609090909",
      "mobile_phone": ""
    },
    "business_card_id": null,
    "visible_by_count": 1,
    "follow_ups": [

    ]
  }
}

Duplicate the lead.

If the step parameter is not used, the duplicated lead will go to the first step of the same pipeline of the lead.

Http request

POST https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/{id}/duplicate_lead

Parameters

Parameter Description
id required Lead's id. The identifier of the lead.
step optional Step's id or Step's name for the lead. If the step is not found, an error 404 is returned. For information if you have steps in different pipeline that have the same name, it is better to use the step's id.

Http Status Code

Code type
200 ok
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
404 step_not_found record_not_found
422 unprocessable_entity missing_parameter
429 too_many_requests

Retrieve a lead

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/8113"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/8113", header
lead = JSON.parse(response)

With the USER token

curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/8113"
require 'rest-client'

token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/8113", header
lead = JSON.parse(response)

The above commands return JSON structured like this:

{
  "id": 8113,
  "title": "Syl Loretta Incr.",
  "pipeline": null,
  "step": "In-touch",
  "step_id": 45,
  "status": "Standby",
  "amount": 1562.89,
  "probability": 85,
  "currency": "USD",
  "starred": true,
  "next_action_at": "2014-03-12T07:00:00.000Z",
  "remind_date": "2014-03-12",
  "remind_time": "09:00",
  "reminder_at": "2014-03-12T15:00:00.000Z",
  "reminder_duration": 30,
  "created_at": "2014-02-28T17:37:33.000Z",
  "estimated_closing_date": null,
  "updated_at": "2014-02-28T17:38:05.000Z",
  "second_number": null,
  "amount_percentage": null,
  "reminder_activity_id": 12,
  "reminder_activity_log_id": 21,
  "reminder_note": "",
  "comment_count": 0,
  "closed_at": null,
  "description": "Firstname: Natalia\nLastname: Bawer\nFull name: Natalia Bawer\nEmail: natalia.bawer@loretta-inc.com\nPhone: 801 274 6798\nMobile: 832 764 1930 \nAddress: 1234 N 7864 W President Bld - Salt Lake City, UT 84105\nWeb: http://more-info-loretta.com\nDepartment: Sales\n--- Entrez une description ci-dessous ---\n \n--- \nMet Natalia at a seminar. She could be interested.\nShe is on business trip. Have to call her when she is back.",
  "html_description": "Firstname: Natalia<br />Lastname: Bawer<br />Full name: Natalia Bawer<br />Email: natalia.bawer@loretta-inc.com<br />Phone: 801 274 6798<br />Mobile: 832 764 1930&nbsp;<br />Address: 1234 N 7864 W President Bld - Salt Lake City, UT 84105<br />Web: http://more-info-loretta.com<br />Department: Sales<br />\r\n<p class=\"lead-desc-separator\">--- Entrez une description ci-dessous ---</p>\r\n<div>&nbsp;</div>\r\n<br />--- <br />\r\n<p>Met Natalia at a seminar. She could be interested.<br />She is on business trip. Have to call her when she is back.</p>",
  "tags": [
    "small",
    "US"
  ],
  "created_from": "api",
  "created_by_id": 514,
  "user_id": 514,
  "team_id": 5,
  "client_folder_id": 12,
  "client_folder_name": "Blue Corp",
  "attachment_count": 0,
  "extended_info": {
    "first_contact_email": "natalia.bawer@loretta-inc.com",
    "all_contact_emails": [
      "natalia.bawer@loretta-inc.com"
    ],
    "permalink": "https://YOUR_SUBDOMAIN_HERE.nocrm.io/leads/8113",
    "fields": {
      "email": "natalia.bawer@loretta-inc.com",
      "phone": "801 274 6798",
      "mobile": "832 764 1930 ",
      "address": "1234 N 7864 W President Bld - Salt Lake City, UT 84105",
      "web": "http://more-info-loretta.com",
      "first_name": "Natalia",
      "last_name": "Bawer",
      "full_name": "Natalia Bawer",
      "job": "Sales",
      "fax": null,
      "vat": null
    },
    "fields_by_name": {
      "Firstname": "Natalia",
      "Lastname": "Bawer",
      "Full name": "Natalia Bawer",
      "Email": "natalia.bawer@loretta-inc.com",
      "Phone": "801 274 6798",
      "Mobile": "832 764 1930 ",
      "Address": "1234 N 7864 W President Bld - Salt Lake City, UT 84105",
      "Web": "http://more-info-loretta.com",
      "Department": "Sales"
    },
    "comment_count": 0,
    "bcc_count": 0,
    "team": {
      "id": 5,
      "name": "Web Sales",
      "users": [
        {
          "id": 514,
          "lastname": "Stone",
          "firstname": "Stéphanie",
          "email": "stef@example.com",
          "is_manager": true
        },
        {
          "id": 436,
          "lastname": "Rose",
          "firstname": "Juliette",
          "email": "juliette@example.com",
          "is_manager": false
        }
      ],
      "updated_at": "2014-02-19T16:58:43.000Z",
      "created_at": "2014-02-11T22:41:26.000Z"
    },
    "user": {
      "id": 514,
      "lastname": "Stone",
      "firstname": "Stéphanie",
      "email": "stef@example.com",
      "phone": "+33609090909",
      "mobile_phone": ""
    },
    "client_folder": {
      "id": 12,
      "name": "Blue Client",
      "description": "Address: 2344 Paradise Av, Eden CA 90001",
      "is_active": true,
      "created_at": "2017-02-17T22:03:20.000Z",
      "user_id": 514,
      "extended_info": {
        "permalink": "https://YOUR_SUBDOMAIN_HERE.nocrm.io/clients/12",
        "fields": {
          "email": null,
          "phone": null,
          "mobile": null,
          "address": "2344 Paradise Av, Eden CA 90001",
          "web": null,
          "first_name": null,
          "last_name": null,
          "full_name": null,
          "job": null,
          "fax": null,
          "vat": null,
          "city": null,
          "zipcode": null,
          "state": null,
          "country": null
        },
        "fields_by_name": {
          "Address": "2344 Paradise Av, Eden CA 90001",
          "Billing address": null
        },
        "user": {
          "id": 514,
          "lastname": "Stone",
          "firstname": "Stéphanie",
          "email": "stef@example.com",
          "phone": "+33609090909",
          "mobile_phone": ""
        }
      }
    },
    "created_by": {
      "id": 514,
      "lastname": "Stone",
      "firstname": "Stéphanie",
      "email": "stef@example.com",
      "phone": "+33609090909",
      "mobile_phone": ""
    },
    "business_card_id": null,
    "visible_by_count": 1,
    "follow_ups": [

    ]
  }
}

Retrieve a lead previously created from its id.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/{id}

Parameters

Parameter Description
id required Lead's id. The identifier of the lead.

Http Status Code

Code type
200 ok
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
404 record_not_found
422 unprocessable_entity missing_parameter
429 too_many_requests

Update a lead

With the API key

curl -XPUT -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" -H "Content-Type: application/json" -d '{"amount":1562.89,"probability":85,"step":"In-touch"}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/8113"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
parameters = {
  amount: 1562.89,
  probability: 85,
  step: "In-touch"
}
response = RestClient.put "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/8113", parameters, header
updated_lead = JSON.parse(response)

With the USER token

curl -XPUT -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" -H "Content-Type: application/json" -d '{"amount":1562.89,"probability":85,"step":"In-touch"}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/8113"
require 'rest-client'

token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
parameters = {
  amount: 1562.89,
  probability: 85,
  step: "In-touch"
}
response = RestClient.put "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/8113", parameters, header
updated_lead = JSON.parse(response)

The above commands return JSON structured like this:

{
  "id": 8113,
  "title": "Syl Loretta Incr.",
  "pipeline": null,
  "step": "In-touch",
  "step_id": 45,
  "status": "Standby",
  "amount": 1562.89,
  "probability": 85,
  "currency": "USD",
  "starred": true,
  "next_action_at": "2014-03-12T07:00:00.000Z",
  "remind_date": null,
  "remind_time": null,
  "reminder_at": null,
  "reminder_duration": null,
  "created_at": "2014-02-28T17:37:33.000Z",
  "estimated_closing_date": null,
  "updated_at": "2014-02-28T17:38:05.000Z",
  "second_number": null,
  "amount_percentage": null,
  "reminder_activity_id": null,
  "reminder_activity_log_id": null,
  "reminder_note": "",
  "comment_count": 0,
  "closed_at": null,
  "description": "Firstname: Natalia\nLastname: Bawer\nFull name: Natalia Bawer\nEmail: natalia.bawer@loretta-inc.com\nPhone: 801 274 6798\nMobile: 832 764 1930 \nAddress: 1234 N 7864 W President Bld - Salt Lake City, UT 84105\nWeb: http://more-info-loretta.com\nDepartment: Sales\n--- Entrez une description ci-dessous ---\n \n--- \nMet Natalia at a seminar. She could be interested.\nShe is on business trip. Have to call her when she is back.",
  "html_description": "Firstname: Natalia<br />Lastname: Bawer<br />Full name: Natalia Bawer<br />Email: natalia.bawer@loretta-inc.com<br />Phone: 801 274 6798<br />Mobile: 832 764 1930&nbsp;<br />Address: 1234 N 7864 W President Bld - Salt Lake City, UT 84105<br />Web: http://more-info-loretta.com<br />Department: Sales<br />\r\n<p class=\"lead-desc-separator\">--- Entrez une description ci-dessous ---</p>\r\n<div>&nbsp;</div>\r\n<br />--- <br />\r\n<p>Met Natalia at a seminar. She could be interested.<br />She is on business trip. Have to call her when she is back.</p>",
  "tags": [
    "small",
    "US"
  ],
  "created_from": "api",
  "created_by_id": 514,
  "user_id": 514,
  "team_id": null,
  "client_folder_id": 12,
  "client_folder_name": "Blue Corp",
  "attachment_count": 0,
  "extended_info": {
    "first_contact_email": "natalia.bawer@loretta-inc.com",
    "all_contact_emails": [
      "natalia.bawer@loretta-inc.com"
    ],
    "permalink": "https://YOUR_SUBDOMAIN_HERE.nocrm.io/leads/8113",
    "fields": {
      "email": "natalia.bawer@loretta-inc.com",
      "phone": "801 274 6798",
      "mobile": "832 764 1930 ",
      "address": "1234 N 7864 W President Bld - Salt Lake City, UT 84105",
      "web": "http://more-info-loretta.com",
      "first_name": "Natalia",
      "last_name": "Bawer",
      "full_name": "Natalia Bawer",
      "job": "Sales",
      "fax": null,
      "vat": null
    },
    "fields_by_name": {
      "Firstname": "Natalia",
      "Lastname": "Bawer",
      "Full name": "Natalia Bawer",
      "Email": "natalia.bawer@loretta-inc.com",
      "Phone": "801 274 6798",
      "Mobile": "832 764 1930 ",
      "Address": "1234 N 7864 W President Bld - Salt Lake City, UT 84105",
      "Web": "http://more-info-loretta.com",
      "Department": "Sales"
    },
    "comment_count": 0,
    "bcc_count": 0,
    "team": null,
    "user": {
      "id": 514,
      "lastname": "Stone",
      "firstname": "Stéphanie",
      "email": "stef@example.com",
      "phone": "+33609090909",
      "mobile_phone": ""
    },
    "client_folder": {
      "id": 12,
      "name": "Blue Client",
      "description": "Address: 2344 Paradise Av, Eden CA 90001",
      "is_active": true,
      "created_at": "2017-02-17T22:03:20.000Z",
      "user_id": 514,
      "extended_info": {
        "permalink": "https://YOUR_SUBDOMAIN_HERE.nocrm.io/clients/12",
        "fields": {
          "email": null,
          "phone": null,
          "mobile": null,
          "address": "2344 Paradise Av, Eden CA 90001",
          "web": null,
          "first_name": null,
          "last_name": null,
          "full_name": null,
          "job": null,
          "fax": null,
          "vat": null,
          "city": null,
          "zipcode": null,
          "state": null,
          "country": null
        },
        "fields_by_name": {
          "Address": "2344 Paradise Av, Eden CA 90001",
          "Billing address": null
        },
        "user": {
          "id": 514,
          "lastname": "Stone",
          "firstname": "Stéphanie",
          "email": "stef@example.com",
          "phone": "+33609090909",
          "mobile_phone": ""
        }
      }
    },
    "created_by": {
      "id": 514,
      "lastname": "Stone",
      "firstname": "Stéphanie",
      "email": "stef@example.com",
      "phone": "+33609090909",
      "mobile_phone": ""
    },
    "business_card_id": null,
    "visible_by_count": 1,
    "follow_ups": [

    ]
  }
}

Update a lead previously created.

Http request

PUT https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/{id}

Parameters

Parameter Default Description
id required Lead's id. The identifier of the lead.
title optional Lead's title. The new title of the lead.
description optional Lead's description. The new description of the lead. Warning : you can't send description and fields or append_desc parameters at the same time.
status optional Lead's status. The new status of the lead. Could be one of these values: todo, standby, won, lost, cancelled. If the value is not recognized, an error 400 is returned.
remind_date optional Date of the reminder with the following format: YYYY-MM-DD in the time zone of the account. If the status is changed to standby, this parameter is mandatory, otherwise an error 400 is returned.
remind_time optional When a reminder date is added, a time can also be set. The format of the time is HH:MM and in 24h. The time can be set every 15 min. It is not mandatory, only the remind_at is mandatory in case of status changed to standby.
reminder_duration optional When a reminder date and time are added, the duration time can be updated. The duration is a positive integer in minutes and should be one of these values: 0, 15, 30, 45, 60, 90, 120, 150, 180, 240, 480, 720. It is not mandatory, if no duration is set, the default duration time of the lead's owner is used.
reminder_activity_id optional When setting up a reminder, you can define the activity for this reminder.
reminder_note optional Add a note when setting up a reminder.
amount optional Lead's amount. The new amount of the lead.
probability optional Lead's probability. The new probability of the lead.
starred optional Lead's starred. true if the lead is starred, false otherwise.
step optional New step's id or step's name for the lead. If the step is not found, an error 404 is returned. For information if you have steps in different pipeline that have the same name, it is better to use the step's id.
user_id optional Lead's user id or email. The new user id or user email of the lead. This update corresponds to assign the lead to a new user.
tags optional An array of tags describing the lead. If the tags don’t exist they are automatically created. The tags could also include the Predefined tags of your account.
created_at optional Date of lead's creation with the following format: YYYY-MM-DD HH:MM:SS in the time zone of the account and the time in 24h format. The time can be also be in UTC with this specific format: YYYY-MM-DDTHH:MM:SS.sssZ. Do not use this parameter if you don't want to past date your lead creation.
estimated_closing_date optional Estimated closing date on a lead. The date has to be in the time zone of the account.
fields optional Fields to update into description, must contain keys and values about fields to update, eg :
[{"key": "Phone", "value": "06 07 08 09 04"}, { "key": "Email", "value": "you@example.com"}, { "key": "Custom field", "value": "Hello"}].
Warning : you can't send description and fields parameters at the same time. See limitation
append_desc optional Text to append at the end of the lead's description. Warning: you can't send description and append_desc parameters simultaneously.

Http Status Code

Code type
200 ok
400 unauthorized_parameter unrecognized_parameter missing_parameter bad_parameter_format bad_parameter_format user_not_found
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 forbidden_action upgrade_edition
404 step_not_found client_not_found activity_not_found record_not_found
422 invalid_record not_found missing_parameter
429 too_many_requests

Assign a lead

With the API key

curl -XPOST -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" -H "Content-Type: application/json" -d '{"user_id":514}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/8113/assign"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
parameters = { user_id: 514 }
response = RestClient.post "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/8113/assign", parameters, header
lead = JSON.parse(response)

With the USER token

curl -XPOST -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" -H "Content-Type: application/json" -d '{"user_id":514}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/8113/assign"
require 'rest-client'

token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
parameters = { user_id: 514 }
response = RestClient.post "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/8113/assign", parameters, header
lead = JSON.parse(response)

The above commands return JSON structured like this:

{
  "id": 8113,
  "title": "Syl Loretta Incr.",
  "pipeline": null,
  "step": "In-touch",
  "step_id": 45,
  "status": "Standby",
  "amount": 1562.89,
  "probability": 85,
  "currency": "USD",
  "starred": true,
  "next_action_at": "2014-03-12T07:00:00.000Z",
  "remind_date": "2014-03-12",
  "remind_time": "09:00",
  "reminder_at": "2014-03-12T15:00:00.000Z",
  "reminder_duration": 30,
  "created_at": "2014-02-28T17:37:33.000Z",
  "estimated_closing_date": null,
  "updated_at": "2014-02-28T17:38:05.000Z",
  "second_number": null,
  "amount_percentage": null,
  "reminder_activity_id": 12,
  "reminder_activity_log_id": 21,
  "reminder_note": "",
  "comment_count": 0,
  "closed_at": null,
  "description": "Firstname: Natalia\nLastname: Bawer\nFull name: Natalia Bawer\nEmail: natalia.bawer@loretta-inc.com\nPhone: 801 274 6798\nMobile: 832 764 1930 \nAddress: 1234 N 7864 W President Bld - Salt Lake City, UT 84105\nWeb: http://more-info-loretta.com\nDepartment: Sales\n--- Entrez une description ci-dessous ---\n \n--- \nMet Natalia at a seminar. She could be interested.\nShe is on business trip. Have to call her when she is back.",
  "html_description": "Firstname: Natalia<br />Lastname: Bawer<br />Full name: Natalia Bawer<br />Email: natalia.bawer@loretta-inc.com<br />Phone: 801 274 6798<br />Mobile: 832 764 1930&nbsp;<br />Address: 1234 N 7864 W President Bld - Salt Lake City, UT 84105<br />Web: http://more-info-loretta.com<br />Department: Sales<br />\r\n<p class=\"lead-desc-separator\">--- Entrez une description ci-dessous ---</p>\r\n<div>&nbsp;</div>\r\n<br />--- <br />\r\n<p>Met Natalia at a seminar. She could be interested.<br />She is on business trip. Have to call her when she is back.</p>",
  "tags": [
    "small",
    "US"
  ],
  "created_from": "api",
  "created_by_id": 514,
  "user_id": 514,
  "team_id": 5,
  "client_folder_id": 12,
  "client_folder_name": "Blue Corp",
  "attachment_count": 0,
  "extended_info": {
    "first_contact_email": "natalia.bawer@loretta-inc.com",
    "all_contact_emails": [
      "natalia.bawer@loretta-inc.com"
    ],
    "permalink": "https://YOUR_SUBDOMAIN_HERE.nocrm.io/leads/8113",
    "fields": {
      "email": "natalia.bawer@loretta-inc.com",
      "phone": "801 274 6798",
      "mobile": "832 764 1930 ",
      "address": "1234 N 7864 W President Bld - Salt Lake City, UT 84105",
      "web": "http://more-info-loretta.com",
      "first_name": "Natalia",
      "last_name": "Bawer",
      "full_name": "Natalia Bawer",
      "job": "Sales",
      "fax": null,
      "vat": null
    },
    "fields_by_name": {
      "Firstname": "Natalia",
      "Lastname": "Bawer",
      "Full name": "Natalia Bawer",
      "Email": "natalia.bawer@loretta-inc.com",
      "Phone": "801 274 6798",
      "Mobile": "832 764 1930 ",
      "Address": "1234 N 7864 W President Bld - Salt Lake City, UT 84105",
      "Web": "http://more-info-loretta.com",
      "Department": "Sales"
    },
    "comment_count": 0,
    "bcc_count": 0,
    "team": {
      "id": 5,
      "name": "Web Sales",
      "users": [
        {
          "id": 514,
          "lastname": "Stone",
          "firstname": "Stéphanie",
          "email": "stef@example.com",
          "is_manager": true
        },
        {
          "id": 436,
          "lastname": "Rose",
          "firstname": "Juliette",
          "email": "juliette@example.com",
          "is_manager": false
        }
      ],
      "updated_at": "2014-02-19T16:58:43.000Z",
      "created_at": "2014-02-11T22:41:26.000Z"
    },
    "user": {
      "id": 514,
      "lastname": "Stone",
      "firstname": "Stéphanie",
      "email": "stef@example.com",
      "phone": "+33609090909",
      "mobile_phone": ""
    },
    "client_folder": {
      "id": 12,
      "name": "Blue Client",
      "description": "Address: 2344 Paradise Av, Eden CA 90001",
      "is_active": true,
      "created_at": "2017-02-17T22:03:20.000Z",
      "user_id": 514,
      "extended_info": {
        "permalink": "https://YOUR_SUBDOMAIN_HERE.nocrm.io/clients/12",
        "fields": {
          "email": null,
          "phone": null,
          "mobile": null,
          "address": "2344 Paradise Av, Eden CA 90001",
          "web": null,
          "first_name": null,
          "last_name": null,
          "full_name": null,
          "job": null,
          "fax": null,
          "vat": null,
          "city": null,
          "zipcode": null,
          "state": null,
          "country": null
        },
        "fields_by_name": {
          "Address": "2344 Paradise Av, Eden CA 90001",
          "Billing address": null
        },
        "user": {
          "id": 514,
          "lastname": "Stone",
          "firstname": "Stéphanie",
          "email": "stef@example.com",
          "phone": "+33609090909",
          "mobile_phone": ""
        }
      }
    },
    "created_by": {
      "id": 514,
      "lastname": "Stone",
      "firstname": "Stéphanie",
      "email": "stef@example.com",
      "phone": "+33609090909",
      "mobile_phone": ""
    },
    "business_card_id": null,
    "visible_by_count": 1,
    "follow_ups": [

    ]
  }
}

Assign a lead to a collaborator. The user will be notified by email of the assignment if the preference to receive notifications is checked.

Http request

POST https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/{id}/assign

Parameters

Parameter Description
user_id required Lead's user id or email. The new user id or user email of the lead. This update corresponds to assign the lead to a new user.

Http Status Code

Code type
200 ok
400 user_not_in_team user_not_found
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 forbidden_action upgrade_edition
404 record_not_found
422 missing_parameter missing_parameter
429 too_many_requests

List the unassigned leads

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/unassigned"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/unassigned", header
unassigned_leads = JSON.parse(response)

With the USER token

curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/unassigned"
require 'rest-client'
token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/unassigned", header
unassigned_leads = JSON.parse(response)

The above commands return JSON structure like this:

[
  {
    "id": 8113,
    "title": "Loretta Inc.",
    "pipeline": null,
    "step": "Incoming",
    "step_id": 45,
    "status": "todo",
    "amount": null,
    "probability": null,
    "currency": null,
    "starred": false,
    "next_action_at": "2017-05-28T01:00:01.000Z",
    "remind_date": null,
    "remind_time": null,
    "created_at": "2017-05-28T17:37:33.000Z",
    "estimated_closing_date": null,
    "updated_at": "2017-05-28T17:37:33.000Z",
    "second_number": null,
    "amount_percentage": null,
    "reminder_activity_id": null,
    "reminder_activity_log_id": null,
    "reminder_note": "",
    "comment_count": 0,
    "closed_at": null,
    "description": "Firstname: Natalia\nLastname: Bawer\nFull name: Natalia Bawer\nEmail: natalia.bawer@loretta-inc.com\nPhone: 801 274 6798\nMobile: 832 764 1930 \nAddress: 1234 N 7864 W President Bld - Salt Lake City, UT 84105\nWeb: http://more-info-loretta.com\nDepartment: Sales\n--- Entrez une description ci-dessous ---\n \n--- \nMet Natalia at a seminar. She could be interested.\nShe is on business trip. Have to call her when she is back.",
    "html_description": "Firstname: Natalia\u003Cbr /\u003ELastname: Bawer\u003Cbr /\u003EFull name: Natalia Bawer\u003Cbr /\u003EEmail: natalia.bawer@loretta-inc.com\u003Cbr /\u003EPhone: 801 274 6798\u003Cbr /\u003EMobile: 832 764 1930\u0026nbsp;\u003Cbr /\u003EAddress: 1234 N 7864 W President Bld - Salt Lake City, UT 84105\u003Cbr /\u003EWeb: http://more-info-loretta.com\u003Cbr /\u003EDepartment: Sales\u003Cbr /\u003E\r\n\u003Cp class=\"lead-desc-separator\"\u003E--- Entrez une description ci-dessous ---\u003C/p\u003E\r\n\u003Cdiv\u003E\u0026nbsp;\u003C/div\u003E\r\n\u003Cbr /\u003E--- \u003Cbr /\u003E\r\n\u003Cp\u003EMet Natalia at a seminar. She could be interested.\u003Cbr /\u003EShe is on business trip. Have to call her when she is back.\u003C/p\u003E",
    "tags": ["small","US"],
    "created_from": "me@example.com",
    "closed_at": null,
    "attachment_count": 0,
    "created_by_id": null,
    "user_id": null,
    "client_folder_id": null,
    "client_folder_name": null
  },
  {
    "id": 8112,
    "title": "Acme Corp",
    "pipeline": null,
      "step": "Incoming",
      "step_id": 45,
    "status": "todo",
    "amount": null,
    "probability": null,
    "currency": null,
    "starred": false,
    "next_action_at": "2014-02-28T01:00:01.000Z",
    "remind_date": null,
    "remind_time": null,
    "created_at": "2014-02-28T17:31:04.000Z",
    "estimated_closing_date": null,
    "updated_at": "2014-02-28T17:31:04.000Z",
    "second_number": null,
    "amount_percentage": null,
    "reminder_activity_id": null,
    "reminder_activity_log_id": null,
    "reminder_note": "",
    "comment_count": 0,
    "closed_at": null,
    "text_description": "Firstname: John\nLastname: Doe\nEmail: john.doe@acme.corp.com\nPhone: 201 418 1625\n---\nJohn is very interested by our service. He wants a quote asap.\n",
      "html_description": "Firstname: John\u003Cbr /\u003ELastname: Doe\u003Cbr /\u003EEmail: john.doe@acme.corp.com\u003Cbr /\u003EPhone: 201 418 1625\u003Cbr /\u003E\r\n---\r\n\u003Cp\u003EJohn is very interested by our service. He wants a quote asap.\u003Cbr /\u003E\u003Cbr /\u003E\u003C/p\u003E",
    "tags": [],
    "created_from": "me@example.com",
    "closed_at": null,
    "attachment_count": 0,
    "created_by_id": null,
    "user_id": null,
    "client_folder_id": null,
    "client_folder_name": null
  }
]

Return the list of unassigned leads.

The leads are returned with a limit of 100 by default. However it is possible to lower this limit.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/unassigned

Parameters

Parameter Default Description
limit optional 100 Maximum count of data returned by the request.

Http Status Code

Code type
200 ok
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 forbidden_action upgrade_edition
422 missing_parameter
429 too_many_requests

Add a lead to a Client folder

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" -H "Content-Type: application/json" -d '{"client_id": 12}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/8113/add_to_client"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
parameters = { client_id: 12 }
response = RestClient.post "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/8113/add_to_client", parameters, header
lead = JSON.parse(response)

With the USER token

curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" -H "Content-Type: application/json" -d '{"client_id": 12}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/8113/add_to_client"
require 'rest-client'

token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
parameters = { client_id: 12 }
response = RestClient.post "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/8113/add_to_client", parameters, header
lead = JSON.parse(response)

The above commands return JSON structured like this:

{
  "id": 8113,
  "title": "Syl Loretta Incr.",
  "pipeline": null,
  "step": "In-touch",
  "step_id": 45,
  "status": "Standby",
  "amount": 1562.89,
  "probability": 85,
  "currency": "USD",
  "starred": true,
  "next_action_at": "2014-03-12T07:00:00.000Z",
  "remind_date": "2014-03-12",
  "remind_time": "09:00",
  "reminder_at": "2014-03-12T15:00:00.000Z",
  "reminder_duration": 30,
  "created_at": "2014-02-28T17:37:33.000Z",
  "estimated_closing_date": null,
  "updated_at": "2014-02-28T17:38:05.000Z",
  "second_number": null,
  "amount_percentage": null,
  "reminder_activity_id": 12,
  "reminder_activity_log_id": 21,
  "reminder_note": "",
  "comment_count": 0,
  "closed_at": null,
  "description": "Firstname: Natalia\nLastname: Bawer\nFull name: Natalia Bawer\nEmail: natalia.bawer@loretta-inc.com\nPhone: 801 274 6798\nMobile: 832 764 1930 \nAddress: 1234 N 7864 W President Bld - Salt Lake City, UT 84105\nWeb: http://more-info-loretta.com\nDepartment: Sales\n--- Entrez une description ci-dessous ---\n \n--- \nMet Natalia at a seminar. She could be interested.\nShe is on business trip. Have to call her when she is back.",
  "html_description": "Firstname: Natalia<br />Lastname: Bawer<br />Full name: Natalia Bawer<br />Email: natalia.bawer@loretta-inc.com<br />Phone: 801 274 6798<br />Mobile: 832 764 1930&nbsp;<br />Address: 1234 N 7864 W President Bld - Salt Lake City, UT 84105<br />Web: http://more-info-loretta.com<br />Department: Sales<br />\r\n<p class=\"lead-desc-separator\">--- Entrez une description ci-dessous ---</p>\r\n<div>&nbsp;</div>\r\n<br />--- <br />\r\n<p>Met Natalia at a seminar. She could be interested.<br />She is on business trip. Have to call her when she is back.</p>",
  "tags": [
    "small",
    "US"
  ],
  "created_from": "api",
  "created_by_id": 514,
  "user_id": 514,
  "team_id": 5,
  "client_folder_id": 12,
  "client_folder_name": "Blue Corp",
  "attachment_count": 0,
  "extended_info": {
    "first_contact_email": "natalia.bawer@loretta-inc.com",
    "all_contact_emails": [
      "natalia.bawer@loretta-inc.com"
    ],
    "permalink": "https://YOUR_SUBDOMAIN_HERE.nocrm.io/leads/8113",
    "fields": {
      "email": "natalia.bawer@loretta-inc.com",
      "phone": "801 274 6798",
      "mobile": "832 764 1930 ",
      "address": "1234 N 7864 W President Bld - Salt Lake City, UT 84105",
      "web": "http://more-info-loretta.com",
      "first_name": "Natalia",
      "last_name": "Bawer",
      "full_name": "Natalia Bawer",
      "job": "Sales",
      "fax": null,
      "vat": null
    },
    "fields_by_name": {
      "Firstname": "Natalia",
      "Lastname": "Bawer",
      "Full name": "Natalia Bawer",
      "Email": "natalia.bawer@loretta-inc.com",
      "Phone": "801 274 6798",
      "Mobile": "832 764 1930 ",
      "Address": "1234 N 7864 W President Bld - Salt Lake City, UT 84105",
      "Web": "http://more-info-loretta.com",
      "Department": "Sales"
    },
    "comment_count": 0,
    "bcc_count": 0,
    "team": {
      "id": 5,
      "name": "Web Sales",
      "users": [
        {
          "id": 514,
          "lastname": "Stone",
          "firstname": "Stéphanie",
          "email": "stef@example.com",
          "is_manager": true
        },
        {
          "id": 436,
          "lastname": "Rose",
          "firstname": "Juliette",
          "email": "juliette@example.com",
          "is_manager": false
        }
      ],
      "updated_at": "2014-02-19T16:58:43.000Z",
      "created_at": "2014-02-11T22:41:26.000Z"
    },
    "user": {
      "id": 514,
      "lastname": "Stone",
      "firstname": "Stéphanie",
      "email": "stef@example.com",
      "phone": "+33609090909",
      "mobile_phone": ""
    },
    "client_folder": {
      "id": 12,
      "name": "Blue Client",
      "description": "Address: 2344 Paradise Av, Eden CA 90001",
      "is_active": true,
      "created_at": "2017-02-17T22:03:20.000Z",
      "user_id": 514,
      "extended_info": {
        "permalink": "https://YOUR_SUBDOMAIN_HERE.nocrm.io/clients/12",
        "fields": {
          "email": null,
          "phone": null,
          "mobile": null,
          "address": "2344 Paradise Av, Eden CA 90001",
          "web": null,
          "first_name": null,
          "last_name": null,
          "full_name": null,
          "job": null,
          "fax": null,
          "vat": null,
          "city": null,
          "zipcode": null,
          "state": null,
          "country": null
        },
        "fields_by_name": {
          "Address": "2344 Paradise Av, Eden CA 90001",
          "Billing address": null
        },
        "user": {
          "id": 514,
          "lastname": "Stone",
          "firstname": "Stéphanie",
          "email": "stef@example.com",
          "phone": "+33609090909",
          "mobile_phone": ""
        }
      }
    },
    "created_by": {
      "id": 514,
      "lastname": "Stone",
      "firstname": "Stéphanie",
      "email": "stef@example.com",
      "phone": "+33609090909",
      "mobile_phone": ""
    },
    "business_card_id": null,
    "visible_by_count": 1,
    "follow_ups": [

    ]
  }
}

Add a lead to an existing client folder.

Http request

POST https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/{id}/add_to_client

Parameters

Parameter Description
id required Lead's id. The identifier of the lead.
client_id required Client folder's id. The identifier of a client folder

Http Status Code

Code type
200 ok
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
404 client_not_found record_not_found
422 unprocessable_entity missing_parameter missing_parameter
429 too_many_requests

Retrieve the business card of a lead

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/8113/business_card"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/8113/business_card", header
bc = JSON.parse(response)

With the USER token

curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" -XDELETE "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/8113/business_card"
require 'rest-client'

token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/8113/business_card", header
bc = JSON.parse(response)

The above commands return JSON structured like this:

{
  "url": "https://ydncrm-attach.s3.amazonaws.com/dev-uploads/attachment/412/NY.jpg?X-Amz-Expires=180&X-Amz-Date=20160127T182551Z&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3MOBWMRZJZTNUNQ/20160127/us-east-1/s3/aws4_request&X-Amz-SignedHeaders=host&X-Amz-Signature=f382ddd16cd0afb87688bd5d8e543302244f36dc26b15fd1eb6d9ee06e64954b"
}

Retrieve the picture of a business card on a lead previously created by a business card.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/{id}/business_card

Parameters

Parameter Description
id required Lead's id. The identifier of the lead.

Http Status Code

Code type
200 ok
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
404 business_card_not_found record_not_found
422 missing_parameter
429 too_many_requests

Create a call on a lead

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" -H "X-API-PARTNER-KEY: ASfTFxrey" -H "Content-Type: application/json" -d '{"user_id":514,"called_number":"06 06 06 06 06","from_number":"06 06 06 06 07","started_at":"2022-02-03 04:05:06+02:00","ended_at":"2022-02-03 04:06:06+02:00","direction":"outbound","record_link":"https://example.com/my_record","ext_call_key":"32090433","feedback":"Best call ever"}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/9402/call"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
partner_key = "ASfTFxrey"
header = { 'X-API-KEY' => key, 'X-API-PARTNER-KEY' => partner_key, content_type: :json, accept: "application/json" }
parameters = {
  user_id: 514,
  called_number: "06 06 06 06 06",
  from_number: "06 06 06 06 07",
  started_at: "2022-02-03 04:05:06+02:00",
  ended_at: "2022-02-03 04:06:06+02:00",
  direction: "outbound",
  record_link: "https://example.com/my_record",
  ext_call_key: "32090433",
  feedback: "Best call ever"
}
response = RestClient.post "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/9402/call", parameters, header
call = JSON.parse(response)

With the USER token

curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" -H "X-API-PARTNER-KEY: ASfTFxrey" -H "Content-Type: application/json" -d '{"called_number":"06 06 06 06 06","from_number":"06 06 06 06 07","started_at":"2022-02-03 04:05:06+02:00","ended_at":"2022-02-03 04:06:06+02:00","direction":"outbound","record_link":"https://example.com/my_record","ext_call_key":"32090433","feedback":"Best call ever"}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/9402/call"
require 'rest-client'

token = "ITd-Jb3EC_nCXI2fez4hhg"
partner_key = "ASfTFxrey"
header = { 'X-USER-TOKEN' => token, 'X-API-PARTNER-KEY' => partner_key, content_type: :json, accept: "application/json" }
parameters = {
  called_number: "06 06 06 06 06",
  from_number: "06 06 06 06 07",
  started_at: "2022-02-03 04:05:06+02:00",
  ended_at: "2022-02-03 04:06:06+02:00",
  direction: "outbound",
  record_link: "https://example.com/my_record",
  ext_call_key: "32090433",
  feedback: "Best call ever"
}
response = RestClient.post "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/9402/call", parameters, header
call = JSON.parse(response)

The above commands return JSON structured like this:

{
  "id": 13,
  "ext_call_key": "32090433",
  "provider": "ringcentral",
  "direction": "outbound",
  "called_number": "606060606",
  "from_number": "606060607",
  "record_link": "https://example.com/my_record",
  "started_at": "2022-02-03T02:05:06.000Z",
  "ended_at": "2022-02-03T02:06:06.000Z",
  "sent_at": null,
  "duration": 60.0,
  "created_at": "2022-09-15T12:54:40.000Z",
  "kind": "call",
  "user": {
    "id": 514,
    "lastname": "Stone",
    "firstname": "Stéphanie",
    "email": "stef@example.com",
    "phone": "+33609090909",
    "mobile_phone": ""
  },
  "called_item": {
    "item": "Lead",
    "id": 9402
  },
  "comment": {
    "id": 1581,
    "content": "Best call ever",
    "activity_id": 1,
    "is_pinned": false
  },
  "text_content": null
}

Create a call on a lead.

Http request

POST https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/{lead_id}/call

Parameters

Parameter Description
lead_id required Lead's id. The identifier of the lead (present in url).
called_number required The phone number called. This parameter is required in case of outbound call
from_number required The phone number who initiated the call. This parameter is required in case of inbound call
direction required Must be inbound or outbound
user_id optional User’s email address or id to whom the call should belong.
started_at optional Date of call's start with the following format: YYYY-MM-DD HH:MM:SS in the time zone of the account and the time in 24h format. The time can also be in UTC with this specific format: YYYY-MM-DDTHH:MM:SS.sssZ. Warning : started_at < ended_at
ended_at optional Date of call's end with the following format: YYYY-MM-DD HH:MM:SS in the time zone of the account and the time in 24h format. The time can also be in UTC with this specific format: YYYY-MM-DDTHH:MM:SS.sssZ. Warning : started_at < ended_at
record_link optional Link to the record
ext_call_key optional Call ID from the partner side
feedback optional A text that the customer could fill up to have feedback on the call and might add insight regarding the call

Http Status Code

Code type
201 created
400 bad_request
401 unauthorized unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 invalid_record forbidden forbidden upgrade_edition
404 record_not_found
422 unprocessable_entity invalid_record missing_parameter
429 too_many_requests

Delete a lead

With the API key

curl -XDELETE -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/8113"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.delete "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/8113", header
lead = JSON.parse(response)

With the USER token

curl -XDELETE -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/8113"
require 'rest-client'

token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
response = RestClient.delete "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/8113", header
lead = JSON.parse(response)

The above commands return JSON structured like this:

{
  "id": 8113
}

Delete a lead previously created from its id.

Http request

DELETE https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/{id}

Parameters

Parameter Description
id required Lead's id. The identifier of the lead.

Http Status Code

Code type
200 ok
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 forbidden_action upgrade_edition
404 record_not_found
422 missing_parameter
429 too_many_requests

Delete multiple leads at once

With the API key

curl -XDELETE -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" -H "Content-Type: application/json" -d '{"ids":"8484,8485,8486"}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/delete_multiple"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
parameters = { ids: "8484,8485,8486" }
response = RestClient.delete "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/delete_multiple", parameters, header
not_deleted_lead_ids = JSON.parse(response)

With the USER token

curl -XDELETE -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" -H "Content-Type: application/json" -d '{"ids":"8484,8485,8486"}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/delete_multiple"
require 'rest-client'

token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
parameters = { ids: "8484,8485,8486" }
response = RestClient.delete "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/delete_multiple", parameters, header
not_deleted_lead_ids = JSON.parse(response)

The above commands return JSON structured like this:

[ 8486 ]

Delete multiple leads at once from their ids. It returns a list of lead ids that couldn't be deleted: not existing anymore, no rights to delete,... This list will empty of course if all lead ids have been deleted.

Http request

DELETE https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/delete_multiple

Parameters

Parameter Description
ids required Comma separated lead's ids.

Http Status Code

Code type
200 ok
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 forbidden_action upgrade_edition
404 record_not_found
422 missing_parameter missing_parameter
429 too_many_requests

Retrieve all comments from a lead

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/9402/comments"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/9402/comments", header
comments = JSON.parse(response)

With the USER token

curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/9402/comments"
require 'rest-client'

token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/9402/comments", header
comments = JSON.parse(response)

The above commands return JSON structured like this:

[
  {
    "id": 13834,
    "content": "This is a comment",
    "commented_item":
    {
      "item": "Lead",
      "id": 9402
    },
    "created_at": "2015-08-12T21:57:40.000Z",
    "attachments": [
      {
        "id": 24,
        "name": "780_3.pdf",
        "url": "https://www.dropbox.com/s/gamibhk6kq9uaez/780_3.pdf?dl=0",
        "permalink": "https://www.dropbox.com/s/gamibhk6kq9uaez/780_3.pdf?dl=0",
        "content_type": null,
        "kind": "dropbox"
      }
    ],
    "activity_id": null,
    "is_pinned": false,
    "raw_content": "This is a comment",
    "extended_info": null,
    "reactions": [],
    "user":
    {
      "id": 514,
      "lastname": "Stone",
      "firstname": "Stéphanie",
      "email": "stef@example.com",
      "phone": "2223334444",
      "mobile_phone": ""
    }
  },
  {
    "id": 13836,
    "content": "This is another comment",
    "commented_item":
    {
      "item": "Lead",
      "id": 9402
    },
    "created_at": "2015-08-15T10:57:40.000Z",
    "attachments": [],
    "activity_id": null,
    "is_pinned": false,
    "raw_content": "This is another comment",
    "extended_info": null,
    "reactions": [],
    "user":
    {
      "id": 514,
      "lastname": "Stone",
      "firstname": "Stéphanie",
      "email": "stef@example.com",
      "phone": "2223334444",
      "mobile_phone": ""
    }
  },
  {
    "id": 13839,
    "content": null,
    "commented_item":
    {
      "item": "Lead",
      "id": 9402
    },
    "created_at": "2023-06-05T12:04:21.000Z",
    "attachments": [],
    "activity_id": 4,
    "is_pinned": false,
    "raw_content": null,
    "extended_info": {
      "from": "stef@example.com",
      "to": "mimosa@example.com",
      "cc": "",
      "subject": "This is an email"
    },
    "reactions": [],
    "user": {
      "id": 514,
      "lastname": "Stone",
      "firstname": "Stéphanie",
      "email": "stef@example.com",
      "phone": "2223334444",
      "mobile_phone": ""
    },
    "activity": {
      "id": 4,
      "name": "E-mail",
      "kind": "email",
      "duration": null,
      "icon": "envelope",
      "color": "#000000",
      "created_at": "2020-09-23T21:34:49.000Z",
      "is_outcome": false
    },
    "action_item": {
      "type": "email",
      "email": {
        "id": 125,
        "parent_item": {
          "item": "Lead",
          "id": 486
        },
        "to": "mimosa@example.com",
        "from": "stef@example.com",
        "from_name": null,
        "cc": "",
        "bcc": "",
        "subject": "This is an email",
        "content": "Hello!",
        "threaded_content": [
            "Hello!"
        ],
        "has_more_content": false,
        "sent_at": "2023-06-05T12:19:00.000Z",
        "created_at": "2023-06-05T12:04:21.000Z",
        "attachments": [],
        "is_read": true,
        "lead_id": 9402,
        "status": 4,
        "scheduled_at": "2023-06-05T12:19:00.000Z",
        "user": {
          "id": 514,
          "lastname": "Stone",
          "firstname": "Stéphanie",
          "email": "stef@example.com",
          "phone": "2223334444",
          "mobile_phone": ""
        }
      }
    }
  }
]

Retrieve all comments of a lead.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/{lead_id}/comments

Parameters

Parameter Default Description
lead_id required Lead's id. The identifier of the lead.
direction optional desc Direction for ordereing the data returned in ascending or descending. The value should be asc or desc.

Http Status Code

Code type
200 ok
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
404 record_not_found
422 missing_parameter
429 too_many_requests

Create a comment on a lead

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" -H "Content-Type: application/json" -d '{"content":"this is a content","user_id":514}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/2999/comments"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
parameters = {
  content: "this is a content",
  user_id: 514
}
response = RestClient.post "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/2999/comments", parameters, header
comments = JSON.parse(response)

With the USER token

curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" -H "Content-Type: application/json" -d '{"content":"this is a content"}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/2999/comments"
require 'rest-client'

token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
parameters = {
  content: "this is a content"
}
response = RestClient.post "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/2999/comments", parameters, header
comments = JSON.parse(response)

The above commands return JSON structured like this:

{
  "id": 99,
  "content": "this is a content",
  "commented_item": {
    "item": "Lead",
    "id": 2999
  },
  "created_at": "2015-08-20T21:57:40.000Z",
  "attachments": [

  ],
  "activity_id": null,
  "is_pinned": true,
  "raw_content": "this is a content",
  "extended_info": null,
  "reactions": [

  ],
  "user": {
    "id": 514,
    "lastname": "Stone",
    "firstname": "Stéphanie",
    "email": "stef@example.com",
    "phone": "2223334444",
    "mobile_phone": ""
  }
}

Create a comment on a lead.

Http request

POST https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/{lead_id}/comments

Parameters

Parameter Description
lead_id required Lead's id. The identifier of the lead.
content required Content of the comment.
user_id optional User’s email address or id to whom the comment should belong. This parameter is ignored in case of the login method to authenticate is used. (USER token)
attachments optional Attachment to add on the comment
activity_id optional Activity's id to set on the comment

Http Status Code

Code type
201 created
400 unauthorized_parameter unrecognized_parameter unprocessable_entity user_not_found
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
404 record_not_found
422 invalid_file_format unknown missing_parameter
429 too_many_requests

Update a comment on a lead

With the API key

curl -XPUT -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" -H "Content-Type: application/json" -d '{"content":"this is a content","activity_id":3,"is_pinned":true}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/2999/comments/99"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
parameters = {
  content: "this is a content",
  activity_id: 3,
  is_pinned: true
}
response = RestClient.put "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/2999/comments/99", parameters, header
comment = JSON.parse(response)

With the USER token

curl -XPUT -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" -H "Content-Type: application/json" -d '{"content":"this is a content","activity_id":3,"is_pinned":true}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/2999/comments/99"
require 'rest-client'

token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
parameters = {
  content: "this is a content",
  activity_id: 3,
  is_pinned: true
}
response = RestClient.put "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/2999/comments/99", parameters, header
comment = JSON.parse(response)

The above commands return JSON structured like this:

{
  "id": 99,
  "content": "this is a content",
  "commented_item": {
    "item": "Lead",
    "id": 2999
  },
  "created_at": "2015-08-20T21:57:40.000Z",
  "attachments": [

  ],
  "activity_id": 3,
  "is_pinned": true,
  "raw_content": "this is a content",
  "extended_info": null,
  "reactions": [

  ],
  "user": {
    "id": 514,
    "lastname": "Stone",
    "firstname": "Stéphanie",
    "email": "stef@example.com",
    "phone": "2223334444",
    "mobile_phone": ""
  },
  "activity": {
    "id": 3,
    "name": "Unanswered",
    "kind": "call",
    "duration": null,
    "icon": "phone",
    "color": "#dc3545",
    "created_at": "2022-11-23T08:40:33.000Z",
    "is_outcome": true
  }
}

Http request

PUT https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/{lead_id}/comments/{id}

Parameters

Parameter Description
content required Replace existing content
activity_id optional Activity's id to set on the comment
is_pinned optional Pinned the comment

Http Status Code

Code type
200 ok
400 unprocessable_entity unrecognized_parameter
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 forbidden_action upgrade_edition
404 record_not_found
422 missing_parameter
429 too_many_requests

Delete a comment on a lead

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" -XDELETE "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/9402/comments/13834"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.delete "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/9402/comments/13834", header
comment = JSON.parse(response)

With the USER token

curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" -XDELETE "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/9402/comments/13834"
require 'rest-client'

token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
response = RestClient.delete "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/9402/comments/13834", header
comment = JSON.parse(response)

The above commands return JSON structured like this:

{
  "id": 13834
}

Delete a comment on a lead.

Http request

DELETE https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/{lead_id}/comments/{id}

Parameters

Parameter Description
lead_id required Lead's id. The identifier of the lead.
id required Comment's id. The identifier of the comment to delete.

Http Status Code

Code type
200 ok
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 forbidden_action upgrade_edition
404 activity_log_not_found record_not_found
422 missing_parameter
429 too_many_requests

Retrieves all duplicates of a lead

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/9402/duplicates"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/9402/duplicates", header
attachments = JSON.parse(response)

With the USER token

curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/9402/duplicates"
require 'rest-client'

token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/9402/duplicates", header
attachments = JSON.parse(response)

The above commands return JSON structured like this:

[
  {
    "lead": {
      "id": 8113,
      "title": "Loretta Inc.",
      "pipeline": null,
      "step": "Incoming",
      "step_id": 45,
      "status": "Standby",
      "amount": 2400.0,
      "probability": 30,
      "currency": "USD",
      "starred": true,
      "next_action_at": "2014-03-12T07:00:00.000Z",
      "remind_date": "2014-03-12",
      "remind_time": "09:00",
      "reminder_at": "2014-03-12T15:00:00.000Z",
      "reminder_duration": 30,
      "created_at": "2014-02-28T17:37:33.000Z",
      "estimated_closing_date": null,
      "updated_at": "2014-02-28T17:38:05.000Z",
      "second_number": null,
      "amount_percentage": null,
      "reminder_activity_id": 12,
      "reminder_activity_log_id": 21,
      "reminder_note": "",
      "comment_count": 0,
      "closed_at": null,
      "description": "Firstname: Natalia\nLastname: Bawer\nFull name: Natalia Bawer\nEmail: natalia.bawer@loretta-inc.com\nPhone: 801 274 6798\nMobile: 832 764 1930 \nAddress: 1234 N 7864 W President Bld - Salt Lake City, UT 84105\nWeb: http://more-info-loretta.com\nDepartment: Sales\n--- Entrez une description ci-dessous ---\n \n--- \nMet Natalia at a seminar. She could be interested.\nShe is on business trip. Have to call her when she is back.",
      "html_description": "Firstname: Natalia\u003Cbr /\u003ELastname: Bawer\u003Cbr /\u003EFull name: Natalia Bawer\u003Cbr /\u003EEmail: natalia.bawer@loretta-inc.com\u003Cbr /\u003EPhone: 801 274 6798\u003Cbr /\u003EMobile: 832 764 1930\u0026nbsp;\u003Cbr /\u003EAddress: 1234 N 7864 W President Bld - Salt Lake City, UT 84105\u003Cbr /\u003EWeb: http://more-info-loretta.com\u003Cbr /\u003EDepartment: Sales\u003Cbr /\u003E\r\n\u003Cp class=\"lead-desc-separator\"\u003E--- Entrez une description ci-dessous ---\u003C/p\u003E\r\n\u003Cdiv\u003E\u0026nbsp;\u003C/div\u003E\r\n\u003Cbr /\u003E--- \u003Cbr /\u003E\r\n\u003Cp\u003EMet Natalia at a seminar. She could be interested.\u003Cbr /\u003EShe is on business trip. Have to call her when she is back.\u003C/p\u003E",
      "tags": ["small","US"],
      "created_from": "api",
      "created_by_id": 514,
      "user_id": 514,
      "team_id": 5,
      "client_folder_id": 1,
      "client_folder_name": "Acme",
      "attachment_count": 0,
      "extended_info":
      {
        "first_contact_email": "natalia.bawer@loretta-inc.com",
        "all_contact_emails": ["natalia.bawer@loretta-inc.com"],
        "permalink": "https://YOUR_SUBDOMAIN_HERE.nocrm.io/leads/8113",
        "fields":
        {
          "email": "natalia.bawer@loretta-inc.com",
          "phone": "801 274 6798",
          "mobile": "832 764 1930 ",
          "address": "1234 N 7864 W President Bld - Salt Lake City, UT 84105",
          "web": "http://more-info-loretta.com",
          "first_name": "Natalia",
          "last_name": "Bawer",
          "full_name": "Natalia Bawer",
          "job": "Sales",
          "fax": null,
          "vat": null
        },
        "fields_by_name":
        {
          "Firstname": "Natalia",
          "Lastname": "Bawer",
          "Full name": "Natalia Bawer",
          "Email": "natalia.bawer@loretta-inc.com",
          "Phone": "801 274 6798",
          "Mobile": "832 764 1930 ",
          "Address": "1234 N 7864 W President Bld - Salt Lake City, UT 84105",
          "Web": "http://more-info-loretta.com",
          "Department": "Sales"
        },
        "comment_count": 0,
        "bcc_count": 0,
        "team":
        {
          "id": 5,
          "name": "Web Sales",
          "users": [
            {
              "id": 514,
              "lastname": "Stone",
              "firstname": "Stéphanie",
              "email": "stef@example.com",
              "is_manager": true
            },
            {
              "id": 518,
              "lastname": "Doe",
              "firstname": "John",
              "email": "john@youdontneedacrm.com",
              "is_manager": false
            }
          ],
          "updated_at": "2014-02-19T16:58:43.000Z",
          "created_at": "2014-02-11T22:41:26.000Z"
        },
        "user":
        {
          "id": 514,
          "lastname": "Stone",
          "firstname": "Stéphanie",
          "email": "stef@example.com",
          "phone": "2223334444",
          "mobile_phone": ""
        },
        "client_folder":
        {
          "id": 1,
          "name": "Acme",
          "description": "Billing address: 123 heaven avenue, San Francisco CA\u0026nbsp;94103\u003Cbr /\u003EShipping address: 456 pretty boulevard, Paradise CA\u0026nbsp;94188",
          "is_active": true,
          "created_at": "2015-01-30T22:03:14.000Z"
        },
        "created_by":
        {
          "id": 514,
          "lastname": "Stone",
          "firstname": "Stéphanie",
          "email": "stef@example.com"
        },
        "business_card_id": 412,
        "visible_by_count": 1,
        "follow_ups": []
      }
    },

    "matches": [
      [
        "title",
        "Loretta Inc."
      ],
      [
        "email",
        "natalia.bawer@loretta-inc.com"
      ]
    ]
  },

  {
    "lead": {
      "id": 8114,
      "title": "Loretta Inc.",
      "pipeline": null,
      "step": "Incoming",
      "step_id": 45,
      "status": "Todo",
      "amount": null,
      "probability": null,
      "currency": "USD",
      "starred": null,
      "next_action_at": "2014-02-28T01:00:01.000Z",
      "remind_date": null,
      "remind_time": null,
      "reminder_at": null,
      "reminder_duration": null,
      "created_at": "2014-02-28T20:57:29.000Z",
      "estimated_closing_date": null,
      "updated_at": "2014-02-28T20:57:29.000Z",
      "second_number": null,
      "amount_percentage": null,
      "reminder_activity_id": null,
      "reminder_activity_log_id": null,
      "reminder_note": "",
      "comment_count": 0,
      "closed_at": null,
      "description": "Firstname: John\nLastname: Doe\nEmail: john.doe@company.com",
      "html_description": "Firstname: John\nLastname: Doe\nEmail: john.doe@company.com",
      "tags": ["google","prospect"],
      "created_from": "api",
      "created_by_id": 514,
      "user_id": 514,
      "team_id": 5,
      "client_folder_id": null,
      "client_folder_name": null,
      "attachment_count": 0,
      "extended_info":
      {
        "all_contact_emails": ["john.doe@company.com"],
        "first_contact_email": "john.doe@company.com",
        "permalink": "https://YOUR_SUBDOMAIN_HERE.nocrm.io/leads/8114",
        "fields":
        {
          "email": "john.doe@company.com",
          "phone": null,
          "mobile": null,
          "address": null,
          "web": null,
          "first_name": "John",
          "last_name": "Doe",
          "full_name": null,
          "job": null,
          "fax": null,
          "vat": null
        },
        "fields_by_name":
        {
          "Email": "john.doe@company.com",
          "Firstname": "John",
          "Lastname": "Doe"
        },
        "comment_count": 0,
        "bcc_count": 0,
        "team": null,
        "user":
        {
          "id": 514,
          "lastname": "Stone",
          "firstname": "Stéphanie",
          "email": "stef@example.com",
          "phone": "2223334444",
          "mobile_phone": ""
        },
        "client_folder": null,
        "created_by": {
          "id": 514,
          "lastname": "Stone",
          "firstname": "Stéphanie",
          "email": "stef@example.com"
        },
        "business_card_id": null,
        "visible_by_count": 1,
        "follow_ups": []
      }
    },

    "matches": [
      [
        "title",
        "Loretta Inc."
      ]
    ]
  }
]

Retrieves all duplicates of a lead. Duplicates are retrieved from lead titles and default fields set as key (see our help center for more information about default fields set as key).

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/{lead_id}/duplicates

Parameters

Parameter Description
lead_id required Lead's id. The identifier of the lead.

Http Status Code

Code type
200 ok
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
404 record_not_found
422 missing_parameter
429 too_many_requests

Retrieve all attachments

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/9402/attachments"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/9402/attachments", header
attachments = JSON.parse(response)

With the USER token

curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/9402/attachments"
require 'rest-client'

token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/9402/attachments", header
attachments = JSON.parse(response)

The above commands return JSON structured like this:

[
    {
        "id": 422,
        "name": "You_Dont_Need_a_CRM.pdf",
        "url": "https://YOUR_SUBDOMAIN_HERE.nocrm.io/attachments/422",
        "content_type": "application/pdf",
        "kind": "attachment"
    },
    {
        "id": 15,
        "name": "0000004",
        "url": "https://mycompany.freshbooks.com/showEstimate?estimateid=34432",
        "content_type": null,
        "kind": "freshbooks_estimate"
    }
]

Retrieve all attachments for the specified lead. It includes all the files that have been attached but also if you have an integration with Freshbooks, QuickBooks or Factomos, the estimate and invoices attached to the lead. To differenciate the different kind of attachments, the attribute kind will specify where the attachment is coming from.

The possible values are attachment, business_card, freshbooks_estimate, freshbooks_invoice, quickbooks_estimate, quickbooks_invoice, factomos_estimate, factomos_invoice, dropbox.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/{lead_id}/attachments

Parameters

Parameter Description
lead_id required Lead's id. The identifier of the lead.

Http Status Code

Code type
200 ok
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
404 record_not_found
422 missing_parameter
429 too_many_requests

Retrieve one attachment

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/9402/attachments/422"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/9402/attachments/422", header
attachment = JSON.parse(response)

With the USER token

curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/9402/attachments/422"
require 'rest-client'

token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/9402/attachments/422", header
attachment = JSON.parse(response)

The above commands return JSON structured like this:

{
    "url": "https://ydncrm-attach.s3.amazonaws.com/6287/310/example.txt?X-Amz-Expires=180&X-Amz-Date=20190712T192824Z&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3MOBWMRZJZTNUNQ%2F20190712%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-SignedHeaders=host&X-Amz-Signature=064132b235c2a48c0f73bfbf464e595224425eb82d2921cfadfc32928953baf3"
}

Retrieve one attachment url for the specified lead. The url returned allows the download of the attachment for a short period of time. It only returns the urls for the attachments of kind attachment. The other attachments coming from accounting for example cannot be downloaded.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/{lead_id}/attachments/{id}

Parameters

Parameter Description
lead_id required Lead's id. The identifier of the lead.
id required Attachment's id. The identifier of the attachment of kind attachment.

Http Status Code

Code type
200 ok
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 forbidden_action upgrade_edition
404 file_not_found record_not_found
422 missing_parameter
429 too_many_requests

Add an attachment on a lead

With the API key

curl -XPOST -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" -H "Content-Type: multipart/form-data" -F "attachment=@/path/to/your/file.txt" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/9402/attachments"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
request = RestClient::Request.new(
          method: :post,
          url: 'https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/9402/attachments',
          headers: {content_type: 'multipart/mixed', accept: 'application/json', 'X-API-KEY' => key},
          payload: {
            multipart: true,
            attachment: File.new("/path/to/your/file.txt", 'rb')
          })
response = request.execute
attachment = JSON.parse(response)

With the USER token

curl -XPOST -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" -H "Content-Type: multipart/form-data" -F "attachment=@/path/to/your/file.txt" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/9402/attachments"
require 'rest-client'

token = "ITd-Jb3EC_nCXI2fez4hhg"
request = RestClient::Request.new(
          method: :post,
          url: 'https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/9402/attachments',
          headers: {content_type: 'multipart/mixed', accept: 'application/json', 'X-USER-TOKEN' => token},
          payload: {
            multipart: true,
            attachment: File.new("/path/to/your/file.txt", 'rb')
          })
response = request.execute
attachment = JSON.parse(response)

The above commands return JSON structured like this:

{
  "id": 423,
  "name": "file.txt",
  "url": "https://ydncrm-attach.s3.amazonaws.com/uploads/attachment/422/file.txt?X-Amz-Expires=180&X-Amz-Date=20160630T224423Z&X-Amz-Algorithm=AWS4-HMAC-SHA256",
  "content_type": "text/plain",
  "kind": "attachment"
}

Create an attachment for the specified lead from the uploaded file.

Http request

POST https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/{lead_id}/attachments

Parameters

Parameter Description
lead_id required Lead's id. The identifier of the lead.
attachment required The information of the uploaded file

Http Status Code

Code type
200 ok
400 bad_request unrecognized_parameter
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 forbidden_action upgrade_edition
404 file_not_found record_not_found
422 missing_parameter missing_parameter
429 too_many_requests

Delete an attachment on a lead

With the API key

curl -XDELETE -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/9402/attachments/520"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.delete "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/9402/attachments/520", header
attachment = JSON.parse(response)

With the USER token

curl -XDELETE -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/9402/attachments/520"
require 'rest-client'

token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
response = RestClient.delete "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/9402/attachments/520", header
attachment = JSON.parse(response)

The above commands return JSON structured like this:

{
  "id": 520
}

Delete an attachment for the specified lead from the uploaded file.

Http request

DELETE https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/{lead_id}/attachments/{id}

Parameters

Parameter Description
lead_id required Lead's id. The identifier of the lead.
id required Attachment's id. The identifier of the attachment on the lead.

Http Status Code

Code type
200 ok
400 unrecognized_parameter
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 forbidden_action upgrade_edition
404 record_not_found
422 missing_parameter
429 too_many_requests

List the action histories on a lead

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" -XGET "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/9344/action_histories"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/9344/action_histories", header
action_histories = JSON.parse(response)

With the USER token

curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" -XGET "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/9344/action_histories"
require 'rest-client'

token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/9344/action_histories", header
action_histories = JSON.parse(response)

The above commands return JSON structure like this:

[
  {
    "id": 39728,
    "lead_id": 9344,
    "action_type": "lead_created",
    "action_item":
    {
      "type": "lead_created",
      "id": 9344
    },
    "created_at": "2015-04-22T22:53:08.000Z",
    "user":
    {
      "id": 625,
      "lastname": "Stone",
      "firstname": "Stephanie",
      "email": "stef@example.com",
      "phone": "2223334444",
      "mobile_phone": ""
    }
  },
  {
    "id": 39729,
    "lead_id": 9344,
    "action_type": "amount_set",
    "action_item":
    {
      "type": "amount_set",
      "id": 1402,
      "amount": 2600.0,
      "probability": 60,
      "currency": "USD"
    },
    "created_at": "2015-04-22T22:54:51.000Z",
    "user":
    {
      "id": 625,
      "lastname": "Stone",
      "firstname": "Stephanie",
      "email": "stef@example.com",
      "phone": "2223334444",
      "mobile_phone": ""
    }
  },
  {
    "id": 39730,
    "lead_id": 9344,
    "action_type": "comment_added",
    "action_item":
    {
      "type": "comment_added",
      "id": 13747
    },
    "created_at": "2015-04-22T22:55:33.000Z",
    "user":
    {
      "id": 625,
      "lastname": "Stone",
      "firstname": "Stephanie",
      "email": "stef@example.com",
      "phone": "2223334444",
      "mobile_phone": ""
    }
  },
  {
    "id": 39731,
    "lead_id": 9344,
    "action_type": "email_sent",
    "action_item":
    {
      "type": "email_sent",
      "id": 46
    },
    "created_at": "2015-04-22T23:02:13.000Z",
    "user":
    {
      "id": 625,
      "lastname": "Stone",
      "firstname": "Stephanie",
      "email": "stef@example.com",
      "phone": "2223334444",
      "mobile_phone": ""
    }
  },
  {
    "id": 39732,
    "lead_id": 9344,
    "action_type": "step_changed",
    "action_item":
    {
      "type": "step_changed",
      "id": 1190,
      "name": "In-touch",
      "position": 2
    },
    "created_at": "2015-04-22T23:02:43.000Z",
    "user":
    {
      "id": 625,
      "lastname": "Stone",
      "firstname": "Stephanie",
      "email": "stef@example.com",
      "phone": "2223334444",
      "mobile_phone": ""
    }
  },
  {
    "id": 39733,
    "lead_id": 9344,
    "action_type": "user_assigned",
    "action_item":
    {
      "type": "user_assigned",
      "id": 626,
      "firstname": "Jean",
      "lastname": "Doe",
      "email": "jean@doe.com"
    },
    "created_at": "2015-04-22T23:03:04.000Z",
    "user":
    {
      "id": 625,
      "lastname": "Stone",
      "firstname": "Stephanie",
      "email": "stef@example.com",
      "phone": "2223334444",
      "mobile_phone": ""
    }
  },
  {
    "id": 39734,
    "lead_id": 9344,
    "action_type": "amount_set",
    "action_item":
    {
      "type": "amount_set",
      "id": 1403,
      "amount": 2600.0,
      "probability": 100,
      "currency": "USD"
    },
    "created_at": "2015-04-22T23:03:52.000Z",
    "user":
    {
      "id": 626,
      "lastname": "Doe",
      "firstname": "Jean",
      "email": "jean@doe.com",
      "phone": "2223334444",
      "mobile_phone": ""
    }
  },
  {
    "id": 39735,
    "lead_id": 9344,
    "action_type": "status_changed",
    "action_item":
    {
      "type": "status_changed",
      "id": 3,
      "name": "won"
    },
    "created_at": "2015-04-22T23:03:52.000Z",
    "user":
    {
      "id": 626,
      "lastname": "Doe",
      "firstname": "Jean",
      "email": "jean@doe.com",
      "phone": "2223334444",
      "mobile_phone": ""
    }
  },
  {
    "id": 39736,
    "lead_id": 9344,
    "action_type": "client_assigned",
    "action_item":
    {
      "type": "client_assigned",
      "id": 15,
      "name": "Series"
    },
    "created_at": "2015-04-22T23:04:09.000Z",
    "user":
    {
      "id": 626,
      "lastname": "Doe",
      "firstname": "Jean",
      "email": "jean@doe.com",
      "phone": "2223334444",
      "mobile_phone": ""
    }
  }
]

Retrieve the action histories of a lead depending on the filter you entered.

The action histories are returned by bulk. The number of items returned can be defined by a parameter but cannot exceed 100 items.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/{lead_id}/action_histories

Parameters

Parameter Default Description
from optional Start date to retrieve the action histories.
to optional End date to retrieve the action histories. If used with the from parameter, action histories are retrieved in the date range. If used alone, all the action histories are retrieved until this date.
action_type optional Filter on the action's type that triggered the entry in the history. Could be one of these values: client_assigned, step_changed, status_changed, amount_set, user_assigned, lead_created, comment_added, email_sent.
action_value optional Filter on the value of two specifics action's types: step_changed and status_changed. The available status_changed values are: todo, standby, won, lost, cancelled. If the step or status value is not recognized (typo, deletion), the filter is ignored.
user_ids optional Filter on the users who made the actions. Comma-separated list of user ids or user emails.
direction optional asc Return data order by their id in ascending or descending. The value should be asc or desc.
limit optional 100 Number of data returned. Value should be between 1 and 100.

Http Status Code

Code type
200 ok
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
404 record_not_found
422 missing_parameter
429 too_many_requests

Send an email from a template

With the API key

curl -XPOST -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" -H "Content-Type: application/json" -d '{"email_template_id":10,"from_user_id":1}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/9402/emails/send_email_from_template"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
request = RestClient::Request.new(
          method: :post,
          url: 'https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/9402/emails/send_email_from_template',
          headers: {content_type: 'application/json', accept: 'application/json', 'X-API-KEY' => key},
          payload: {
            email_template_id: 10,
            from_user_id: 1
          })
response = request.execute
message = JSON.parse(response)

With the USER token

curl -XPOST -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" -H "Content-Type: application/json" -d '{"email_template_id":10,"from_user_id":1}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/9402/emails/send_email_from_template"
require 'rest-client'

token = "ITd-Jb3EC_nCXI2fez4hhg"
request = RestClient::Request.new(
          method: :post,
          url: 'https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/9402/emails/send_email_from_template',
          headers: {content_type: 'application/json', accept: 'application/json', 'X-USER-TOKEN' => token},
          payload: {
            email_template_id: 10,
            from_user_id: 1
          })
response = request.execute
message = JSON.parse(response)

The above commands return JSON structured like this:

{
  "message": "Sending email..."
}

Send an email from a template. This route is only available for Dreamteam Edition.

There are conditions before being able to send the email, if they are not respected the email is not sent:

Http request

POST https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/{lead_id}/emails/send_email_from_template

Parameters

Parameter Description
lead_id required Lead's id. The identifier of the lead.
email_template_id required The identifier of the email template.
from_user_id required The identifier of the user who sends the email (FROM of the email).

Http Status Code

Code type
200 ok
400 no_connected_inbox variables_present_subject variables_present_content no_to_email_address user_not_found
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 forbidden_action forbidden_action upgrade_edition
404 record_not_found
422 missing_parameter missing_parameter
429 too_many_requests

Post-sales Tasks

List post-sales tasks

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/follow_ups?lead_id=10"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
request = RestClient::Request.new(
  method: :get,
  url: 'https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/follow_ups',
  headers: {content_type: 'application/json', accept: 'application/json', 'X-API-KEY' => key},
  payload: {
    user_id: 42,
    status: "todo,standby"
  })
response = request.execute
post_sales_process = JSON.parse(response)

With the USER token

curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/follow_ups?user_id=10"
require 'rest-client'

token = "ITd-Jb3EC_nCXI2fez4hhg"
request = RestClient::Request.new(
  method: :get,
  url: 'https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/follow_ups',
  headers: {content_type: 'application/json', accept: 'application/json', 'X-USER-TOKEN' => token},
  payload: {
    user_id: 10,
    status: "done"
  })
response = request.execute
post_sales_process = JSON.parse(response)

The above commands return JSON structured like this:

[
  {
    "id":4,
    "title":"Shipping",
    "description":"",
    "status":"todo",
    "tags":[
      "express",
      "world"
    ],
    "tasks_count":1,
    "tasks_done_count":0,
    "next_action_at":"2022-06-14T06:00:01.000Z",
    "lead_id":10,
    "user_id":10,
    "created_at":"2022-06-14T13:51:32.000Z",
    "updated_at":"2022-06-14T13:57:20.000Z"
  }
]

Get list of post-sales tasks

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/follow_ups

Parameters

Parameter Description
lead_id or user_id required Lead's id. The identifier of the lead. Or User id or email to retrieve the post sales tasks belonging to this user only.
status optional Array of status names separated by a comma. Return the post-sales tasks with the specified statuses. The status could be one of these values: todo, standby, done

Http Status Code

Code type
200 ok
400 missing_parameter unrecognized_parameter unprocessable_entity bad_parameter_format user_not_found
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 forbidden_action upgrade_edition
404 record_not_found
422 missing_parameter
429 too_many_requests

Create a post-sales process from a template

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" -d '{"post_sales_template_id":10}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/55252/follow_ups/create_from_template"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
request = RestClient::Request.new(
  method: :post,
  url: 'https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/55252/follow_ups/create_from_template',
  headers: {content_type: 'application/json', accept: 'application/json', 'X-API-KEY' => key},
  payload: {
    post_sales_template_id: 10
  })
response = request.execute
post_sales_process = JSON.parse(response)

With the USER token

curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" -d '{"post_sales_template_id":10}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/55252/follow_ups/create_from_template"
require 'rest-client'

token = "ITd-Jb3EC_nCXI2fez4hhg"
request = RestClient::Request.new(
  method: :post,
  url: 'https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/55252/follow_ups/create_from_template',
  headers: {content_type: 'application/json', accept: 'application/json', 'X-USER-TOKEN' => token},
  payload: {
    post_sales_template_id: 10
  })
response = request.execute
post_sales_process = JSON.parse(response)

The above commands return JSON structured like this:

{
  "id": 8,
  "title": "Shipping",
  "description": "",
  "status": "todo",
  "tags": [
    "express",
    "world"
  ],
  "tasks_count": 4,
  "tasks_done_count": 0,
  "next_action_at": "2022-02-06T23:00:01.000Z",
  "lead_id": 55252,
  "user_id": 1,
  "created_at": "2022-02-07T21:27:49.000Z",
  "updated_at": "2022-02-07T21:27:49.000Z",
  "tasks": [
    {
      "id": 52,
      "content": "Prepare package",
      "position": 1,
      "status": "todo",
      "done_at": null,
      "next_action_at": "2022-02-07T23:00:01.000Z",
      "follow_up_id": 11,
      "user_id": 1,
      "created_at": "2022-02-07T21:27:49.000Z",
      "updated_at": "2022-02-07T21:27:49.000Z"
    },
    {
      "id": 53,
      "content": "Print label",
      "position": 2,
      "status": "todo",
      "done_at": null,
      "next_action_at": "2022-02-07T23:00:01.000Z",
      "follow_up_id": 11,
      "user_id": 1,
      "created_at": "2022-02-07T21:27:49.000Z",
      "updated_at": "2022-02-07T21:27:49.000Z"
    },
    {
      "id": 54,
      "content": "Pickup",
      "position": 3,
      "status": "todo",
      "done_at": null,
      "next_action_at": "2022-02-07T23:00:01.000Z",
      "follow_up_id": 11,
      "user_id": 1,
      "created_at": "2022-02-07T21:27:49.000Z",
      "updated_at": "2022-02-07T21:27:49.000Z"
    },
    {
      "id": 55,
      "content": "Delivered",
      "position": 4,
      "status": "todo",
      "done_at": null,
      "next_action_at": "2022-02-07T23:00:01.000Z",
      "follow_up_id": 11,
      "user_id": 1,
      "created_at": "2022-02-07T21:27:49.000Z",
      "updated_at": "2022-02-07T21:27:49.000Z"
    }
  ]
}

Create a post-sales process on a lead from a template

Http request

POST https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/leads/{lead_id}/follow_ups/create_from_template

Parameters

Parameter Description
lead_id required Lead's id. The identifier of the lead.
post_sales_template_id required The identifier of the post-sales process template.

Http Status Code

Code type
201 created
400 unassigned_lead bad_request unprocessable_entity
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 forbidden_action upgrade_edition
404 template_not_found record_not_found
422 missing_parameter missing_parameter
429 too_many_requests

Prospecting lists

List the prospecting lists

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets", header
spreadsheets = JSON.parse(response)

With the USER token

curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets"
require 'rest-client'

token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets", header
spreadsheets = JSON.parse(response)

The above commands return JSON structured like this:

[
  {
    "id": 17198,
    "title": "Circle prospects",
    "description": "This prospect is for the Circle area",
    "column_count": 6,
    "column_names": [
      "Lead's name",
      "Firstname",
      "Lastname",
      "Email",
      "Phone"
    ],
    "privacy": 1,
    "updated_at": "2017-05-25T17:55:53.000Z",
    "created_at": "2017-05-25T17:55:53.000Z",
    "tags": [
      "circle"
    ],
    "permalink": "https://YOUR_SUBDOMAIN_HERE.nocrm.io/spreadsheets/17198",
    "is_archived": true,
    "to_qualify_row_count": 6,
    "total_row_count": 8,
    "user": {
      "id": 433,
      "lastname": "John",
      "firstname": "Doe",
      "email": "john.doe@example.com",
      "phone": "2223334444",
      "mobile_phone": ""
    }
  },
  {
    "id": 17197,
    "title": "Square prospects",
    "description": "This prospect is for the Square area",
    "column_count": 6,
    "column_names": [
      "Lead's name",
      "Firstname",
      "Lastname",
      "Email",
      "Phone"
    ],
    "privacy": 1,
    "updated_at": "2017-05-19T22:27:35.000Z",
    "created_at": "2017-05-17T19:30:44.000Z",
    "tags": [
      "square",
      "green"
    ],
    "permalink": "https://YOUR_SUBDOMAIN_HERE.nocrm.io/spreadsheets/17197",
    "is_archived": false,
    "to_qualify_row_count": 3,
    "total_row_count": 7,
    "user": {
      "id": 433,
      "lastname": "John",
      "firstname": "Doe",
      "email": "john.doe@example.com",
      "phone": "2223334444",
      "mobile_phone": ""
    }
  }
]

List the prospecting lists that the user can see

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets

Parameters

Parameter Default Description
title optional Filter the prospecting list by title (exact match)
order optional id Attribute used to sort the prospecting lists. The value should be one of id or created_at or updated_at
direction optional desc Direction of data returned sorted out by ids. The value should be asc or desc
limit optional 100 Limit the number of data returned
offset optional 0 Shift the returned data by the offset value. Option used with the limit parameter in order to paginate the return.

Http Status Code

Code type
200 ok
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
422 missing_parameter
429 too_many_requests

Create a prospecting list

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8"  -H "Content-Type: application/json" -d '{"title":"ProspectV2","content":[["Company name","Firstname","Lastname","Email","Phone"],["Acme Corp","John","Doe","john.doe@acme.com","654 234 7623"],["EuropaCorp","Luc","Besson","luc.besson@europacorp.com","555 333 5678"]],"description":"This prospect comes from Peter","tags":["prospect","peter"],"user_id":"stef@example.com"}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
parameters = {
  title: "Prospect",
  content: "[[\"Company name\",\"Firstname\",\"Lastname\",\"Email\",\"Phone\"],[\"Acme Corp\",\"John\",\"Doe\",\"john.doe@acme.com\",\"654 234 7623\"],[\"EuropaCorp\",\"Luc\",\"Besson\",\"luc.besson@europacorp.com\",\"555 333 5678\"]]",
  description: "This prospect comes from Peter",
  tags: ["prospect","peter"],
  user_id: 'stef@example.com'
}
response = RestClient.post "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets", parameters, header
spreadsheet = JSON.parse(response)

With the USER token

curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg"  -H "Content-Type: application/json" -d '{"title":"ProspectV2","content":[["Company name","Firstname","Lastname","Email","Phone"],["Acme Corp","John","Doe","john.doe@acme.com","654 234 7623"],["EuropaCorp","Luc","Besson","luc.besson@europacorp.com","555 333 5678"]],"description":"This prospect comes from Peter","tags":["prospect","peter"]}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets"
require 'rest-client'

token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
parameters = {
  title: "Prospect",
  content: "[[\"Company name\",\"Firstname\",\"Lastname\",\"Email\",\"Phone\"],[\"Acme Corp\",\"John\",\"Doe\",\"john.doe@acme.com\",\"654 234 7623\"],[\"EuropaCorp\",\"Luc\",\"Besson\",\"luc.besson@europacorp.com\",\"555 333 5678\"]]",
  description: "This prospect comes from Peter",
  tags: ["prospect","peter"]
}
response = RestClient.post "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets", parameters, header
spreadsheet = JSON.parse(response)

The above commands return JSON structure like this:

{
  "id": 112,
  "title": "Prospect",
  "description": "This prospect comes from Peter",
    "column_names": [
      "Company name",
      "Firstname",
      "Lastname",
      "Email",
      "Phone"
    ],
  "privacy": 1,
  "updated_at": "2014-11-07T17:31:04.000Z",
  "created_at": "2014-11-07T17:31:04.000Z",
  "tags": ["peter", "prospect"],
  "permalink": "https://YOUR_SUBDOMAIN_HERE.nocrm.io/spreadsheets/112",
  "is_archived": false,
  "user":
  {
    "id": 514,
    "lastname": "Stone",
    "firstname": "Stéphanie",
    "email": "stef@example.com",
      "phone": "2223334444",
      "mobile_phone": ""
  },
  "spreadsheet_rows":
  [
    { "id": 108, "lead_id": null, "is_active": true, "content": ["Acme Corp","John","Doe","john.doe@acme.com","654 234 7623"] },
    { "id": 109, "lead_id": null, "is_active": true, "content": ["EuropaCorp","Luc","Besson","luc.besson@europacorp.com","555 333 5678"] }
  ]
}

To create a new prospecting list, you have to pass the required parameters.

With the required parameters the prospecting list will be created and will belong to:

When using the API key authentication, if no user is set or if it does not correspond to any user in the account, the prospecting list will belong to the first administrator of the account.

When using the USER token authentication, the user_id parameter is ignored.

By default the privacy of the prospecting list is computed automatically according to the settings of the account. However, it is possible to set the privacy of the prospecting list to be shared with everyone in the account. In this case just pass off for the privacy.

The number of rows is limited to 5000. The number of columns on each row is limited to 26.

Http request

POST https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets

Parameters

Parameter Default Description
title required Prospecting file's title. It could be the origin of the prospecting file.
content required Content of the prospecting file as a json string from the array of array of data. The first row should be the column header.
description optional Prospecting file's description.
tags optional An array of tags describing the prospecting file. If the tags don't exist they are automatically created. The tags could also include the Predefined tags of your account.
user_id optional Email address or id of the user owner of the prospecting_file. Required parameter if a privacy is set and API key authentication.
privacy optional default If privacy is set to 'off' the prospecting list will be shared with everyone on the account. Otherwise the privacy is computed automatically wiuth the settings of the account and the user used to create the list.

Http Status Code

Code type
201 created
400 bad_parameter_format max_lines_reached max_columns_reached bad_request bad_parameter_format user_not_found
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
404 record_not_found
422 missing_parameter missing_parameter
429 too_many_requests

Retrieve a prospecting list

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/112"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/112", header
spreadsheet = JSON.parse(response)

With the USER token

curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/112"
require 'rest-client'

token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/112", header
spreadsheet = JSON.parse(response)

The above commands return JSON structured like this:

{
  "id": 112,
  "title": "Prospect",
  "description": "This prospect comes from Peter",
  "column_names": [
    "Lead's name",
    "Firstname",
    "Lastname",
    "Email",
    "Phone"
  ],
  "privacy": 1,
  "updated_at": "2014-11-07T17:31:04.000Z",
  "created_at": "2014-11-07T17:31:04.000Z",
  "tags": ["peter", "prospect"],
  "permalink": "https://YOUR_SUBDOMAIN_HERE.nocrm.io/spreadsheets/112",
  "user":
  {
    "id": 514,
    "lastname": "Stone",
    "firstname": "Stéphanie",
    "email": "stef@example.com",
    "phone": "2223334444",
    "mobile_phone": ""
  },
  "spreadsheet_rows":
  [
    { "id": 108, "lead_id": 15, "is_active": true, "content": ["Acme Corp","John","Doe","john.doe@acme.com","654 234 7623"], "comment_count": 3 },
    { "id": 109, "lead_id": null, "is_active": true, "content": ["EuropaCorp","Luc","Besson","luc.besson@europacorp.com","555 333 5678"], "comment_count": 0 }
  ],
  "is_archived": true
}

Retrieve a prospecting list previously created with its id.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/{id}

Parameters

Parameter Description
id required Prospecting list's identifier.

Http Status Code

Code type
200 ok
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
404 record_not_found
422 missing_parameter
429 too_many_requests

Assign a prospecting list

With the API key

curl -XPOST -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" -H "Content-Type: application/json" -d '{"user_id":436}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/112/assign"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
parameters = { user_id: 436 }
response = RestClient.post "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/112/assign", parameters, header
lead = JSON.parse(response)

With the USER token

curl -XPOST -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" -H "Content-Type: application/json" -d '{"user_id":436}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/112/assign"
require 'rest-client'

token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
parameters = { user_id: 436 }
response = RestClient.post "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/112/assign", parameters, header
lead = JSON.parse(response)

The above commands return JSON structured like this:

{
  "id": 112,
  "title": "Prospecting list",
  "description": "This prospect comes from Peter",
  "column_count":5,
  "column_names": [
    "Lead's name",
    "Firstname",
    "Lastname",
    "Email",
    "Phone"
  ],
  "privacy": 1,
  "updated_at": "2021-03-16T09:53:04.000Z",
  "created_at": "2014-11-07T17:31:04.000Z",
  "tags": ["peter", "prospect"],
  "permalink": "https://YOUR_SUBDOMAIN_HERE.nocrm.io/spreadsheets/112",
  "is_archived": false,
  "user":
  {
    "id": 436,
    "lastname": "Rose",
    "firstname": "Juliette",
    "email": "juliette@example.com",
    "phone": "",
    "mobile_phone": "3334445555"
  },
}

Assign a prospecting list to a collaborator. The user will be notified by email of the assignment if the preference to receive notifications is checked.

Http request

POST https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/{id}/assign

Parameters

Parameter Description
user_id required Prospecting list's user id or email. The new user id or user email of the prospecting list. This update corresponds to assign the prospecting list to a new user.

Http Status Code

Code type
200 ok
400 user_not_found
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 forbidden_action upgrade_edition
404 record_not_found
422 missing_parameter missing_parameter
429 too_many_requests

Create a comment on a prospecting list

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" -H "Content-Type: application/json" -d '{"content":"this is a content","user_id":514}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/112/comments"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
parameters = {
  content: "this is a content",
  user_id: 514
}
response = RestClient.post "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/112/comments", parameters, header
comments = JSON.parse(response)

With the USER token

curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" -H "Content-Type: application/json" -d '{"content":"this is a content","user_id":514}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/112/comments"
require 'rest-client'

token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
parameters = {
  content: "this is a content",
  user_id: 514
}
response = RestClient.post "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/112/comments", parameters, header
comments = JSON.parse(response)

The above commands return JSON structured like this:

{
  "id": 99,
  "content": "this is a content",
  "commented_item": {
    "item": "Spreadsheet",
    "id": 112
  },
  "created_at": "2015-08-20T21:57:40.000Z",
  "attachments": [

  ],
  "activity_id": null,
  "is_pinned": true,
  "raw_content": "this is a content",
  "extended_info": null,
  "reactions": [

  ],
  "user": {
    "id": 514,
    "lastname": "Stone",
    "firstname": "Stéphanie",
    "email": "stef@example.com",
    "phone": "2223334444",
    "mobile_phone": ""
  }
}

Create a comment on a prospecting list.

Http request

POST https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/{spreadsheet_id}/comments

Parameters

Parameter Description
spreadsheet_id required Prospecting list's identifier.
content required Content of the comment.
user_id optional User’s email address or id to whom the comment should belong. This parameter is ignored in case of the login method to authenticate is used. (USER token)
attachments optional Attachment to add on the comment
activity_id optional Activity's id to set on the comment

Http Status Code

Code type
201 created
400 unauthorized_parameter unrecognized_parameter unprocessable_entity user_not_found
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
404 record_not_found
422 invalid_file_format unknown missing_parameter
429 too_many_requests

Find prospects by email or field

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/rows?email=albert@example.com"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/rows?email=albert@example.com", header
spreadsheet_rows = JSON.parse(response)

With the USER token

curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/rows?email=albert@example.com"
require 'rest-client'

token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/rows?email=albert@example.com", header
spreadsheet_rows = JSON.parse(response)

The above commands return JSON structured like this:

[
  {
    "id": 133,
    "lead_id": null,
    "is_active": true,
    "content": [
      "Paris",
      "Albert",
      "Einstein",
      "0612233445",
      "0387123456",
      "albert@example.com",
      null,
      null,
      null,
      null,
      null,
      null
    ],
    "spreadsheet_id": 31
  }
]

Find prospects by email or by field.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/rows

Parameters

Parameter Description
email required Email address in the column of the prospect.
field_key optional Field name entered as column for the prospect. It has to be used with the field_value parameter.
field_value optional Field value corresponding to the field_key parameter. Return the prospects containing this value in the field_key. It has to be used with the field_key parameter

You must used at least the parameter email or the parameters field_key and field_value.

Http Status Code

Code type
200 ok
400 not_found
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
422 missing_parameter missing_parameter
429 too_many_requests

Create a comment on a prospect

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" -H "Content-Type: application/json" -d '{"content":"this is a content","user_id":514}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/112/rows/4/comments"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
parameters = {
  content: "this is a content",
  user_id: 514
}
response = RestClient.post "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/112/rows/4/comments", parameters, header
comments = JSON.parse(response)

With the USER token

curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" -H "Content-Type: application/json" -d '{"content":"this is a content","user_id":514}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/112/rows/4/comments"
require 'rest-client'

token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
parameters = {
  content: "this is a content",
  user_id: 514
}
response = RestClient.post "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/112/rows/4/comments", parameters, header
comments = JSON.parse(response)

The above commands return JSON structured like this:

{
  "id": 99,
  "content": "this is a content",
  "commented_item": {
    "item": "SpreadsheetRow",
    "id": 4
  },
  "created_at": "2015-08-20T21:57:40.000Z",
  "attachments": [

  ],
  "activity_id": null,
  "is_pinned": true,
  "raw_content": "this is a content",
  "extended_info": null,
  "reactions": [

  ],
  "user": {
    "id": 514,
    "lastname": "Stone",
    "firstname": "Stéphanie",
    "email": "stef@example.com",
    "phone": "2223334444",
    "mobile_phone": ""
  }
}

Create a comment on a prospect.

Http request

POST https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/{spreadsheet_id}/rows/{prospect_id}/comments

Parameters

Parameter Description
spreadsheet_id required Prospecting list's identifier.
id required Prospect's identifier.
content required Content of the comment.
user_id optional User’s email address or id to whom the comment should belong. This parameter is ignored in case of the login method to authenticate is used. (USER token)
attachments optional Attachment to add on the comment
activity_id optional Activity's id to set on the comment

Http Status Code

Code type
201 created
400 unauthorized_parameter unrecognized_parameter unprocessable_entity user_not_found
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
404 record_not_found
422 invalid_file_format unknown missing_parameter
429 too_many_requests

Update a comment on a prospect

With the API key

curl -XPUT -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" -H "Content-Type: application/json" -d '{"content":"this is a content","activity_id":3,"is_pinned":true}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/112/rows/4/comments/99"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
parameters = {
  content: "this is a content",
  activity_id: 3,
  is_pinned: true
}
response = RestClient.put "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/112/rows/4/comments", parameters, header
comment = JSON.parse(response)

With the USER token

curl -XPUT -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" -H "Content-Type: application/json" -d '{"content":"this is a content","activity_id":3,"is_pinned":true}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/112/rows/4/comments/99"
require 'rest-client'

token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
parameters = {
  content: "this is a content",
  activity_id: 3,
  is_pinned: true
}
response = RestClient.put "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/112/rows/4/comments", parameters, header
comment = JSON.parse(response)

The above commands return JSON structured like this:

{
  "id": 99,
  "content": "this is a content",
  "commented_item": {
    "item": "SpreadsheetRow",
    "id": 4
  },
  "created_at": "2015-08-20T21:57:40.000Z",
  "attachments": [

  ],
  "activity_id": 3,
  "is_pinned": true,
  "raw_content": "this is a content",
  "extended_info": null,
  "reactions": [

  ],
  "user": {
    "id": 514,
    "lastname": "Stone",
    "firstname": "Stéphanie",
    "email": "stef@example.com",
    "phone": "2223334444",
    "mobile_phone": ""
  },
  "activity": {
    "id": 3,
    "name": "Unanswered",
    "kind": "call",
    "duration": null,
    "icon": "phone",
    "color": "#dc3545",
    "created_at": "2022-11-23T08:40:33.000Z",
    "is_outcome": true
  }
}

Update a comment on a prospect

Http request

PUT https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/{spreadsheet_id}/rows/{prospect_id}/comments/{id}

Parameters

Parameter Description
content required Replace existing content
activity_id optional Activity's id to set on the comment
is_pinned optional Pinned the comment

Http Status Code

Code type
200 ok
400 unprocessable_entity unrecognized_parameter
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 forbidden_action upgrade_edition
404 record_not_found
422 missing_parameter
429 too_many_requests

Create a call on a prospect

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" -H "X-API-PARTNER-KEY: ASfTFxrey" -H "Content-Type: application/json" -d '{"user_id":514,"called_number":"06 06 06 06 06","from_number":"06 06 06 06 07","started_at":"2022-02-03 04:05:06+02:00","ended_at":"2022-02-03 04:06:06+02:00","direction":"outbound","record_link":"https://example.com/my_record","ext_call_key":"32090433","feedback":"Best call ever"}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/1/rows/4/call"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
partner_key = "ASfTFxrey"
header = { 'X-API-KEY' => key, 'X-API-PARTNER-KEY' => partner_key, content_type: :json, accept: "application/json" }
parameters = {
  user_id: 514,
  called_number: "06 06 06 06 06",
  from_number: "06 06 06 06 07",
  started_at: "2022-02-03 04:05:06+02:00",
  ended_at: "2022-02-03 04:06:06+02:00",
  direction: "outbound",
  record_link: "https://example.com/my_record",
  ext_call_key: "32090433",
  feedback: "Best call ever"
}
response = RestClient.post "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/1/rows/4/call", parameters, header
comments = JSON.parse(response)

With the USER token

curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" -H "X-API-PARTNER-KEY: ASfTFxrey" -H "Content-Type: application/json" -d '{"called_number":"06 06 06 06 06","from_number":"06 06 06 06 07","started_at":"2022-02-03 04:05:06+02:00","ended_at":"2022-02-03 04:06:06+02:00","direction":"outbound","record_link":"https://example.com/my_record","ext_call_key":"32090433","feedback":"Best call ever"}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/1/rows/4/call"
require 'rest-client'

token = "ITd-Jb3EC_nCXI2fez4hhg"
partner_key = "ASfTFxrey"
header = { 'X-USER-TOKEN' => token, 'X-API-PARTNER-KEY' => partner_key, content_type: :json, accept: "application/json" }
parameters = {
  called_number: "06 06 06 06 06",
  from_number: "06 06 06 06 07",
  started_at: "2022-02-03 04:05:06+02:00",
  ended_at: "2022-02-03 04:06:06+02:00",
  direction: "outbound",
  record_link: "https://example.com/my_record",
  ext_call_key: "32090433",
  feedback: "Best call ever"
}
response = RestClient.post "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/1/rows/4/call", parameters, header
call = JSON.parse(response)

The above commands return JSON structured like this:

{
  "id": 13,
  "ext_call_key": "32090433",
  "provider": "ringcentral",
  "direction": "outbound",
  "called_number": "606060606",
  "from_number": "606060607",
  "record_link": "https://example.com/my_record",
  "started_at": "2022-02-03T02:05:06.000Z",
  "ended_at": "2022-02-03T02:06:06.000Z",
  "sent_at": null,
  "duration": 60.0,
  "created_at": "2022-09-15T12:54:40.000Z",
  "kind": "call",
  "user": {
    "id": 514,
    "lastname": "Stone",
    "firstname": "Stéphanie",
    "email": "stef@example.com",
    "phone": "+33609090909",
    "mobile_phone": ""
  },
  "called_item": {
    "item": "SpreadsheetRow",
    "id": 4
  },
  "comment": {
    "id": 1581,
    "content": "Best call ever",
    "activity_id": 1,
    "is_pinned": false
  },
  "text_content": null
}

Create a call on a prospect.

Http request

POST https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/{spreadsheet_id}/rows/{id}/call

Parameters

Parameter Description
spreadsheet_id required Prospecting list's identifier.
id required Prospect's id. The identifier of the prospect (present in url).
called_number required The phone number called. This parameter is required in case of outbound call
from_number required The phone number who initiated the call. This parameter is required in case of inbound call
direction required Must be inbound or outbound
user_id optional User’s email address or id to whom the call should belong.
started_at optional Date of call's start with the following format: YYYY-MM-DD HH:MM:SS in the time zone of the account and the time in 24h format. The time can also be in UTC with this specific format: YYYY-MM-DDTHH:MM:SS.sssZ. Warning : started_at < ended_at
ended_at optional Date of call's end with the following format: YYYY-MM-DD HH:MM:SS in the time zone of the account and the time in 24h format. The time can also be in UTC with this specific format: YYYY-MM-DDTHH:MM:SS.sssZ. Warning : started_at < ended_at
record_link optional Link to the record
ext_call_key optional Call ID from the partner side
feedback optional A text that the customer could fill up to have feedback on the call and might add insight regarding the call

Http Status Code

Code type
201 created
400 unauthorized_parameter bad_parameter_format bad_request
401 unauthorized unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 forbidden upgrade_edition
404 record_not_found
422 invalid_record not_found missing_parameter
429 too_many_requests

Add prospects to a prospecting list

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" -H "Content-Type: application/json" -d '{content: [["Green Corp","Julia","Green","julia.green@example.com","345 234 7777"],["Red Corp","John","Red","red.john@example.com","222 333 5555"]]}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/112/rows"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
parameters = {
  content: "[[\"Green Corp\",\"Julia\",\"Green\",\"julia.green@example.com\",\"345 234 7777\"],[\"Red Corp\",\"John\",\"Red\",\"red.john@example.com\",\"222 333 5555\"]]"
}
response = RestClient.post "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/112/rows", parameters, header
spreadsheet_rows = JSON.parse(response)

With the USER token

curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" -H "Content-Type: application/json" -d '{content: [["Green Corp","Julia","Green","julia.green@example.com","345 234 7777"],["Red Corp","John","Red","red.john@example.com","222 333 5555"]]}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/112/rows"
require 'rest-client'

token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
parameters = {
  content: "[[\"Green Corp\",\"Julia\",\"Green\",\"julia.green@example.com\",\"345 234 7777\"],[\"Red Corp\",\"John\",\"Red\",\"red.john@example.com\",\"222 333 5555\"]]"
}
response = RestClient.post "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/112/rows", parameters, header
spreadsheet_rows = JSON.parse(response)

The above commands return JSON structured like this:

[
  {
    "id": 115,
    "lead_id": null,
    "is_active": true,
    "content": ["Green Corp","Julia","Green","julia.green@example.com","345 234 7777"]
  },
  {
    "id": 116,
    "lead_id": null,
    "is_active": true,
    "content": ["Red Corp","John","Red","red.john@example.com","222 333 5555"]
  }
]

Add the prospects (new rows) at the end of the specified prospecting list.

The number of rows is limited to 100.

Http request

POST https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/{spreadsheet_id}/rows

Parameters

Parameter Default Description
spreadsheet_id required Prospecting list's identifier.
content required Content of the prospects as a json string corresponding of an array of an array of data.

Http Status Code

Code type
200 ok
400 bad_parameter_format max_lines_reached
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
404 record_not_found
422 missing_parameter missing_parameter
429 too_many_requests

Update a prospect in a prospecting list

With the API key

curl -XPUT -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" -H "Content-Type: application/json" -d '["Green Corp","Julia","Green","julia.green@example.com","345 234 1111"]' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/112/rows/115"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
parameters = {
  content: "[\"Green Corp\",\"Julia\",\"Green\",\"julia.green@example.com\",\"345 234 1111\"]"
}
response = RestClient.put "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/112/rows/115", parameters, header
spreadsheet_row = JSON.parse(response)

With the USER token

curl -XPUT -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" -H "Content-Type: application/json" -d '["Green Corp","Julia","Green","julia.green@example.com","345 234 1111"]' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/112/rows/115"
require 'rest-client'

token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
parameters = {
  content: "[\"Green Corp\",\"Julia\",\"Green\",\"julia.green@example.com\",\"345 234 1111\"]"
}
response = RestClient.put "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/112/rows/115", parameters, header
spreadsheet_row = JSON.parse(response)

The above commands return JSON structured like this:

{
  "id": 115,
  "lead_id": null,
  "is_active": true,
  "content": ["Green Corp","Julia","Green","julia.green@example.com","345 234 1111"]
}

Update a prospect in a prospecting list.

Http request

PUT https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/{spreadsheet_id}/rows/{id}

Parameters

Parameter Default Description
spreadsheet_id required Prospecting list's identifier.
id required Prospect's identifier.
content required Content of the prospect as a json string corresponding of an array of data.

Http Status Code

Code type
200 ok
400 locked_prospect bad_parameter_format
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
404 record_not_found
422 missing_parameter
429 too_many_requests

Update fields on a prospect in a prospecting list

With the API key

curl -XPUT -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" -H "Content-Type: application/json" -d '{ "fields": { "Last name": "Prospect name", "Phone": "+33999999999" }}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/112/rows/115/update_fields"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
parameters = {
  fields: "{ \"Last name\": \"Prospect name\", \"Phone\": \"+330345544532\" }"
}
response = RestClient.put "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/112/rows/115/update_fields", parameters, header
spreadsheet_row = JSON.parse(response)

With the USER token

curl -XPUT -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" -H "Content-Type: application/json" -d '{ "fields": { "Last name": "Prospect name", "Phone": "+33999999999" }}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/112/rows/115/update_fields"
require 'rest-client'

token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
parameters = {
  fields: "{ \"Last name\": \"Prospect name\", \"Phone\": \"+330345544532\" }"
}
response = RestClient.put "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/112/rows/115/update_fields", parameters, header
spreadsheet_row = JSON.parse(response)

The above commands return JSON structured like this:

{
  "id": 115,
  "lead_id": null,
  "is_active": true,
  "content": ["Green Corp","Julia","Prospect name","julia.green@example.com","+330345544532"]
}

Update fields on a prospect in a prospecting list.

Http request

PUT https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/{spreadsheet_id}/rows/{id}/update_fields

Parameters

Parameter Default Description
spreadsheet_id required Prospecting list's identifier.
id required Prospect's identifier.
fields required Fields to update on the prospect, as a JSON hash turned into a string. Each key corresponding to a column's name of the prospecting list.

Http Status Code

Code type
200 ok
400 locked_prospect bad_parameter_format
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
404 record_not_found
422 no_columns_matched missing_parameter
429 too_many_requests

Create a lead from a prospect

With the API key

curl -XPOST -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/112/rows/115/create_lead"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.post "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/112/rows/115/create_lead", header
lead = JSON.parse(response)

With the USER token

curl -XPOST -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/112/rows/115/create_lead"
require 'rest-client'

token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
response = RestClient.post "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/112/rows/115/create_lead", header
lead = JSON.parse(response)

The above commands return JSON structured like this:

{
  "id": 8113,
  "title": "Syl Loretta Incr.",
  "pipeline": null,
  "step": "In-touch",
  "step_id": 45,
  "status": "Standby",
  "amount": 1562.89,
  "probability": 85,
  "currency": "USD",
  "starred": true,
  "next_action_at": "2014-03-12T07:00:00.000Z",
  "remind_date": null,
  "remind_time": null,
  "reminder_at": null,
  "reminder_duration": null,
  "created_at": "2014-02-28T17:37:33.000Z",
  "estimated_closing_date": null,
  "updated_at": "2014-02-28T17:38:05.000Z",
  "second_number": null,
  "amount_percentage": null,
  "reminder_activity_id": null,
  "reminder_activity_log_id": null,
  "reminder_note": "",
  "comment_count": 0,
  "closed_at": null,
  "description": "Firstname: Natalia\nLastname: Bawer\nFull name: Natalia Bawer\nEmail: natalia.bawer@loretta-inc.com\nPhone: 801 274 6798\nMobile: 832 764 1930 \nAddress: 1234 N 7864 W President Bld - Salt Lake City, UT 84105\nWeb: http://more-info-loretta.com\nDepartment: Sales\n--- Entrez une description ci-dessous ---\n \n--- \nMet Natalia at a seminar. She could be interested.\nShe is on business trip. Have to call her when she is back.",
  "html_description": "Firstname: Natalia<br />Lastname: Bawer<br />Full name: Natalia Bawer<br />Email: natalia.bawer@loretta-inc.com<br />Phone: 801 274 6798<br />Mobile: 832 764 1930&nbsp;<br />Address: 1234 N 7864 W President Bld - Salt Lake City, UT 84105<br />Web: http://more-info-loretta.com<br />Department: Sales<br />\r\n<p class=\"lead-desc-separator\">--- Entrez une description ci-dessous ---</p>\r\n<div>&nbsp;</div>\r\n<br />--- <br />\r\n<p>Met Natalia at a seminar. She could be interested.<br />She is on business trip. Have to call her when she is back.</p>",
  "tags": [
    "small",
    "US"
  ],
  "created_from": "api",
  "created_by_id": 514,
  "user_id": 514,
  "team_id": null,
  "client_folder_id": null,
  "client_folder_name": null,
  "attachment_count": 0,
  "extended_info": {
    "first_contact_email": "natalia.bawer@loretta-inc.com",
    "all_contact_emails": [
      "natalia.bawer@loretta-inc.com"
    ],
    "permalink": "https://YOUR_SUBDOMAIN_HERE.nocrm.io/leads/8113",
    "fields": {
      "email": "natalia.bawer@loretta-inc.com",
      "phone": "801 274 6798",
      "mobile": "832 764 1930 ",
      "address": "1234 N 7864 W President Bld - Salt Lake City, UT 84105",
      "web": "http://more-info-loretta.com",
      "first_name": "Natalia",
      "last_name": "Bawer",
      "full_name": "Natalia Bawer",
      "job": "Sales",
      "fax": null,
      "vat": null
    },
    "fields_by_name": {
      "Firstname": "Natalia",
      "Lastname": "Bawer",
      "Full name": "Natalia Bawer",
      "Email": "natalia.bawer@loretta-inc.com",
      "Phone": "801 274 6798",
      "Mobile": "832 764 1930 ",
      "Address": "1234 N 7864 W President Bld - Salt Lake City, UT 84105",
      "Web": "http://more-info-loretta.com",
      "Department": "Sales"
    },
    "comment_count": 0,
    "bcc_count": 0,
    "team": null,
    "user": {
      "id": 514,
      "lastname": "Stone",
      "firstname": "Stéphanie",
      "email": "stef@example.com",
      "phone": "+33609090909",
      "mobile_phone": ""
    },
    "client_folder": null,
    "created_by": {
      "id": 514,
      "lastname": "Stone",
      "firstname": "Stéphanie",
      "email": "stef@example.com",
      "phone": "+33609090909",
      "mobile_phone": ""
    },
    "business_card_id": null,
    "visible_by_count": 1,
    "follow_ups": [

    ]
  }
}

Create a lead from a prospect and associate the new lead created to the prospect in the prospecting list

Http request

POST https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/{spreadsheet_id}/rows/{id}/create_lead

Parameters

Parameter Default Description
spreadsheet_id required Prospecting list's identifier.
id required Prospect's identifier.

Http Status Code

Code type
201 created
400 bad_parameter_format user_not_found
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
404 step_not_found record_not_found
422 lead_not_created missing_parameter
429 too_many_requests

Delete a prospect in a prospecting list

With the API key

curl -XDELETE -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/112/rows/115"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.delete "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/112/rows/115", header
spreadsheet_row = JSON.parse(response)

With the USER token

curl -XDELETE -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/112/rows/115"
require 'rest-client'

token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
response = RestClient.delete "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/112/rows/115", header
spreadsheet_row = JSON.parse(response)

The above commands return JSON structured like this:

{
  "id": 115
}

Delete a prospect in a prospecting list.

Http request

DELETE https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/spreadsheets/{spreadsheet_id}/rows/{id}

Parameters

Parameter Default Description
spreadsheet_id required Prospecting list's identifier.
id required Prospect's identifier.

Http Status Code

Code type
200 ok
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
404 record_not_found
422 missing_parameter
429 too_many_requests

List all prospects called

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/rows/called_from?phone_number=2223334444"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/rows/called_from?phone_number=2223334444", header
spreadsheet_rows = JSON.parse(response)

With the USER token

curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/rows/called_from?phone_number=2223334444"
require 'rest-client'

token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
response = RestClient.delete "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/rows/called_from?phone_number=2223334444", header
spreadsheet_rows = JSON.parse(response)

The above commands return JSON structured like this:

[
  {
    "id": 115,
    "lead_id": null,
    "is_active": true,
    "content": ["Green Corp","Julia","Green","julia.green@example.com","222 333 444"],
    "spreadsheet_id": 234
  },
  {
    "id": 256,
    "lead_id": null,
    "is_active": true,
    "content": ["Green Corp","Julia","Green","julia.green@example.com","222 333 4444"],
    "spreadsheet_id": 825
  }
]

List all prospects called with the specified phone number from the noCRM application. All prospects called outside of noCRM are not retrieved.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/rows/called_from

Parameters

Parameter Description
phone_number required The phone number which has been called from a prospect.

Http Status Code

Code type
200 ok
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
422 missing_parameter
429 too_many_requests

Users

List all the users

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/users"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/users", header
users = JSON.parse(response)

With the USER token

curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/users"
require 'rest-client'

token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/users", header
users = JSON.parse(response)

The above commands return JSON structure like this:

[
  {
    "id": 514,
    "lastname": "Doe",
    "firstname": "John",
    "email": "john.doe@mycompany.com",
    "phone": "+33 1 12 23 34 45",
    "mobile_phone": "+33 6 56 67 78 89",
    "job_title": "CEO",
    "im_type": "Skype",
    "im": "john.doe",
    "updated_at": "2014-02-19T16:58:43.000Z",
    "created_at": "2014-02-11T22:41:26.000Z",
    "is_admin": true,
    "has_activated": true,
    "is_disabled": false,
    "locale": "en",
    "time_zone": "America/Denver",
    "permalink": "https://YOUR_SUBDOMAIN_HERE.nocrm.io/users/514",
    "avatar_url": "https://example.com/myavatar.jpg"
  },
  {
    "id": 515,
    "lastname": "Support",
    "firstname": "",
    "email": "support@mycompany.com",
    "phone": "+33 1 22 23 34 45",
    "mobile_phone": "+33 6 66 67 78 89",
    "job_title": "QA tester",
    "im_type": "Google Chat",
    "im": "support.mycompany",
    "updated_at": "2014-02-20T16:58:43.000Z",
    "created_at": "2014-02-20T22:41:26.000Z",
    "is_admin": false,
    "has_activated": true,
    "is_disabled": false,
    "locale": "en",
    "time_zone": "Europe/Paris",
    "permalink": "https://YOUR_SUBDOMAIN_HERE.nocrm.io/users/515",
    "avatar_url": null
  }
]

Retrieve all the users created in the account. The deleted users are retrieved too. Their state, is_disabled, is set to true in their case.

The users could be in different state.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/users

Parameters

Parameter Default Description
email optional The email address of the user
lastname optional The lastname of the user
firstname optional The firstname of the user
status optional all The status of the users, one of all, activated or deactivated
direction optional asc Direction of data returned sorted out by ids. The value should be asc or desc
role optional all The role of the users to return, one of all, admin, non-admin
teams optional Array of the ids or names of the teams the users belong to

Http Status Code

Code type
200 ok
400 bad_parameter_format
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
404 team_not_found
422 missing_parameter
429 too_many_requests

Create a user

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" -H "Content-Type: application/json" -d '{"lastname":"Einstein","firstname":"Albert","email":"albert.einstein@genius.com","is_admin":true}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/users"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
parameters = {
  lastname: "Einstein",
  firstname: "Albert",
  email: "albert.einstein@genius.com",
  is_admin: "true"
}
response = RestClient.post "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/users", parameters, header
user = JSON.parse(response)

With the USER token

curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" -H "Content-Type: application/json" -d '{"lastname":"Einstein","firstname":"Albert","email":"albert.einstein@genius.com","is_admin":true}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/users"
require 'rest-client'

token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
parameters = {
  lastname: "Einstein",
  firstname: "Albert",
  email: "albert.einstein@genius.com",
  is_admin: "true"
}
response = RestClient.post "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/users", parameters, header
user = JSON.parse(response)

The above commands return JSON structure like this:

{
  "id": 639,
  "lastname": "Einstein",
  "firstname": "Albert",
  "email": "albert.einstein@genius.com",
  "phone": "",
  "mobile_phone": "",
  "job_title": "",
  "im_type": "Skype",
  "im": "albert.einstein",
  "updated_at": "2015-07-22T16:58:43.000Z",
  "created_at": "2015-07-22T16:58:43.000Z",
  "is_admin": true,
  "has_activated": false,
  "is_disabled": false,
  "locale": "en",
  "time_zone": "America/Denver",
  "permalink": "https://YOUR_SUBDOMAIN_HERE.nocrm.io/users/639",
  "avatar_url": null
}

Create a user with the specified information of lastname, firstname and email.

By default, the activation email is not sent to the user. If the user has to receive the email when he/she is created, the option dont_send_email has to be specified to false.

When using the USER token, if the user logged is not an administrator of the account, he/she won't be allowed to create a user.

Http request

POST https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/users

Parameters

Parameter Default Description
email required The email of the user
lastname optional The lastname of the user
firstname optional The firstname of the user
is_admin optional false true if the user should be administrator of the account.
dont_send_email optional true false if the user has to receive his/her activation email when he/she is created.

Http Status Code

Code type
201 created
401 unauthorized_non_admin unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 forbidden_action upgrade_edition
422 missing_parameter missing_parameter
429 too_many_requests

Retrieve a user

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/users/639"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/users/639",  header
user = JSON.parse(response)

With the USER token

curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/users/639"
require 'rest-client'

token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/users/639",  header
user = JSON.parse(response)

The above commands return JSON structure like this:

{
  "id": 639,
  "lastname": "Einstein",
  "firstname": "Albert",
  "email": "albert.einstein@genius.com",
  "phone": "",
  "mobile_phone": "",
  "job_title": "",
  "im_type": "Skype",
  "im": "albert.einstein",
  "updated_at": "2015-07-22T16:58:43.000Z",
  "created_at": "2015-07-22T16:58:43.000Z",
  "is_admin": true,
  "has_activated": false,
  "is_disabled": false,
  "locale": "en",
  "time_zone": "America/Denver",
  "permalink": "https://YOUR_SUBDOMAIN_HERE.nocrm.io/users/639",
  "avatar_url": null
}

Retrieve a specific user from its id.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/users/{id}

Parameters

Parameter Description
id required The id of the user or its email address. Make sure to encode the email address properly.

Http Status Code

Code type
200 ok
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
404 record_not_found
422 missing_parameter
429 too_many_requests

Send the activation email

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/users/639/send_activation_email"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/users/1234/send_activation_email",  header

With the USER token

curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/users/639/send_activation_email"
require 'rest-client'

token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/users/1234/send_activation_email",  header

The above commands return nothing with the following statuses

status 200: email sent to the user
status 304: the user is already activated, the email has not been sent

Send the activation email of the specific user in order for him/her to access the account.

When using the USER authentication, only admin users can send the activation email.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/users/{id}/send_activation_email

Parameters

Parameter Description
id required The id of the user

Http Status Code

Code type
200 ok
401 unauthorized_non_admin unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
404 record_not_found
422 missing_parameter
429 too_many_requests

Disable a user

With the API key

curl -XPUT -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/users/639/disable"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.put "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/users/639/disable",  header

With the USER token

curl -XPUT -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/users/639/disable"
require 'rest-client'

token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
response = RestClient.put "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/users/639/disable",  header

The above commands return JSON structure like this:

{
  "id": 639,
  "lastname": "Einstein",
  "firstname": "Albert",
  "email": "albert.einstein@genius.com",
  "phone": "",
  "mobile_phone": "",
  "job_title": "",
  "im_type": "Skype",
  "im": "albert.einstein",
  "updated_at": "2015-07-22T16:58:43.000Z",
  "created_at": "2015-07-22T16:58:43.000Z",
  "is_admin": true,
  "has_activated": false,
  "is_disabled": true,
  "locale": "en",
  "time_zone": "America/Denver",
  "permalink": "https://YOUR_SUBDOMAIN_HERE.nocrm.io/users/639",
  "avatar_url": null
}

Disable the specific user from the account. The user won't be able to connect anymore to the account.

No data will be lost.

Note: Even after disabling the user, a new user with the same email address cannot be created. The support has to be contacted to re-enable the disabled user.

When using the USER authentication, only admin users can disable a user.

Http request

PUT https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/users/{id}/disable

Parameters

Parameter Description
id required The id of the user

Http Status Code

Code type
200 ok
401 unauthorized_non_admin unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
404 record_not_found
422 missing_parameter
429 too_many_requests

Teams

List all the teams

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/teams"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/teams", header
teams = JSON.parse(response)

With the USER token

curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/teams"
require 'rest-client'

token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/teams", header
teams = JSON.parse(response)

The above commands return JSON structure like this:

[
  {
    "id": 514,
    "name": "Web Sales",
    "users": [
      {
        "id": 514,
        "lastname": "Stone",
        "firstname": "Stéphanie",
        "email": "stef@example.com",
        "is_manager": true
      },
      {
        "id": 518,
        "lastname": "Doe",
        "firstname": "John",
        "email": "john@youdontneedacrm.com",
        "is_manager": false
      }
    ],
    "updated_at": "2014-02-19T16:58:43.000Z",
    "created_at": "2014-02-11T22:41:26.000Z"
  },
  {
    "id": 517,
    "name": "Marketing",
    "users": [
      {
        "id": 524,
        "lastname": "Jane",
        "firstname": "Cheryl",
        "email": "cheryl@example.com",
        "is_manager": true
      },
      {
        "id": 525,
        "lastname": "Doe",
        "firstname": "Albert",
        "email": "albert@example.com",
        "is_manager": false
      }
    ],
    "updated_at": "2014-02-19T16:58:43.000Z",
    "created_at": "2014-02-11T22:41:26.000Z"
  }
]

List all the teams created in the account.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/teams

Http Status Code

Code type
200 ok
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 forbidden_action upgrade_edition
422 missing_parameter
429 too_many_requests

Create a team

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" -H "Content-Type: application/json" -d '{"name":"Web Sales"}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/teams"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
parameters = {
  name: "Web Sales"
}
response = RestClient.post "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/teams", parameters, header
team = JSON.parse(response)

With the USER token

curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" -H "Content-Type: application/json" -d '{"name":"Web Sales"} "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/teams"
require 'rest-client'

token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
parameters = {
  name: "Web Sales"
}
response = RestClient.post "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/teams", parameters, header
team = JSON.parse(response)

The above commands return JSON structure like this:

{
  "id": 5,
  "name": "Web Sales",
  "users": [

  ],
  "updated_at": "2014-02-19T16:58:43.000Z",
  "created_at": "2014-02-11T22:41:26.000Z"
}

Create a team with the specified name.

When using the USER TOKEN authentication, only admin users can create a team.

Http request

POST https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/teams

Parameters

Parameter Description
name required The name of the team

Http Status Code

Code type
201 created
401 unauthorized_non_admin unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 forbidden_action upgrade_edition
422 missing_parameter missing_parameter
429 too_many_requests

Retrieve a team

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/teams/5"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/teams/5",  header
team = JSON.parse(response)

With the USER token

curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/teams/5"
require 'rest-client'

token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/teams/5",  header
team = JSON.parse(response)

The above commands return JSON structure like this:

{
  "id": 5,
  "name": "Web Sales",
  "users": [
    {
      "id": 514,
      "lastname": "Stone",
      "firstname": "Stéphanie",
      "email": "stef@example.com",
      "is_manager": true
    },
    {
      "id": 436,
      "lastname": "Rose",
      "firstname": "Juliette",
      "email": "juliette@example.com",
      "is_manager": false
    }
  ],
  "updated_at": "2014-02-19T16:58:43.000Z",
  "created_at": "2014-02-11T22:41:26.000Z"
}

Retrieve a specific team from its id.

When using the USER TOKEN authentication, only admin users can retrieve a team.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/teams/{id}

Parameters

Parameter Description
id required The id or name of the team to retrieve.

Http Status Code

Code type
200 ok
401 unauthorized_non_admin unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 forbidden_action upgrade_edition
404 record_not_found
422 missing_parameter
429 too_many_requests

Update a team

With the API key

curl -XPUT -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" -H "Content-Type: application/json" -d '{"name":"Web Sales"}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/teams/5"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
parameters = {
  name: "Web Sales"
}
response = RestClient.put "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/teams/5", parameters, header
team = JSON.parse(response)

With the USER token

curl -XPUT -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" -H "Content-Type: application/json" -d '{"name":"Web Sales"}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/teams/5"
require 'rest-client'

token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
parameters = {
  name: "Web Sales"
}
response = RestClient.put "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/teams/5", parameters, header

The above commands return JSON structure like this:

{
  "id": 5,
  "name": "Web Sales",
  "users": [
    {
      "id": 514,
      "lastname": "Stone",
      "firstname": "Stéphanie",
      "email": "stef@example.com",
      "is_manager": true
    },
    {
      "id": 436,
      "lastname": "Rose",
      "firstname": "Juliette",
      "email": "juliette@example.com",
      "is_manager": false
    }
  ],
  "updated_at": "2014-02-19T16:58:43.000Z",
  "created_at": "2014-02-11T22:41:26.000Z"
}

Update the team by updating its name.

When using the USER TOKEN authentication, only admin users can update a team.

Http request

PUT https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/teams/{id}

Parameters

Parameter Description
id required The id of the team
name required The new team's name

Http Status Code

Code type
200 ok
401 unauthorized_non_admin unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 forbidden_action upgrade_edition
404 record_not_found
422 missing_parameter missing_parameter
429 too_many_requests

Delete a team

With the API key

curl -XDELETE -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/teams/15"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.delete "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/teams/15",  header

With the USER token

curl -XDELETE -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/teams/15"
require 'rest-client'

token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
response = RestClient.delete "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/teams/15",  header

The above commands return JSON structure like this:

{
  "id": 15
}

Delete the team specified by its id.

When using the USER TOKEN authentication, only admin users can delete a team.

Http request

DELETE https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/teams/{id}

Parameters

Parameter Description
id required The id of the team

Http Status Code

Code type
200 ok
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 forbidden_action upgrade_edition
404 record_not_found
422 missing_parameter
429 too_many_requests

Add a team member

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" -H "Content-Type: application/json" -d '{"user_id":514,"is_manager":true}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/teams/15/add_member"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
parameters = {
  user_id: 514,
  is_manager: true
}
response = RestClient.post "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/teams/15/add_member", parameters, header
team = JSON.parse(response)

With the USER token

curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" -H "Content-Type: application/json" -d '{"user_id":514,"is_manager":true}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/teams/15/add_member"
require 'rest-client'

token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
parameter = {
  user_id: 514,
  is_manager: true
}
response = RestClient.post "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/teams/15/add_member", parameters, header
team = JSON.parse(response)

The above commands return JSON structure like this:

{
  "id": 15,
  "users": [
    {
      "id": 524,
      "lastname": "Jane",
      "firstname": "Cheryl",
      "email": "cheryl@example.com",
      "is_manager": true
    }
  ],
  "updated_at": "2016-04-07T16:58:43.000Z",
  "created_at": "2015-07-22T16:58:43.000Z"
}

Add a team member or change the manager role for the specified user.

When using the USER TOKEN authentication, only admin users can add a member to a team.

Http request

POST https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/teams/{id}/add_member

Parameters

Parameter Default Description
id required The id of the team
user_id required User’s email address or id to add.
is_manager optional false True if the user should be manager of the team.

Http Status Code

Code type
200 ok
400 user_not_found
401 unauthorized_non_admin unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 forbidden_action upgrade_edition
404 record_not_found
422 missing_parameter missing_parameter
429 too_many_requests

Remove a team member

With the API key

curl -XDELETE -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" -H "Content-Type: application/json" -d '{"user_id":514}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/teams/5/remove_member"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
parameters = {
  user_id: 514
}
response = RestClient.delete "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/teams/5/remove_member", parameters, header
team = JSON.parse(response)

With the USER token

curl -XDELETE -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" -H "Content-Type: application/json" -d '{"user_id":514}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/teams/5/remove_member"
require 'rest-client'

token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
parameter = {
  user_id: 514
}
response = RestClient.delete "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/teams/5/remove_member", parameters, header
team = JSON.parse(response)

The above commands return JSON structure like this:

{
  "id": 5,
  "name": "Web Sales",
  "users": [

  ],
  "updated_at": "2014-02-19T16:58:43.000Z",
  "created_at": "2014-02-11T22:41:26.000Z"
}

Remove a team member.

When using the USER TOKEN authentication, only admin users can remove a member from a team.

Http request

DELETE https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/teams/{id}/remove_member

Parameters

Parameter Default Description
id required The id of the team
user_id required User’s email address or id to remove.

Http Status Code

Code type
200 ok
400 user_not_found
401 unauthorized_non_admin unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 forbidden_action upgrade_edition
404 record_not_found
422 missing_parameter missing_parameter
429 too_many_requests

Webhooks

The Webhooks are a way to link our application with a third party API. Instead of getting leads in order to find out which lead has changed, we can directly notify you by a POST request to an URL you registered earlier. When the event happens, we will send you the request with the object and you can process it for your need. It is easy and efficient this way.

Note: With webhooks, you need an API and some development to process the events we sent. If you don't have all of this, you still have a way to be notified when an event occurs. We also implemented Notifications. The principle is the same as webhook as you can subscribe to certain events but this time you enter an email address. When the event is triggered we directly send you the information by email and someone can processed it. No need any development or an API, we just send you an email as notification.

To define a webhook, you have to setup it up either from the admin section of your account or through the API. You can subscribe to certain events.

When you create a webhook in the administration section of your account or through the API, you have to give us an url where you want to receive the notifications. In this case you will need to develop on your side something to process the data received.

Then to complete the creation of the webhook, we will need one of your generated api key to use to sign the request. When the webhook is created, each time an action happens corresponding to the event subscribed, we will send you a notification and/or a webhook event.

No need to send plenty of requests in order to check the status, we will send you the notification directly to your API when something changed.

Note: when creating the webhook we ask for one of your generated api key. Remember that we will never send you this key in any notification. This key is needed in our side to sign the request and in your side to check the signature of the request and make sure we are the owner of the request. Never communicate your private key to anyone.

List of events

This is the list of events you can subscribe when creating a webhook or a notification. Depending on the edition the account has, you can access or not to the advanced event.

Event's names

Event Description
lead.creation Trigger when a lead is created. Return the created lead.
lead.status.changed Trigger when the status of the lead changed. It could be any status change. Return the modified lead.
lead.status.changed.to.cancelled Trigger when the status of the lead changed to cancelled. Return the modified lead.
lead.status.changed.to.lost Trigger when the status of the lead changed to lost. Return the modified lead.
lead.status.changed.to.standby Trigger when the status of the lead changed to standby. Return the modified lead.
lead.status.changed.to.todo Trigger when the status of the lead changed to to-do. Return the modified lead.
lead.status.changed.to.won Trigger when the status of the lead changed to won. Return the modified lead.

Advanced Event's names

Event Description
account.default_field.created Trigger when a default field has been created. Return the created default field.
account.default_field.deleted Trigger when a default field is deleted. Return the deleted default field.
account.default_field.updated Trigger when a default field is udpated. Return the updated default field.
account.step.created Trigger when a step has been created. Return the created step.
account.step.deleted Trigger when a step is deleted. Return the deleted step.
account.step.updated Trigger when a step has been updated. Return the updated step.
account.step.pipeline.updated Trigger when a pipeline is updated, for example when the name is updated. Return the updated pipeline.
client_folder.created Trigger when a client folder is created. Return the created client folder.
lead.assigned Trigger when a lead has been reassigned. Return the lead.
lead.commented Trigger when a lead has been commented. Return the commented lead.
lead.content_has_changed Trigger when a lead 's description is changed. Return the modified lead.
lead.deleted Trigger when a lead is deleted (moved to trash). Return the deleted lead.
lead.manual.trigger Create a manual webhook that can be added to the lead's actions menu for a manual triggering. Return the lead where the action has been fired.
lead.step.changed Trigger when a lead's step is changed. Return the modified lead.
lead.step.changed.to.PIPE.NAME_OF_YOUR_STEP Trigger when a lead's step is changed to name_of_step. Return the lead modified.
lead.unassigned Trigger when a lead is created unassigned. Return the modified lead.
prospect.created Trigger when a prospect is created. Return the prospect created.
prospect.updated Trigger when one or multiple prospects are updated. Return the batch of prospects updated.
task.status.changed Trigger when the status of a task changed. It could be any status changed. Return the modified task.
task.status.changed.to.done Trigger when the status of a task changed to done. Return the modified task.
task.status.changed.to.standby Trigger when the status of a task changed to standby. Return the modified task.
task.status.changed.to.todo Trigger when the status of a task changed to todo. Return the modified task.

Http Status Code

Code type
200 ok
401 unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
422 missing_parameter
429 too_many_requests

List the webhooks

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/webhooks"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/webhooks", header
webhooks = JSON.parse(response)

With the USER token

Not applicable with a USER token
Not applicable with a USER token

The above commands return JSON structure like this:

[
  {
    "id": 62,
    "event": "lead.content_has_changed",
    "target": "https://my/process",
    "target_type": "url",
    "params": null,
    "name": "My webhook",
    "is_disabled": true
  },
  {
    "id": 63,
    "event": "lead.unassigned",
    "target": "https://my/process2",
    "target_type": "url",
    "params": null,
    "name": "Lead created unassigned",
    "is_disabled": false
  },
  {
    "id": 64,
    "event": "lead.creation",
    "target": "https://my/process3",
    "target_type": "email",
    "params": null,
    "name": "Lead creation notification",
    "is_disabled": false
  },
  {
    "id": 65,
    "event": "lead.deleted",
    "target": "stef@example.com",
    "target_type": "email",
    "params": null,
    "name": "Lead deleted notification",
    "is_disabled": true
  }
]

Retrieve all the webhooks and notifications created in the account.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/webhooks

Http Status Code

Code type
200 ok
401 not_api_key unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
422 missing_parameter
429 too_many_requests

Create a webhook

With the API key

curl -XPOST -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" -H "Content-Type: application/json" -d '{"event":"lead.creation", "target_type":"url", "target":"https://my/process"}' "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/webhooks"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
parameters = {
  event: "lead.creation",
  target_type: "url",
  target: "https://my/process",
  name: "My webhook"
}
response = RestClient.post "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/webhooks", parameters, header
webhook = JSON.parse(response)

With the USER token

Not applicable with a USER token
Not applicable with a USER token

The above commands return JSON structure like this:

{
  "id": 63,
  "event": "lead.creation",
  "target": "https://my/process",
  "target_type": "url",
  "params": null,
  "name": "My webhook"
}

Create a webhook or a notification in the account.

Http request

POST https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/webhooks

Parameters

Parameter Description
event required Event name to subscribe. The list of event depends on your edition, some events are only available in advanced features.
target_type required Kind of webhook you want to create. Can be url (webhook) or email (notification).
target required A url in case of webhook or an email address in case of notification
name optional Name of the webhook
add_to_lead_action_menu optional Only application for the event lead.manual.trigger to add the webhook as an action menu automatically

Http Status Code

Code type
201 created
401 not_api_key unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
409 already_exist
422 webhook_not_created missing_parameter missing_parameter
429 too_many_requests

Delete a webhook

With the API key

curl -XDELETE -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/webhooks/62"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.delete "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/webhooks/62",  header

With the USER token

Not applicable with a USER token
Not applicable with a USER token

The above commands return JSON structure like this:

{
  "id": 62
}

Delete the webhook specified by its id.

Http request

DELETE https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/webhooks/{id}

Parameters

Parameter Description
id required The id of the webhook

Http Status Code

Code type
200 ok
401 not_api_key unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
404 record_not_found
422 missing_parameter
429 too_many_requests

Webhook Events

When one of the subscribed event happened on your account, we trigger a notification and send you a Webhook Event. The notification is sent either by email or by a POST request to the url given depending on the option chosen when creating the webhook. For example when a lead is won we can send a notification so you can start the billing process.

The webhook event we send you is composed of the following elements:

Note: From our API you can retrieve the events that have been sent. To manage the webhooks (creation, deletion, modification), you have to go to your account.

List all webhook events

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/webhook_events"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8" header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" } response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/webhook_events", header events = JSON.parse(response)

The above commands return JSON structure like this:

[
  {
    "id": 984,
    "event": "lead.status.changed.to.won",
    "signature": "5ae43881a5132de2c65cf2cb0e33c23daf25916a",
    "has_succeeded": true,
    "try_count": 1,
    "last_returned_code": 200,
    "data":
    {
      "id": 9331,
      "title": "Bountiful",
      "description": "Firstname: Elizabeth\u003Cbr /\u003ELastname: Swan\u003Cbr /\u003EFull name: Elizabeth Swan\u003Cbr /\u003EEmail: e.swan@bountiful.corp\u003Cbr /\u003EMobile: +1 801 563 9999",
      "text_description": "Firstname: Elizabeth\nLastname: Swan\nFull name: Elizabeth Swan\nEmail: e.swan@bountiful.corp\nMobile: +1 801 563 9999",
      "amount": 1500.0,
      "currency": "USD",
      "probability": 100,
      "reminder_at": null,
      "reminder_duration": null,
      "updated_at": "2015-03-05T21:36:04.000Z",
      "created_at": "2015-03-05T21:34:10.000Z",
      "starred": true,
      "status": "Won",
      "step": "Incoming",
      "tags": ["prospect","test"],
      "contact_email": "e.swan@bountiful.corp",
      "first_contact_email": "e.swan@bountiful.corp",
      "all_contact_emails": ["e.swan@bountiful.corp"],
      "permalink": "https://YOUR_SUBDOMAIN_HERE.nocrm.io/leads/9331",
      "fields":
      {
        "email": "e.swan@bountiful.corp",
        "phone": null,
        "mobile": "+1 801 563 9999",
        "address": null,
        "web": null,
        "first_name": "Elizabeth",
        "last_name": "Swan",
        "full_name": "Elizabeth Swan",
        "job": null,
        "fax": null,
        "vat": null
      },
      "comment_count": 0,
      "bcc_count": 0,
      "team":
      {
        "id": 514,
        "name": "Web Sales",
        "users": [
          {
            "id": 514,
            "lastname": "Stone",
            "firstname": "Stéphanie",
            "email": "stef@example.com",
            "is_manager": true
          },
          {
            "id": 518,
            "lastname": "Doe",
            "firstname": "John",
            "email": "john@youdontneedacrm.com",
            "is_manager": false
          }
        ],
        "updated_at": "2014-02-19T16:58:43.000Z",
        "created_at": "2014-02-11T22:41:26.000Z"
      },
      "user":
      {
        "id": 514,
        "lastname": "Stone",
        "firstname": "Stéphanie",
        "email": "stef@example.com"
      },
      "client_folder": null
    }
  },
  {
    "id": 3,
    "event": "lead.creation",
    "signature": "9a046b0f8c6b3820d7fef781e65f7a11c86e7041",
    "has_succeeded": false,
    "try_count": 2,
    "last_returned_code": 404,
    "data":
    {
      "id": 8115,
      "title": "RED",
      "description": "Firstname: John<br />Lastname: Doe<br />Email: john@red.com<br />Phone: +1 870 538 2086<br />\r\n---\r\n<p>Some description of the company.</p>",
      "text_description": "Firstname: John\nLastname: Doe\nEmail: john@red.com\nPhone: +1 870 538 2086\n---\nSome description of the company.",
      "amount": 3000.0,
      "currency": "USD",
      "probability": 40,
      "reminder_at": null,
      "reminder_duration": null,
      "updated_at": "2014-03-04T17:28:27.000Z",
      "created_at": "2014-03-04T17:28:27.000Z",
      "starred": null,
      "status": "Todo",
      "step": "Incoming",
      "tags": ["series", "rse"],
      "first_contact_email": "john@red.com",
      "all_contact_emails": ["john@red.com"],
      "permalink": "https://YOUR_SUBDOMAIN_HERE.nocrm.io/leads/8115",
      "fields":
      {
        "email": "john@red.com",
        "phone": "+1 870 538 2086",
        "mobile": null,
        "address": null,
        "web": null,
        "first_name": "John",
        "last_name": "Doe",
        "full_name": null,
        "job": null,
        "fax": null,
        "vat": null
      },
      "comment_count": 0,
      "bcc_count": 0,
      "team": null,
      "user":
      {
        "id": 514,
        "lastname": "Stone",
        "firstname": "Stéphanie",
        "email": "stef@example.com"
      },
      "client_folder":
      {
        "id": 1,
        "name": "Series",
        "description": "Billing address: 123 heaven avenue, San Francisco CA\u0026nbsp;94103\u003Cbr /\u003EShipping address: 456 pretty boulevard, Paradise CA\u0026nbsp;94188",
        "is_active": true,
        "created_at": "2015-01-30T22:03:14.000Z"
      }
    }
  }
]

Return the list of all events already sent, going back up to 10 days. This request is only available for admin users.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/webhook_events

Http Status Code

Code type
200 ok
401 unauthorized_non_admin unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
422 missing_parameter
429 too_many_requests

Retrieve a webhook event

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/webhook_events/3"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8" header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" } response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/webhook_events/3", header event = JSON.parse(response)

The above commands return JSON structure like this:

{
  "id": 3,
  "event": "lead.creation",
  "signature": "9a046b0f8c6b3820d7fef781e65f7a11c86e7041",
  "has_succeeded": true,
  "try_count": 1,
  "last_returned_code": 200,
  "data":
  {
    "id": 8115,
    "title": "RED",
    "description": "Firstname: John<br />Lastname: Doe<br />Email: john@red.com<br />Phone: +1 870 538 2086<br />\r\n---\r\n<p>Some description of the company.</p>",
    "text_description": "Firstname: John\nLastname: Doe\nEmail: john@red.com\nPhone: +1 870 538 2086\n---\nSome description of the company.",
    "amount": 3000.0,
    "currency": "USD",
    "probability": 40,
    "reminder_at": null,
    "reminder_duration": null,
    "updated_at": "2014-03-04T17:28:27.000Z",
    "created_at": "2014-03-04T17:28:27.000Z",
    "starred": null,
    "status": "Todo",
    "step": "Incoming",
    "tags": ["series", "rse"],
    "first_contact_email": "john@red.com",
    "all_contact_emails": ["john@red.com"],
    "permalink": "https://YOUR_SUBDOMAIN_HERE.nocrm.io/leads/8115",
    "fields":
    {
      "email": "john@red.com",
      "phone": "+1 870 538 2086",
      "mobile": null,
      "address": null,
      "web": null,
      "first_name": "John",
      "last_name": "Doe",
      "full_name": null,
      "job": null,
      "fax": null,
      "vat": null
    },
    "comment_count": 0,
    "bcc_count": 0,
    "team":
    {
      "id": 514,
      "name": "Web Sales",
      "users": [
        {
          "id": 514,
          "lastname": "Stone",
          "firstname": "Stéphanie",
          "email": "stef@example.com",
          "is_manager": true
        },
        {
          "id": 518,
          "lastname": "Doe",
          "firstname": "John",
          "email": "john@youdontneedacrm.com",
          "is_manager": false
        }
      ],
      "updated_at": "2014-02-19T16:58:43.000Z",
      "created_at": "2014-02-11T22:41:26.000Z"
    },
    "user":
    {
      "id": 514,
      "lastname": "Stone",
      "firstname": "Stéphanie",
      "email": "stef@example.com"
    },
    "client_folder":
    {
      "id":1,
      "name":"Series",
      "description":"Billing address: 123 heaven avenue, San Francisco CA\u0026nbsp;94103\u003Cbr /\u003EShipping address: 456 pretty boulevard, Paradise CA\u0026nbsp;94188",
      "is_active":true,
      "created_at":"2015-01-30T22:03:14.000Z"
    }
  }
}

Retrieve a specific event from its id. This request is only available for admin users.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/v2/webhook_events/{id}

Parameters

Parameter Description
id required The id of the webhook event

Http Status Code

Code type
200 ok
401 unauthorized_non_admin unauthorized_missing_token unauthorized_disabled_token unauthorized_invalid_token
403 upgrade_edition
404 record_not_found
422 missing_parameter
429 too_many_requests

Simplified API

This Simplified API has a limited endpoints with simplified routes and parameters. It is intended to help quick integration with Third-Party partners. You can have more information and examples on our no-code academy.

This API accepts only GET requests to simplify the use and we use the https protocol to secure the transactions.

To use this API you will need:

The token used in the header of each request X-API-KEY is mandatory. Failing to pass this header will result in a 401 error status, not authorized.

Change lead status to 'StandBy'

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/145676/standby?days=15&activity_id=23"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/145676/standby?days=15&activity_id=23", header
lead = JSON.parse(response)

The above commands return JSON structure like this:

{
  "id": 57523,
  "title": "Small Lead",
  "pipeline": "Sales",
  "step": "Incoming",
  "step_id": 1,
  "status": "standby",
  "amount": 2400.0,
  "probability": 30,
  "second_number": null,
  "amount_percentage": null,
  "currency": "USD",
  "starred": true,
  "remind_date": "2021-07-05",
  "remind_time": null,
  "reminder_at": "2021-07-05T09:00:01.000Z",
  "reminder_duration": 0,
  "reminder_activity_id": 23,
  "reminder_activity_log_id": null,
  "reminder_note": null,
  "estimated_closing_date": null,
  "created_at": "2021-06-16T17:49:49.000Z",
  "updated_at": "2021-06-25T18:09:41.000Z",
  "closed_at": null,
  "description": "Firstname: Natalia\nLastname: Bawer\nFull name: Natalia Bawer\nEmail: natalia.bawer@loretta-inc.com\nPhone: 801 274 6798\nMobile: 832 764 1930 \nAddress: 1234 N 7864 W President Bld - Salt Lake City, UT 84105\nWeb: http://more-info-loretta.com\nDepartment: Sales\n--- Entrez une description ci-dessous ---\n \n--- \nMet Natalia at a seminar. She could be interested.\nShe is on business trip. Have to call her when she is back.",
  "html_description": "Firstname: Natalia\u003Cbr /\u003ELastname: Bawer\u003Cbr /\u003EFull name: Natalia Bawer\u003Cbr /\u003EEmail: natalia.bawer@loretta-inc.com\u003Cbr /\u003EPhone: 801 274 6798\u003Cbr /\u003EMobile: 832 764 1930\u0026nbsp;\u003Cbr /\u003EAddress: 1234 N 7864 W President Bld - Salt Lake City, UT 84105\u003Cbr /\u003EWeb: http://more-info-loretta.com\u003Cbr /\u003EDepartment: Sales\u003Cbr /\u003E\r\n\u003Cp class=\"lead-desc-separator\"\u003E--- Entrez une description ci-dessous ---\u003C/p\u003E\r\n\u003Cdiv\u003E\u0026nbsp;\u003C/div\u003E\r\n\u003Cbr /\u003E--- \u003Cbr /\u003E\r\n\u003Cp\u003EMet Natalia at a seminar. She could be interested.\u003Cbr /\u003EShe is on business trip. Have to call her when she is back.\u003C/p\u003E",
  "tags": [],
  "created_from": "api",
  "created_by_id": 1,
  "user_id": 514,
  "team_id": 1,
  "client_folder_id": null,
  "client_folder_name": null,
  "comment_count": 0,
  "attachment_count": 1,
  "extended_info": {
    "all_contact_emails": [ "natalia.bawer@loretta-inc.com" ],
    "first_contact_email": "natalia.bawer@loretta-inc.com",
    "permalink": "https://YOUR_SUBDOMAIN_HERE.nocrm.io/leads/57523",
    "fields":
    {
      "email": "natalia.bawer@loretta-inc.com",
      "phone": "801 274 6798",
      "mobile": "832 764 1930 ",
      "address": "1234 N 7864 W President Bld - Salt Lake City, UT 84105",
      "web": "http://more-info-loretta.com",
      "first_name": "Natalia",
      "last_name": "Bawer",
      "full_name": "Natalia Bawer",
      "job": "Sales",
      "fax": null,
      "vat": null
    },
    "fields_by_name":
    {
      "Firstname": "Natalia",
      "Lastname": "Bawer",
      "Full name": "Natalia Bawer",
      "Email": "natalia.bawer@loretta-inc.com",
      "Phone": "801 274 6798",
      "Mobile": "832 764 1930 ",
      "Address": "1234 N 7864 W President Bld - Salt Lake City, UT 84105",
      "Web": "http://more-info-loretta.com",
      "Department": "Sales"
    },
    "comment_count": 0,
    "bcc_count": 0,
    "team":
    {
      "id": 5,
      "name": "Web Sales",
      "users": [
        {
          "id": 1,
          "lastname": "Stone",
          "firstname": "Stéphanie",
          "email": "stef@example.com",
          "is_manager": true
        },
        {
          "id": 518,
          "lastname": "Doe",
          "firstname": "John",
          "email": "john@youdontneedacrm.com",
          "is_manager": false
        }
      ],
      "updated_at": "2014-02-19T16:58:43.000Z",
      "created_at": "2014-02-11T22:41:26.000Z"
    },
    "user": {
      "id": 1,
      "lastname": "Stone",
      "firstname": "Stephanie",
      "email": "stef@example.com",
      "phone": "+1 222 333 4444",
      "mobile_phone": ""
    },
    "client_folder": null,
    "created_by":
    {
      "id": 1,
      "lastname": "Stone",
      "firstname": "Stephanie",
      "email": "stef@example.com"
    },
    "business_card_id": null,
    "visible_by_count": 1,
    "follow_ups": [],
    "attachments": []
  }
}

Change the lead's status to Standby and schedule the next reminder to be due in a specified number of days in the future.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/{lead_id}/standby

Parameters

Parameter Description
lead_id required Lead's id. The identifier of the lead.
days required Number of days to schedule the reminder in the future.
activity_id optional Activity identifier to set on the reminder.

Change lead status to 'Won'

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/145676/won?amount=1532.56"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/145676/won?amount=1532,56", header
lead = JSON.parse(response)

The above commands return JSON structure like this:

{
  "id": 57523,
  "title": "Small Lead",
  "pipeline": "Sales",
  "step": "Incoming",
  "step_id": 1,
  "status": "won",
  "amount": 1532.56,
  "probability": 100,
  "second_number": null,
  "amount_percentage": null,
  "currency": "USD",
  "starred": true,
  "remind_date": null,
  "remind_time": null,
  "reminder_at": null,
  "reminder_duration": 0,
  "reminder_activity_id": null,
  "reminder_activity_log_id": null,
  "reminder_note": null,
  "estimated_closing_date": null,
  "created_at": "2021-06-16T17:49:49.000Z",
  "updated_at": "2021-06-25T18:09:41.000Z",
  "closed_at": "2021-06-25T18:09:41.000Z",
  "description": "Firstname: Natalia\nLastname: Bawer\nFull name: Natalia Bawer\nEmail: natalia.bawer@loretta-inc.com\nPhone: 801 274 6798\nMobile: 832 764 1930 \nAddress: 1234 N 7864 W President Bld - Salt Lake City, UT 84105\nWeb: http://more-info-loretta.com\nDepartment: Sales\n--- Entrez une description ci-dessous ---\n \n--- \nMet Natalia at a seminar. She could be interested.\nShe is on business trip. Have to call her when she is back.",
  "html_description": "Firstname: Natalia\u003Cbr /\u003ELastname: Bawer\u003Cbr /\u003EFull name: Natalia Bawer\u003Cbr /\u003EEmail: natalia.bawer@loretta-inc.com\u003Cbr /\u003EPhone: 801 274 6798\u003Cbr /\u003EMobile: 832 764 1930\u0026nbsp;\u003Cbr /\u003EAddress: 1234 N 7864 W President Bld - Salt Lake City, UT 84105\u003Cbr /\u003EWeb: http://more-info-loretta.com\u003Cbr /\u003EDepartment: Sales\u003Cbr /\u003E\r\n\u003Cp class=\"lead-desc-separator\"\u003E--- Entrez une description ci-dessous ---\u003C/p\u003E\r\n\u003Cdiv\u003E\u0026nbsp;\u003C/div\u003E\r\n\u003Cbr /\u003E--- \u003Cbr /\u003E\r\n\u003Cp\u003EMet Natalia at a seminar. She could be interested.\u003Cbr /\u003EShe is on business trip. Have to call her when she is back.\u003C/p\u003E",
  "tags": [],
  "created_from": "api",
  "created_by_id": 1,
  "user_id": 1,
  "team_id": 1,
  "client_folder_id": null,
  "client_folder_name": null,
  "comment_count": 0,
  "attachment_count": 1,
  "extended_info": {
    "all_contact_emails": [ "natalia.bawer@loretta-inc.com" ],
    "first_contact_email": "natalia.bawer@loretta-inc.com",
    "permalink": "https://YOUR_SUBDOMAIN_HERE.nocrm.io/leads/57523",
    "fields":
    {
      "email": "natalia.bawer@loretta-inc.com",
      "phone": "801 274 6798",
      "mobile": "832 764 1930 ",
      "address": "1234 N 7864 W President Bld - Salt Lake City, UT 84105",
      "web": "http://more-info-loretta.com",
      "first_name": "Natalia",
      "last_name": "Bawer",
      "full_name": "Natalia Bawer",
      "job": "Sales",
      "fax": null,
      "vat": null
    },
    "fields_by_name":
    {
      "Firstname": "Natalia",
      "Lastname": "Bawer",
      "Full name": "Natalia Bawer",
      "Email": "natalia.bawer@loretta-inc.com",
      "Phone": "801 274 6798",
      "Mobile": "832 764 1930 ",
      "Address": "1234 N 7864 W President Bld - Salt Lake City, UT 84105",
      "Web": "http://more-info-loretta.com",
      "Department": "Sales"
    },
    "comment_count": 0,
    "bcc_count": 0,
    "team":
    {
      "id": 5,
      "name": "Web Sales",
      "users": [
        {
          "id": 1,
          "lastname": "Stone",
          "firstname": "Stéphanie",
          "email": "stef@example.com",
          "is_manager": true
        },
        {
          "id": 518,
          "lastname": "Doe",
          "firstname": "John",
          "email": "john@youdontneedacrm.com",
          "is_manager": false
        }
      ],
      "updated_at": "2014-02-19T16:58:43.000Z",
      "created_at": "2014-02-11T22:41:26.000Z"
    },
    "user": {
      "id": 1,
      "lastname": "Stone",
      "firstname": "Stephanie",
      "email": "stef@example.com",
      "phone": "+1 222 333 4444",
      "mobile_phone": ""
    },
    "client_folder": null,
    "created_by":
    {
      "id": 1,
      "lastname": "Stone",
      "firstname": "Stephanie",
      "email": "stef@example.com"
    },
    "business_card_id": null,
    "visible_by_count": 1,
    "follow_ups": [],
    "attachments": []
  }
}

Change the lead's status to Won and set the amount if specified.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/{lead_id}/won

Parameters

Parameter Description
lead_id required Lead's id. The identifier of the lead.
amount optional Amount of the won lead.

Change lead status to 'Cancelled'

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/145676/cancelled"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/145676/cancelled", header
lead = JSON.parse(response)

The above commands return JSON structure like this:

{
  "id": 57523,
  "title": "Small Lead",
  "pipeline": "Sales",
  "step": "Incoming",
  "step_id": 1,
  "status": "cancelled",
  "amount": 1532.56,
  "probability": 30,
  "second_number": null,
  "amount_percentage": null,
  "currency": "USD",
  "starred": true,
  "remind_date": null,
  "remind_time": null,
  "reminder_at": null,
  "reminder_duration": 0,
  "reminder_activity_id": null,
  "reminder_activity_log_id": null,
  "reminder_note": null,
  "estimated_closing_date": null,
  "created_at": "2021-06-16T17:49:49.000Z",
  "updated_at": "2021-06-25T18:09:41.000Z",
  "closed_at": "2021-06-25T18:09:41.000Z",
  "description": "Firstname: Natalia\nLastname: Bawer\nFull name: Natalia Bawer\nEmail: natalia.bawer@loretta-inc.com\nPhone: 801 274 6798\nMobile: 832 764 1930 \nAddress: 1234 N 7864 W President Bld - Salt Lake City, UT 84105\nWeb: http://more-info-loretta.com\nDepartment: Sales\n--- Entrez une description ci-dessous ---\n \n--- \nMet Natalia at a seminar. She could be interested.\nShe is on business trip. Have to call her when she is back.",
  "html_description": "Firstname: Natalia\u003Cbr /\u003ELastname: Bawer\u003Cbr /\u003EFull name: Natalia Bawer\u003Cbr /\u003EEmail: natalia.bawer@loretta-inc.com\u003Cbr /\u003EPhone: 801 274 6798\u003Cbr /\u003EMobile: 832 764 1930\u0026nbsp;\u003Cbr /\u003EAddress: 1234 N 7864 W President Bld - Salt Lake City, UT 84105\u003Cbr /\u003EWeb: http://more-info-loretta.com\u003Cbr /\u003EDepartment: Sales\u003Cbr /\u003E\r\n\u003Cp class=\"lead-desc-separator\"\u003E--- Entrez une description ci-dessous ---\u003C/p\u003E\r\n\u003Cdiv\u003E\u0026nbsp;\u003C/div\u003E\r\n\u003Cbr /\u003E--- \u003Cbr /\u003E\r\n\u003Cp\u003EMet Natalia at a seminar. She could be interested.\u003Cbr /\u003EShe is on business trip. Have to call her when she is back.\u003C/p\u003E",
  "tags": [],
  "created_from": "api",
  "created_by_id": 1,
  "user_id": 1,
  "team_id": 1,
  "client_folder_id": null,
  "client_folder_name": null,
  "comment_count": 0,
  "attachment_count": 1,
  "extended_info": {
    "all_contact_emails": [ "natalia.bawer@loretta-inc.com" ],
    "first_contact_email": "natalia.bawer@loretta-inc.com",
    "permalink": "https://YOUR_SUBDOMAIN_HERE.nocrm.io/leads/57523",
    "fields":
    {
      "email": "natalia.bawer@loretta-inc.com",
      "phone": "801 274 6798",
      "mobile": "832 764 1930 ",
      "address": "1234 N 7864 W President Bld - Salt Lake City, UT 84105",
      "web": "http://more-info-loretta.com",
      "first_name": "Natalia",
      "last_name": "Bawer",
      "full_name": "Natalia Bawer",
      "job": "Sales",
      "fax": null,
      "vat": null
    },
    "fields_by_name":
    {
      "Firstname": "Natalia",
      "Lastname": "Bawer",
      "Full name": "Natalia Bawer",
      "Email": "natalia.bawer@loretta-inc.com",
      "Phone": "801 274 6798",
      "Mobile": "832 764 1930 ",
      "Address": "1234 N 7864 W President Bld - Salt Lake City, UT 84105",
      "Web": "http://more-info-loretta.com",
      "Department": "Sales"
    },
    "comment_count": 0,
    "bcc_count": 0,
    "team":
    {
      "id": 5,
      "name": "Web Sales",
      "users": [
        {
          "id": 1,
          "lastname": "Stone",
          "firstname": "Stéphanie",
          "email": "stef@example.com",
          "is_manager": true
        },
        {
          "id": 518,
          "lastname": "Doe",
          "firstname": "John",
          "email": "john@youdontneedacrm.com",
          "is_manager": false
        }
      ],
      "updated_at": "2014-02-19T16:58:43.000Z",
      "created_at": "2014-02-11T22:41:26.000Z"
    },
    "user": {
      "id": 1,
      "lastname": "Stone",
      "firstname": "Stephanie",
      "email": "stef@example.com",
      "phone": "+1 222 333 4444",
      "mobile_phone": ""
    },
    "client_folder": null,
    "created_by":
    {
      "id": 1,
      "lastname": "Stone",
      "firstname": "Stephanie",
      "email": "stef@example.com"
    },
    "business_card_id": null,
    "visible_by_count": 1,
    "follow_ups": [],
    "attachments": []
  }
}

Change the lead's status to Cancelled.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/{lead_id}/cancelled

Parameters

Parameter Description
lead_id required Lead's id. The identifier of the lead.

Change lead status to 'Lost'

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/145676/lost"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/145676/lost", header
lead = JSON.parse(response)

The above commands return JSON structure like this:

{
  "id": 57523,
  "title": "Small Lead",
  "pipeline": "Sales",
  "step": "Incoming",
  "step_id": 1,
  "status": "lost",
  "amount": 1532.56,
  "probability": 0,
  "second_number": null,
  "amount_percentage": null,
  "currency": "USD",
  "starred": true,
  "remind_date": null,
  "remind_time": null,
  "reminder_at": null,
  "reminder_duration": 0,
  "reminder_activity_id": null,
  "reminder_activity_log_id": null,
  "reminder_note": null,
  "estimated_closing_date": null,
  "created_at": "2021-06-16T17:49:49.000Z",
  "updated_at": "2021-06-25T18:09:41.000Z",
  "closed_at": "2021-06-25T18:09:41.000Z",
  "description": "Firstname: Natalia\nLastname: Bawer\nFull name: Natalia Bawer\nEmail: natalia.bawer@loretta-inc.com\nPhone: 801 274 6798\nMobile: 832 764 1930 \nAddress: 1234 N 7864 W President Bld - Salt Lake City, UT 84105\nWeb: http://more-info-loretta.com\nDepartment: Sales\n--- Entrez une description ci-dessous ---\n \n--- \nMet Natalia at a seminar. She could be interested.\nShe is on business trip. Have to call her when she is back.",
  "html_description": "Firstname: Natalia\u003Cbr /\u003ELastname: Bawer\u003Cbr /\u003EFull name: Natalia Bawer\u003Cbr /\u003EEmail: natalia.bawer@loretta-inc.com\u003Cbr /\u003EPhone: 801 274 6798\u003Cbr /\u003EMobile: 832 764 1930\u0026nbsp;\u003Cbr /\u003EAddress: 1234 N 7864 W President Bld - Salt Lake City, UT 84105\u003Cbr /\u003EWeb: http://more-info-loretta.com\u003Cbr /\u003EDepartment: Sales\u003Cbr /\u003E\r\n\u003Cp class=\"lead-desc-separator\"\u003E--- Entrez une description ci-dessous ---\u003C/p\u003E\r\n\u003Cdiv\u003E\u0026nbsp;\u003C/div\u003E\r\n\u003Cbr /\u003E--- \u003Cbr /\u003E\r\n\u003Cp\u003EMet Natalia at a seminar. She could be interested.\u003Cbr /\u003EShe is on business trip. Have to call her when she is back.\u003C/p\u003E",
  "tags": [],
  "created_from": "api",
  "created_by_id": 1,
  "user_id": 1,
  "team_id": 1,
  "client_folder_id": null,
  "client_folder_name": null,
  "comment_count": 0,
  "attachment_count": 1,
  "extended_info": {
    "all_contact_emails": [ "natalia.bawer@loretta-inc.com" ],
    "first_contact_email": "natalia.bawer@loretta-inc.com",
    "permalink": "https://YOUR_SUBDOMAIN_HERE.nocrm.io/leads/57523",
    "fields":
    {
      "email": "natalia.bawer@loretta-inc.com",
      "phone": "801 274 6798",
      "mobile": "832 764 1930 ",
      "address": "1234 N 7864 W President Bld - Salt Lake City, UT 84105",
      "web": "http://more-info-loretta.com",
      "first_name": "Natalia",
      "last_name": "Bawer",
      "full_name": "Natalia Bawer",
      "job": "Sales",
      "fax": null,
      "vat": null
    },
    "fields_by_name":
    {
      "Firstname": "Natalia",
      "Lastname": "Bawer",
      "Full name": "Natalia Bawer",
      "Email": "natalia.bawer@loretta-inc.com",
      "Phone": "801 274 6798",
      "Mobile": "832 764 1930 ",
      "Address": "1234 N 7864 W President Bld - Salt Lake City, UT 84105",
      "Web": "http://more-info-loretta.com",
      "Department": "Sales"
    },
    "comment_count": 0,
    "bcc_count": 0,
    "team":
    {
      "id": 5,
      "name": "Web Sales",
      "users": [
        {
          "id": 1,
          "lastname": "Stone",
          "firstname": "Stéphanie",
          "email": "stef@example.com",
          "is_manager": true
        },
        {
          "id": 518,
          "lastname": "Doe",
          "firstname": "John",
          "email": "john@youdontneedacrm.com",
          "is_manager": false
        }
      ],
      "updated_at": "2014-02-19T16:58:43.000Z",
      "created_at": "2014-02-11T22:41:26.000Z"
    },
    "user": {
      "id": 1,
      "lastname": "Stone",
      "firstname": "Stephanie",
      "email": "stef@example.com",
      "phone": "+1 222 333 4444",
      "mobile_phone": ""
    },
    "client_folder": null,
    "created_by":
    {
      "id": 1,
      "lastname": "Stone",
      "firstname": "Stephanie",
      "email": "stef@example.com"
    },
    "business_card_id": null,
    "visible_by_count": 1,
    "follow_ups": [],
    "attachments": []
  }
}

Change the lead's status to Lost.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/{lead_id}/lost

Parameters

Parameter Description
lead_id required Lead's id. The identifier of the lead.

Change lead status to 'Todo'

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/145676/todo"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/145676/todo", header
lead = JSON.parse(response)

The above commands return JSON structure like this:

{
  "id": 57523,
  "title": "Small Lead",
  "pipeline": "Sales",
  "step": "Incoming",
  "step_id": 1,
  "status": "todo",
  "amount": 1532.56,
  "probability": 0,
  "second_number": null,
  "amount_percentage": null,
  "currency": "USD",
  "starred": true,
  "remind_date": null,
  "remind_time": null,
  "reminder_at": null,
  "reminder_duration": 0,
  "reminder_activity_id": null,
  "reminder_activity_log_id": null,
  "reminder_note": null,
  "estimated_closing_date": null,
  "created_at": "2021-06-16T17:49:49.000Z",
  "updated_at": "2021-06-25T18:09:41.000Z",
  "closed_at": "2021-06-25T18:09:41.000Z",
  "description": "Firstname: Natalia\nLastname: Bawer\nFull name: Natalia Bawer\nEmail: natalia.bawer@loretta-inc.com\nPhone: 801 274 6798\nMobile: 832 764 1930 \nAddress: 1234 N 7864 W President Bld - Salt Lake City, UT 84105\nWeb: http://more-info-loretta.com\nDepartment: Sales\n--- Entrez une description ci-dessous ---\n \n--- \nMet Natalia at a seminar. She could be interested.\nShe is on business trip. Have to call her when she is back.",
  "html_description": "Firstname: Natalia\u003Cbr /\u003ELastname: Bawer\u003Cbr /\u003EFull name: Natalia Bawer\u003Cbr /\u003EEmail: natalia.bawer@loretta-inc.com\u003Cbr /\u003EPhone: 801 274 6798\u003Cbr /\u003EMobile: 832 764 1930\u0026nbsp;\u003Cbr /\u003EAddress: 1234 N 7864 W President Bld - Salt Lake City, UT 84105\u003Cbr /\u003EWeb: http://more-info-loretta.com\u003Cbr /\u003EDepartment: Sales\u003Cbr /\u003E\r\n\u003Cp class=\"lead-desc-separator\"\u003E--- Entrez une description ci-dessous ---\u003C/p\u003E\r\n\u003Cdiv\u003E\u0026nbsp;\u003C/div\u003E\r\n\u003Cbr /\u003E--- \u003Cbr /\u003E\r\n\u003Cp\u003EMet Natalia at a seminar. She could be interested.\u003Cbr /\u003EShe is on business trip. Have to call her when she is back.\u003C/p\u003E",
  "tags": [],
  "created_from": "api",
  "created_by_id": 1,
  "user_id": 1,
  "team_id": 1,
  "client_folder_id": null,
  "client_folder_name": null,
  "comment_count": 0,
  "attachment_count": 1,
  "extended_info": {
    "all_contact_emails": [ "natalia.bawer@loretta-inc.com" ],
    "first_contact_email": "natalia.bawer@loretta-inc.com",
    "permalink": "https://YOUR_SUBDOMAIN_HERE.nocrm.io/leads/57523",
    "fields":
    {
      "email": "natalia.bawer@loretta-inc.com",
      "phone": "801 274 6798",
      "mobile": "832 764 1930 ",
      "address": "1234 N 7864 W President Bld - Salt Lake City, UT 84105",
      "web": "http://more-info-loretta.com",
      "first_name": "Natalia",
      "last_name": "Bawer",
      "full_name": "Natalia Bawer",
      "job": "Sales",
      "fax": null,
      "vat": null
    },
    "fields_by_name":
    {
      "Firstname": "Natalia",
      "Lastname": "Bawer",
      "Full name": "Natalia Bawer",
      "Email": "natalia.bawer@loretta-inc.com",
      "Phone": "801 274 6798",
      "Mobile": "832 764 1930 ",
      "Address": "1234 N 7864 W President Bld - Salt Lake City, UT 84105",
      "Web": "http://more-info-loretta.com",
      "Department": "Sales"
    },
    "comment_count": 0,
    "bcc_count": 0,
    "team":
    {
      "id": 5,
      "name": "Web Sales",
      "users": [
        {
          "id": 1,
          "lastname": "Stone",
          "firstname": "Stéphanie",
          "email": "stef@example.com",
          "is_manager": true
        },
        {
          "id": 518,
          "lastname": "Doe",
          "firstname": "John",
          "email": "john@youdontneedacrm.com",
          "is_manager": false
        }
      ],
      "updated_at": "2014-02-19T16:58:43.000Z",
      "created_at": "2014-02-11T22:41:26.000Z"
    },
    "user": {
      "id": 1,
      "lastname": "Stone",
      "firstname": "Stephanie",
      "email": "stef@example.com",
      "phone": "+1 222 333 4444",
      "mobile_phone": ""
    },
    "client_folder": null,
    "created_by":
    {
      "id": 1,
      "lastname": "Stone",
      "firstname": "Stephanie",
      "email": "stef@example.com"
    },
    "business_card_id": null,
    "visible_by_count": 1,
    "follow_ups": [],
    "attachments": []
  }
}

Change the lead's status to Todo.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/{lead_id}/todo

Parameters

Parameter Description
lead_id required Lead's id. The identifier of the lead.

Assign lead to a user

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/145676/assign?user_id=518"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/145676/assign?user_id=518", header
lead = JSON.parse(response)

The above commands return JSON structure like this:

{
  "id": 57523,
  "title": "Small Lead",
  "pipeline": "Sales",
  "step": "Incoming",
  "step_id": 1,
  "status": "standby",
  "amount": 2400.0,
  "probability": 30,
  "second_number": null,
  "amount_percentage": null,
  "currency": "USD",
  "starred": true,
  "remind_date": "2021-07-05",
  "remind_time": null,
  "reminder_at": "2021-07-05T09:00:01.000Z",
  "reminder_duration": 0,
  "reminder_activity_id": null,
  "reminder_activity_log_id": null,
  "reminder_note": null,
  "estimated_closing_date": null,
  "created_at": "2021-06-16T17:49:49.000Z",
  "updated_at": "2021-06-25T18:09:41.000Z",
  "closed_at": null,
  "description": "Firstname: Natalia\nLastname: Bawer\nFull name: Natalia Bawer\nEmail: natalia.bawer@loretta-inc.com\nPhone: 801 274 6798\nMobile: 832 764 1930 \nAddress: 1234 N 7864 W President Bld - Salt Lake City, UT 84105\nWeb: http://more-info-loretta.com\nDepartment: Sales\n--- Entrez une description ci-dessous ---\n \n--- \nMet Natalia at a seminar. She could be interested.\nShe is on business trip. Have to call her when she is back.",
  "html_description": "Firstname: Natalia\u003Cbr /\u003ELastname: Bawer\u003Cbr /\u003EFull name: Natalia Bawer\u003Cbr /\u003EEmail: natalia.bawer@loretta-inc.com\u003Cbr /\u003EPhone: 801 274 6798\u003Cbr /\u003EMobile: 832 764 1930\u0026nbsp;\u003Cbr /\u003EAddress: 1234 N 7864 W President Bld - Salt Lake City, UT 84105\u003Cbr /\u003EWeb: http://more-info-loretta.com\u003Cbr /\u003EDepartment: Sales\u003Cbr /\u003E\r\n\u003Cp class=\"lead-desc-separator\"\u003E--- Entrez une description ci-dessous ---\u003C/p\u003E\r\n\u003Cdiv\u003E\u0026nbsp;\u003C/div\u003E\r\n\u003Cbr /\u003E--- \u003Cbr /\u003E\r\n\u003Cp\u003EMet Natalia at a seminar. She could be interested.\u003Cbr /\u003EShe is on business trip. Have to call her when she is back.\u003C/p\u003E",
  "tags": [],
  "created_from": "api",
  "created_by_id": 1,
  "user_id": 518,
  "team_id": 5,
  "client_folder_id": null,
  "client_folder_name": null,
  "comment_count": 0,
  "attachment_count": 1,
  "extended_info": {
    "all_contact_emails": [ "natalia.bawer@loretta-inc.com" ],
    "first_contact_email": "natalia.bawer@loretta-inc.com",
    "permalink": "https://YOUR_SUBDOMAIN_HERE.nocrm.io/leads/57523",
    "fields":
    {
      "email": "natalia.bawer@loretta-inc.com",
      "phone": "801 274 6798",
      "mobile": "832 764 1930 ",
      "address": "1234 N 7864 W President Bld - Salt Lake City, UT 84105",
      "web": "http://more-info-loretta.com",
      "first_name": "Natalia",
      "last_name": "Bawer",
      "full_name": "Natalia Bawer",
      "job": "Sales",
      "fax": null,
      "vat": null
    },
    "fields_by_name":
    {
      "Firstname": "Natalia",
      "Lastname": "Bawer",
      "Full name": "Natalia Bawer",
      "Email": "natalia.bawer@loretta-inc.com",
      "Phone": "801 274 6798",
      "Mobile": "832 764 1930 ",
      "Address": "1234 N 7864 W President Bld - Salt Lake City, UT 84105",
      "Web": "http://more-info-loretta.com",
      "Department": "Sales"
    },
    "comment_count": 0,
    "bcc_count": 0,
    "team": 
    {
      "id": 5,
      "name": "Web Sales",
      "users": [
        {
          "id": 1,
          "lastname": "Stone",
          "firstname": "Stéphanie",
          "email": "stef@example.com",
          "is_manager": true
        },
        {
          "id": 518,
          "lastname": "Doe",
          "firstname": "John",
          "email": "john@example.com",
          "is_manager": false
        }
      ],
      "updated_at": "2014-02-19T16:58:43.000Z",
      "created_at": "2014-02-11T22:41:26.000Z"
    },
    "user": {
      "id": 518,
      "lastname": "Doe",
      "firstname": "John",
      "email": "john@example.com",
      "phone": "+1 222 333 5555",
      "mobile_phone": ""
    },
    "client_folder": null,
    "created_by":
    {
      "id": 1,
      "lastname": "Stone",
      "firstname": "Stephanie",
      "email": "stef@example.com"
    },
    "business_card_id": null,
    "visible_by_count": 1,
    "follow_ups": [],
    "attachments": []
  }
}

Assign the lead to another user.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/{lead_id}/assign

Parameters

Parameter Description
lead_id required Lead's id. The identifier of the lead.
user_id required User's id to assign the lead to.

Assign lead randomly to a user

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/145676/assign/random"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/145676/assign/random", header
lead = JSON.parse(response)

The above commands return JSON structure like this:

{
  "id": 57523,
  "title": "Small Lead",
  "pipeline": "Sales",
  "step": "Incoming",
  "step_id": 1,
  "status": "standby",
  "amount": 2400.0,
  "probability": 30,
  "second_number": null,
  "amount_percentage": null,
  "currency": "USD",
  "starred": true,
  "remind_date": "2021-07-05",
  "remind_time": null,
  "reminder_at": "2021-07-05T09:00:01.000Z",
  "reminder_duration": 0,
  "reminder_activity_id": null,
  "reminder_activity_log_id": null,
  "reminder_note": null,
  "estimated_closing_date": null,
  "created_at": "2021-06-16T17:49:49.000Z",
  "updated_at": "2021-06-25T18:09:41.000Z",
  "closed_at": null,
  "description": "Firstname: Natalia\nLastname: Bawer\nFull name: Natalia Bawer\nEmail: natalia.bawer@loretta-inc.com\nPhone: 801 274 6798\nMobile: 832 764 1930 \nAddress: 1234 N 7864 W President Bld - Salt Lake City, UT 84105\nWeb: http://more-info-loretta.com\nDepartment: Sales\n--- Entrez une description ci-dessous ---\n \n--- \nMet Natalia at a seminar. She could be interested.\nShe is on business trip. Have to call her when she is back.",
  "html_description": "Firstname: Natalia\u003Cbr /\u003ELastname: Bawer\u003Cbr /\u003EFull name: Natalia Bawer\u003Cbr /\u003EEmail: natalia.bawer@loretta-inc.com\u003Cbr /\u003EPhone: 801 274 6798\u003Cbr /\u003EMobile: 832 764 1930\u0026nbsp;\u003Cbr /\u003EAddress: 1234 N 7864 W President Bld - Salt Lake City, UT 84105\u003Cbr /\u003EWeb: http://more-info-loretta.com\u003Cbr /\u003EDepartment: Sales\u003Cbr /\u003E\r\n\u003Cp class=\"lead-desc-separator\"\u003E--- Entrez une description ci-dessous ---\u003C/p\u003E\r\n\u003Cdiv\u003E\u0026nbsp;\u003C/div\u003E\r\n\u003Cbr /\u003E--- \u003Cbr /\u003E\r\n\u003Cp\u003EMet Natalia at a seminar. She could be interested.\u003Cbr /\u003EShe is on business trip. Have to call her when she is back.\u003C/p\u003E",
  "tags": [],
  "created_from": "api",
  "created_by_id": 1,
  "user_id": 518,
  "team_id": 5,
  "client_folder_id": null,
  "client_folder_name": null,
  "comment_count": 0,
  "attachment_count": 1,
  "extended_info": {
    "all_contact_emails": [ "natalia.bawer@loretta-inc.com" ],
    "first_contact_email": "natalia.bawer@loretta-inc.com",
    "permalink": "https://YOUR_SUBDOMAIN_HERE.nocrm.io/leads/57523",
    "fields":
    {
      "email": "natalia.bawer@loretta-inc.com",
      "phone": "801 274 6798",
      "mobile": "832 764 1930 ",
      "address": "1234 N 7864 W President Bld - Salt Lake City, UT 84105",
      "web": "http://more-info-loretta.com",
      "first_name": "Natalia",
      "last_name": "Bawer",
      "full_name": "Natalia Bawer",
      "job": "Sales",
      "fax": null,
      "vat": null
    },
    "fields_by_name":
    {
      "Firstname": "Natalia",
      "Lastname": "Bawer",
      "Full name": "Natalia Bawer",
      "Email": "natalia.bawer@loretta-inc.com",
      "Phone": "801 274 6798",
      "Mobile": "832 764 1930 ",
      "Address": "1234 N 7864 W President Bld - Salt Lake City, UT 84105",
      "Web": "http://more-info-loretta.com",
      "Department": "Sales"
    },
    "comment_count": 0,
    "bcc_count": 0,
    "team": 
    {
      "id": 5,
      "name": "Web Sales",
      "users": [
        {
          "id": 1,
          "lastname": "Stone",
          "firstname": "Stéphanie",
          "email": "stef@example.com",
          "is_manager": true
        },
        {
          "id": 518,
          "lastname": "Doe",
          "firstname": "John",
          "email": "john@example.com",
          "is_manager": false
        }
      ],
      "updated_at": "2014-02-19T16:58:43.000Z",
      "created_at": "2014-02-11T22:41:26.000Z"
    },
    "user": {
      "id": 518,
      "lastname": "Doe",
      "firstname": "John",
      "email": "john@example.com",
      "phone": "+1 222 333 5555",
      "mobile_phone": ""
    },
    "client_folder": null,
    "created_by":
    {
      "id": 1,
      "lastname": "Stone",
      "firstname": "Stephanie",
      "email": "stef@example.com"
    },
    "business_card_id": null,
    "visible_by_count": 1,
    "follow_ups": [],
    "attachments": []
  }
}

Assign the lead randomly to any user of the account. An option is possible to assign a lead to any user excluding the administrators

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/{lead_id}/assign/random

Parameters

Parameter Default Description
lead_id required Lead's id. The identifier of the lead.
no_admin optional false Exclude the administrator when picking randomly a user in the account.

Assign lead randomly to a user in a team

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/145676/assign/random_in_a_team?team=5"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/145676/assign/random_in_a_team?team=5", header
lead = JSON.parse(response)

The above commands return JSON structure like this:

{
  "id": 57523,
  "title": "Small Lead",
  "pipeline": "Sales",
  "step": "Incoming",
  "step_id": 1,
  "status": "standby",
  "amount": 2400.0,
  "probability": 30,
  "second_number": null,
  "amount_percentage": null,
  "currency": "USD",
  "starred": true,
  "remind_date": "2021-07-05",
  "remind_time": null,
  "reminder_at": "2021-07-05T09:00:01.000Z",
  "reminder_duration": 0,
  "reminder_activity_id": null,
  "reminder_activity_log_id": null,
  "reminder_note": null,
  "estimated_closing_date": null,
  "created_at": "2021-06-16T17:49:49.000Z",
  "updated_at": "2021-06-25T18:09:41.000Z",
  "closed_at": null,
  "description": "Firstname: Natalia\nLastname: Bawer\nFull name: Natalia Bawer\nEmail: natalia.bawer@loretta-inc.com\nPhone: 801 274 6798\nMobile: 832 764 1930 \nAddress: 1234 N 7864 W President Bld - Salt Lake City, UT 84105\nWeb: http://more-info-loretta.com\nDepartment: Sales\n--- Entrez une description ci-dessous ---\n \n--- \nMet Natalia at a seminar. She could be interested.\nShe is on business trip. Have to call her when she is back.",
  "html_description": "Firstname: Natalia\u003Cbr /\u003ELastname: Bawer\u003Cbr /\u003EFull name: Natalia Bawer\u003Cbr /\u003EEmail: natalia.bawer@loretta-inc.com\u003Cbr /\u003EPhone: 801 274 6798\u003Cbr /\u003EMobile: 832 764 1930\u0026nbsp;\u003Cbr /\u003EAddress: 1234 N 7864 W President Bld - Salt Lake City, UT 84105\u003Cbr /\u003EWeb: http://more-info-loretta.com\u003Cbr /\u003EDepartment: Sales\u003Cbr /\u003E\r\n\u003Cp class=\"lead-desc-separator\"\u003E--- Entrez une description ci-dessous ---\u003C/p\u003E\r\n\u003Cdiv\u003E\u0026nbsp;\u003C/div\u003E\r\n\u003Cbr /\u003E--- \u003Cbr /\u003E\r\n\u003Cp\u003EMet Natalia at a seminar. She could be interested.\u003Cbr /\u003EShe is on business trip. Have to call her when she is back.\u003C/p\u003E",
  "tags": [],
  "created_from": "api",
  "created_by_id": 1,
  "user_id": 518,
  "team_id": 5,
  "client_folder_id": null,
  "client_folder_name": null,
  "comment_count": 0,
  "attachment_count": 1,
  "extended_info": {
    "all_contact_emails": [ "natalia.bawer@loretta-inc.com" ],
    "first_contact_email": "natalia.bawer@loretta-inc.com",
    "permalink": "https://YOUR_SUBDOMAIN_HERE.nocrm.io/leads/57523",
    "fields":
    {
      "email": "natalia.bawer@loretta-inc.com",
      "phone": "801 274 6798",
      "mobile": "832 764 1930 ",
      "address": "1234 N 7864 W President Bld - Salt Lake City, UT 84105",
      "web": "http://more-info-loretta.com",
      "first_name": "Natalia",
      "last_name": "Bawer",
      "full_name": "Natalia Bawer",
      "job": "Sales",
      "fax": null,
      "vat": null
    },
    "fields_by_name":
    {
      "Firstname": "Natalia",
      "Lastname": "Bawer",
      "Full name": "Natalia Bawer",
      "Email": "natalia.bawer@loretta-inc.com",
      "Phone": "801 274 6798",
      "Mobile": "832 764 1930 ",
      "Address": "1234 N 7864 W President Bld - Salt Lake City, UT 84105",
      "Web": "http://more-info-loretta.com",
      "Department": "Sales"
    },
    "comment_count": 0,
    "bcc_count": 0,
    "team": 
    {
      "id": 5,
      "name": "Web Sales",
      "users": [
        {
          "id": 1,
          "lastname": "Stone",
          "firstname": "Stéphanie",
          "email": "stef@example.com",
          "is_manager": true
        },
        {
          "id": 518,
          "lastname": "Doe",
          "firstname": "John",
          "email": "john@example.com",
          "is_manager": false
        }
      ],
      "updated_at": "2014-02-19T16:58:43.000Z",
      "created_at": "2014-02-11T22:41:26.000Z"
    },
    "user": {
      "id": 518,
      "lastname": "Doe",
      "firstname": "John",
      "email": "john@example.com",
      "phone": "+1 222 333 5555",
      "mobile_phone": ""
    },
    "client_folder": null,
    "created_by":
    {
      "id": 1,
      "lastname": "Stone",
      "firstname": "Stephanie",
      "email": "stef@example.com"
    },
    "business_card_id": null,
    "visible_by_count": 1,
    "follow_ups": [],
    "attachments": []
  }
}

Assign the lead randomly to another user inside the specified team.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/{lead_id}/assign/random_in_a_team

Parameters

Parameter Default Description
lead_id required Lead's id. The identifier of the lead.
team_id required Team's identifier.
no_manager optional false Exclude managers inside the team. true to exclude and false to include. By default the managers are included.

Assign lead with a round robin pattern

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/145676/assign/round_robin?increment=18"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/145676/assign/round_robin?increment=18", header
lead = JSON.parse(response)

The above commands return JSON structure like this:

{
  "id": 57523,
  "title": "Small Lead",
  "pipeline": "Sales",
  "step": "Incoming",
  "step_id": 1,
  "status": "standby",
  "amount": 2400.0,
  "probability": 30,
  "second_number": null,
  "amount_percentage": null,
  "currency": "USD",
  "starred": true,
  "remind_date": "2021-07-05",
  "remind_time": null,
  "reminder_at": "2021-07-05T09:00:01.000Z",
  "reminder_duration": 0,
  "reminder_activity_id": null,
  "reminder_activity_log_id": null,
  "reminder_note": null,
  "estimated_closing_date": null,
  "created_at": "2021-06-16T17:49:49.000Z",
  "updated_at": "2021-06-25T18:09:41.000Z",
  "closed_at": null,
  "description": "Firstname: Natalia\nLastname: Bawer\nFull name: Natalia Bawer\nEmail: natalia.bawer@loretta-inc.com\nPhone: 801 274 6798\nMobile: 832 764 1930 \nAddress: 1234 N 7864 W President Bld - Salt Lake City, UT 84105\nWeb: http://more-info-loretta.com\nDepartment: Sales\n--- Entrez une description ci-dessous ---\n \n--- \nMet Natalia at a seminar. She could be interested.\nShe is on business trip. Have to call her when she is back.",
  "html_description": "Firstname: Natalia\u003Cbr /\u003ELastname: Bawer\u003Cbr /\u003EFull name: Natalia Bawer\u003Cbr /\u003EEmail: natalia.bawer@loretta-inc.com\u003Cbr /\u003EPhone: 801 274 6798\u003Cbr /\u003EMobile: 832 764 1930\u0026nbsp;\u003Cbr /\u003EAddress: 1234 N 7864 W President Bld - Salt Lake City, UT 84105\u003Cbr /\u003EWeb: http://more-info-loretta.com\u003Cbr /\u003EDepartment: Sales\u003Cbr /\u003E\r\n\u003Cp class=\"lead-desc-separator\"\u003E--- Entrez une description ci-dessous ---\u003C/p\u003E\r\n\u003Cdiv\u003E\u0026nbsp;\u003C/div\u003E\r\n\u003Cbr /\u003E--- \u003Cbr /\u003E\r\n\u003Cp\u003EMet Natalia at a seminar. She could be interested.\u003Cbr /\u003EShe is on business trip. Have to call her when she is back.\u003C/p\u003E",
  "tags": [],
  "created_from": "api",
  "created_by_id": 1,
  "user_id": 518,
  "team_id": 5,
  "client_folder_id": null,
  "client_folder_name": null,
  "comment_count": 0,
  "attachment_count": 1,
  "extended_info": {
    "all_contact_emails": [ "natalia.bawer@loretta-inc.com" ],
    "first_contact_email": "natalia.bawer@loretta-inc.com",
    "permalink": "https://YOUR_SUBDOMAIN_HERE.nocrm.io/leads/57523",
    "fields":
    {
      "email": "natalia.bawer@loretta-inc.com",
      "phone": "801 274 6798",
      "mobile": "832 764 1930 ",
      "address": "1234 N 7864 W President Bld - Salt Lake City, UT 84105",
      "web": "http://more-info-loretta.com",
      "first_name": "Natalia",
      "last_name": "Bawer",
      "full_name": "Natalia Bawer",
      "job": "Sales",
      "fax": null,
      "vat": null
    },
    "fields_by_name":
    {
      "Firstname": "Natalia",
      "Lastname": "Bawer",
      "Full name": "Natalia Bawer",
      "Email": "natalia.bawer@loretta-inc.com",
      "Phone": "801 274 6798",
      "Mobile": "832 764 1930 ",
      "Address": "1234 N 7864 W President Bld - Salt Lake City, UT 84105",
      "Web": "http://more-info-loretta.com",
      "Department": "Sales"
    },
    "comment_count": 0,
    "bcc_count": 0,
    "team": 
    {
      "id": 5,
      "name": "Web Sales",
      "users": [
        {
          "id": 1,
          "lastname": "Stone",
          "firstname": "Stéphanie",
          "email": "stef@example.com",
          "is_manager": true
        },
        {
          "id": 518,
          "lastname": "Doe",
          "firstname": "John",
          "email": "john@example.com",
          "is_manager": false
        }
      ],
      "updated_at": "2014-02-19T16:58:43.000Z",
      "created_at": "2014-02-11T22:41:26.000Z"
    },
    "user": {
      "id": 518,
      "lastname": "Doe",
      "firstname": "John",
      "email": "john@example.com",
      "phone": "+1 222 333 5555",
      "mobile_phone": ""
    },
    "client_folder": null,
    "created_by":
    {
      "id": 1,
      "lastname": "Stone",
      "firstname": "Stephanie",
      "email": "stef@example.com"
    },
    "business_card_id": null,
    "visible_by_count": 1,
    "follow_ups": [],
    "attachments": []
  }
}

Assign the lead to any user with an equal repartition between the users.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/{lead_id}/assign/round_robin

Parameters

Parameter Default Description
lead_id required Lead's id. The identifier of the lead.
increment required The value of the increment counter that tracks the number of leads assigned thus far.
team_id optional The team idenitifier number in order to assign leads to team members.
no_manager optional false Exclude managers inside the team. true to exclude and false to include. By default the managers are included.
no_admin optional false Exclude administrators. true to exclude and false to include. By default the administrators are included.

Move lead to the next step

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/145676/next_step"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/145676/next_step", header
lead = JSON.parse(response)

The above commands return JSON structure like this:

{
  "id": 57523,
  "title": "Small Lead",
  "pipeline": "Sales",
  "step": "Contacted",
  "step_id": 2,
  "status": "standby",
  "amount": 2400.0,
  "probability": 30,
  "second_number": null,
  "amount_percentage": null,
  "currency": "USD",
  "starred": true,
  "remind_date": "2021-07-05",
  "remind_time": null,
  "reminder_at": "2021-07-05T09:00:01.000Z",
  "reminder_duration": 0,
  "reminder_activity_id": null,
  "reminder_activity_log_id": null,
  "reminder_note": null,
  "estimated_closing_date": null,
  "created_at": "2021-06-16T17:49:49.000Z",
  "updated_at": "2021-06-25T18:09:41.000Z",
  "closed_at": null,
  "description": "Firstname: Natalia\nLastname: Bawer\nFull name: Natalia Bawer\nEmail: natalia.bawer@loretta-inc.com\nPhone: 801 274 6798\nMobile: 832 764 1930 \nAddress: 1234 N 7864 W President Bld - Salt Lake City, UT 84105\nWeb: http://more-info-loretta.com\nDepartment: Sales\n--- Entrez une description ci-dessous ---\n \n--- \nMet Natalia at a seminar. She could be interested.\nShe is on business trip. Have to call her when she is back.",
  "html_description": "Firstname: Natalia\u003Cbr /\u003ELastname: Bawer\u003Cbr /\u003EFull name: Natalia Bawer\u003Cbr /\u003EEmail: natalia.bawer@loretta-inc.com\u003Cbr /\u003EPhone: 801 274 6798\u003Cbr /\u003EMobile: 832 764 1930\u0026nbsp;\u003Cbr /\u003EAddress: 1234 N 7864 W President Bld - Salt Lake City, UT 84105\u003Cbr /\u003EWeb: http://more-info-loretta.com\u003Cbr /\u003EDepartment: Sales\u003Cbr /\u003E\r\n\u003Cp class=\"lead-desc-separator\"\u003E--- Entrez une description ci-dessous ---\u003C/p\u003E\r\n\u003Cdiv\u003E\u0026nbsp;\u003C/div\u003E\r\n\u003Cbr /\u003E--- \u003Cbr /\u003E\r\n\u003Cp\u003EMet Natalia at a seminar. She could be interested.\u003Cbr /\u003EShe is on business trip. Have to call her when she is back.\u003C/p\u003E",
  "tags": [],
  "created_from": "api",
  "created_by_id": 1,
  "user_id": 518,
  "team_id": 5,
  "client_folder_id": null,
  "client_folder_name": null,
  "comment_count": 0,
  "attachment_count": 1,
  "extended_info": {
    "all_contact_emails": [ "natalia.bawer@loretta-inc.com" ],
    "first_contact_email": "natalia.bawer@loretta-inc.com",
    "permalink": "https://YOUR_SUBDOMAIN_HERE.nocrm.io/leads/57523",
    "fields":
    {
      "email": "natalia.bawer@loretta-inc.com",
      "phone": "801 274 6798",
      "mobile": "832 764 1930 ",
      "address": "1234 N 7864 W President Bld - Salt Lake City, UT 84105",
      "web": "http://more-info-loretta.com",
      "first_name": "Natalia",
      "last_name": "Bawer",
      "full_name": "Natalia Bawer",
      "job": "Sales",
      "fax": null,
      "vat": null
    },
    "fields_by_name":
    {
      "Firstname": "Natalia",
      "Lastname": "Bawer",
      "Full name": "Natalia Bawer",
      "Email": "natalia.bawer@loretta-inc.com",
      "Phone": "801 274 6798",
      "Mobile": "832 764 1930 ",
      "Address": "1234 N 7864 W President Bld - Salt Lake City, UT 84105",
      "Web": "http://more-info-loretta.com",
      "Department": "Sales"
    },
    "comment_count": 0,
    "bcc_count": 0,
    "team": 
    {
      "id": 5,
      "name": "Web Sales",
      "users": [
        {
          "id": 1,
          "lastname": "Stone",
          "firstname": "Stéphanie",
          "email": "stef@example.com",
          "is_manager": true
        },
        {
          "id": 518,
          "lastname": "Doe",
          "firstname": "John",
          "email": "john@example.com",
          "is_manager": false
        }
      ],
      "updated_at": "2014-02-19T16:58:43.000Z",
      "created_at": "2014-02-11T22:41:26.000Z"
    },
    "user": {
      "id": 518,
      "lastname": "Doe",
      "firstname": "John",
      "email": "john@example.com",
      "phone": "+1 222 333 5555",
      "mobile_phone": ""
    },
    "client_folder": null,
    "created_by":
    {
      "id": 1,
      "lastname": "Stone",
      "firstname": "Stephanie",
      "email": "stef@example.com"
    },
    "business_card_id": null,
    "visible_by_count": 1,
    "follow_ups": [],
    "attachments": []
  }
}

Move the lead to the next step. If the lead is already to the last step in its pipeline, an error is returned.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/{lead_id}/next_step

Parameters

Parameter Description
lead_id required Lead's id. The identifier of the lead.

Move lead to another step

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/145676/move_to_step?step_id=23"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/145676/move_to_step?step_id=23", header
lead = JSON.parse(response)

The above commands return JSON structure like this:

{
  "id": 57523,
  "title": "Small Lead",
  "pipeline": "Shipping",
  "step": "Label Created",
  "step_id": 23,
  "status": "standby",
  "amount": 2400.0,
  "probability": 30,
  "second_number": null,
  "amount_percentage": null,
  "currency": "USD",
  "starred": true,
  "remind_date": "2021-07-05",
  "remind_time": null,
  "reminder_at": "2021-07-05T09:00:01.000Z",
  "reminder_duration": 0,
  "reminder_activity_id": null,
  "reminder_activity_log_id": null,
  "reminder_note": null,
  "estimated_closing_date": null,
  "created_at": "2021-06-16T17:49:49.000Z",
  "updated_at": "2021-06-25T18:09:41.000Z",
  "closed_at": null,
  "description": "Firstname: Natalia\nLastname: Bawer\nFull name: Natalia Bawer\nEmail: natalia.bawer@loretta-inc.com\nPhone: 801 274 6798\nMobile: 832 764 1930 \nAddress: 1234 N 7864 W President Bld - Salt Lake City, UT 84105\nWeb: http://more-info-loretta.com\nDepartment: Sales\n--- Entrez une description ci-dessous ---\n \n--- \nMet Natalia at a seminar. She could be interested.\nShe is on business trip. Have to call her when she is back.",
  "html_description": "Firstname: Natalia\u003Cbr /\u003ELastname: Bawer\u003Cbr /\u003EFull name: Natalia Bawer\u003Cbr /\u003EEmail: natalia.bawer@loretta-inc.com\u003Cbr /\u003EPhone: 801 274 6798\u003Cbr /\u003EMobile: 832 764 1930\u0026nbsp;\u003Cbr /\u003EAddress: 1234 N 7864 W President Bld - Salt Lake City, UT 84105\u003Cbr /\u003EWeb: http://more-info-loretta.com\u003Cbr /\u003EDepartment: Sales\u003Cbr /\u003E\r\n\u003Cp class=\"lead-desc-separator\"\u003E--- Entrez une description ci-dessous ---\u003C/p\u003E\r\n\u003Cdiv\u003E\u0026nbsp;\u003C/div\u003E\r\n\u003Cbr /\u003E--- \u003Cbr /\u003E\r\n\u003Cp\u003EMet Natalia at a seminar. She could be interested.\u003Cbr /\u003EShe is on business trip. Have to call her when she is back.\u003C/p\u003E",
  "tags": [],
  "created_from": "api",
  "created_by_id": 1,
  "user_id": 518,
  "team_id": 5,
  "client_folder_id": null,
  "client_folder_name": null,
  "comment_count": 0,
  "attachment_count": 1,
  "extended_info": {
    "all_contact_emails": [ "natalia.bawer@loretta-inc.com" ],
    "first_contact_email": "natalia.bawer@loretta-inc.com",
    "permalink": "https://YOUR_SUBDOMAIN_HERE.nocrm.io/leads/57523",
    "fields":
    {
      "email": "natalia.bawer@loretta-inc.com",
      "phone": "801 274 6798",
      "mobile": "832 764 1930 ",
      "address": "1234 N 7864 W President Bld - Salt Lake City, UT 84105",
      "web": "http://more-info-loretta.com",
      "first_name": "Natalia",
      "last_name": "Bawer",
      "full_name": "Natalia Bawer",
      "job": "Sales",
      "fax": null,
      "vat": null
    },
    "fields_by_name":
    {
      "Firstname": "Natalia",
      "Lastname": "Bawer",
      "Full name": "Natalia Bawer",
      "Email": "natalia.bawer@loretta-inc.com",
      "Phone": "801 274 6798",
      "Mobile": "832 764 1930 ",
      "Address": "1234 N 7864 W President Bld - Salt Lake City, UT 84105",
      "Web": "http://more-info-loretta.com",
      "Department": "Sales"
    },
    "comment_count": 0,
    "bcc_count": 0,
    "team": 
    {
      "id": 5,
      "name": "Web Sales",
      "users": [
        {
          "id": 1,
          "lastname": "Stone",
          "firstname": "Stéphanie",
          "email": "stef@example.com",
          "is_manager": true
        },
        {
          "id": 518,
          "lastname": "Doe",
          "firstname": "John",
          "email": "john@example.com",
          "is_manager": false
        }
      ],
      "updated_at": "2014-02-19T16:58:43.000Z",
      "created_at": "2014-02-11T22:41:26.000Z"
    },
    "user": {
      "id": 518,
      "lastname": "Doe",
      "firstname": "John",
      "email": "john@example.com",
      "phone": "+1 222 333 5555",
      "mobile_phone": ""
    },
    "client_folder": null,
    "created_by":
    {
      "id": 1,
      "lastname": "Stone",
      "firstname": "Stephanie",
      "email": "stef@example.com"
    },
    "business_card_id": null,
    "visible_by_count": 1,
    "follow_ups": [],
    "attachments": []
  }
}

Move the lead to the specified step.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/{lead_id}/move_to_step

Parameters

Parameter Description
lead_id required Lead's id. The identifier of the lead.
step_id required Step's identifier.

Add tag to a lead

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/145676/add_tag?tag=ProductA"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/145676/add_tag?tag=ProductA", header
lead = JSON.parse(response)

The above commands return JSON structure like this:

{
  "id": 57523,
  "title": "Small Lead",
  "pipeline": "Shipping",
  "step": "Label Created",
  "step_id": 23,
  "status": "standby",
  "amount": 2400.0,
  "probability": 30,
  "second_number": null,
  "amount_percentage": null,
  "currency": "USD",
  "starred": true,
  "remind_date": "2021-07-05",
  "remind_time": null,
  "reminder_at": "2021-07-05T09:00:01.000Z",
  "reminder_duration": 0,
  "reminder_activity_id": null,
  "reminder_activity_log_id": null,
  "reminder_note": null,
  "estimated_closing_date": null,
  "created_at": "2021-06-16T17:49:49.000Z",
  "updated_at": "2021-06-25T18:09:41.000Z",
  "closed_at": null,
  "description": "Firstname: Natalia\nLastname: Bawer\nFull name: Natalia Bawer\nEmail: natalia.bawer@loretta-inc.com\nPhone: 801 274 6798\nMobile: 832 764 1930 \nAddress: 1234 N 7864 W President Bld - Salt Lake City, UT 84105\nWeb: http://more-info-loretta.com\nDepartment: Sales\n--- Entrez une description ci-dessous ---\n \n--- \nMet Natalia at a seminar. She could be interested.\nShe is on business trip. Have to call her when she is back.",
  "html_description": "Firstname: Natalia\u003Cbr /\u003ELastname: Bawer\u003Cbr /\u003EFull name: Natalia Bawer\u003Cbr /\u003EEmail: natalia.bawer@loretta-inc.com\u003Cbr /\u003EPhone: 801 274 6798\u003Cbr /\u003EMobile: 832 764 1930\u0026nbsp;\u003Cbr /\u003EAddress: 1234 N 7864 W President Bld - Salt Lake City, UT 84105\u003Cbr /\u003EWeb: http://more-info-loretta.com\u003Cbr /\u003EDepartment: Sales\u003Cbr /\u003E\r\n\u003Cp class=\"lead-desc-separator\"\u003E--- Entrez une description ci-dessous ---\u003C/p\u003E\r\n\u003Cdiv\u003E\u0026nbsp;\u003C/div\u003E\r\n\u003Cbr /\u003E--- \u003Cbr /\u003E\r\n\u003Cp\u003EMet Natalia at a seminar. She could be interested.\u003Cbr /\u003EShe is on business trip. Have to call her when she is back.\u003C/p\u003E",
  "tags": ["ProductA"],
  "created_from": "api",
  "created_by_id": 1,
  "user_id": 518,
  "team_id": 5,
  "client_folder_id": null,
  "client_folder_name": null,
  "comment_count": 0,
  "attachment_count": 1,
  "extended_info": {
    "all_contact_emails": [ "natalia.bawer@loretta-inc.com" ],
    "first_contact_email": "natalia.bawer@loretta-inc.com",
    "permalink": "https://YOUR_SUBDOMAIN_HERE.nocrm.io/leads/57523",
    "fields":
    {
      "email": "natalia.bawer@loretta-inc.com",
      "phone": "801 274 6798",
      "mobile": "832 764 1930 ",
      "address": "1234 N 7864 W President Bld - Salt Lake City, UT 84105",
      "web": "http://more-info-loretta.com",
      "first_name": "Natalia",
      "last_name": "Bawer",
      "full_name": "Natalia Bawer",
      "job": "Sales",
      "fax": null,
      "vat": null
    },
    "fields_by_name":
    {
      "Firstname": "Natalia",
      "Lastname": "Bawer",
      "Full name": "Natalia Bawer",
      "Email": "natalia.bawer@loretta-inc.com",
      "Phone": "801 274 6798",
      "Mobile": "832 764 1930 ",
      "Address": "1234 N 7864 W President Bld - Salt Lake City, UT 84105",
      "Web": "http://more-info-loretta.com",
      "Department": "Sales"
    },
    "comment_count": 0,
    "bcc_count": 0,
    "team": 
    {
      "id": 5,
      "name": "Web Sales",
      "users": [
        {
          "id": 1,
          "lastname": "Stone",
          "firstname": "Stéphanie",
          "email": "stef@example.com",
          "is_manager": true
        },
        {
          "id": 518,
          "lastname": "Doe",
          "firstname": "John",
          "email": "john@example.com",
          "is_manager": false
        }
      ],
      "updated_at": "2014-02-19T16:58:43.000Z",
      "created_at": "2014-02-11T22:41:26.000Z"
    },
    "user": {
      "id": 518,
      "lastname": "Doe",
      "firstname": "John",
      "email": "john@example.com",
      "phone": "+1 222 333 5555",
      "mobile_phone": ""
    },
    "client_folder": null,
    "created_by":
    {
      "id": 1,
      "lastname": "Stone",
      "firstname": "Stephanie",
      "email": "stef@example.com"
    },
    "business_card_id": null,
    "visible_by_count": 1,
    "follow_ups": [],
    "attachments": []
  }
}

Add the specified tag to the lead.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/{lead_id}/add_tag

Parameters

Parameter Description
lead_id required Lead's id. The identifier of the lead.
tag required The tag to add to the lead.

Send a template email to a lead

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/145676/send_email_from_template?email_template_id=12&from_user_id=1"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/145676/send_email_from_template?email_template_id=12&from_user_id=1", header
lead = JSON.parse(response)

The above commands return JSON structure like this:

{
  "message": "Sending email..."
}

Send an email to the lead from the specified template. If there are variables not decoded or no email address in the lead, the email is not sent.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/{lead_id}/send_email_from_template

Parameters

Parameter Description
lead_id required Lead's id. The identifier of the lead.
email_template_id required The template id to send the email from.
from_user_id required The identifier of the user who sends the email (FROM of the email).

Send a custom email to a lead

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/145676/send_email?subject=Important Message&from_user_id=1&content=Something to say"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/145676/send_email?subject=Important Message&from_user_id=1&content=Something to say", header
lead = JSON.parse(response)

The above commands return JSON structure like this:

{
  "message": "Sending email..."
}

Send a custom email to the lead.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/{lead_id}/send_email

Parameters

Parameter Description
lead_id required Lead's id. The identifier of the lead.
subject required The subject of the email.
from_user_id required The identifier of the user who sends the email (FROM of the email).
cc optional Email address to add in CC.
bcc optional Email address to add in BCC.
content required The content of the email.

Log an activity to a lead

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/145676/add_activity?activity_id=45&user_id=35&content=Demo"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/145676/add_activity?activity_id=45&user_id=35&content=Demo", header
lead = JSON.parse(response)

The above commands return JSON structure like this:

{
  "id": 503,
  "content": "Demo",
  "commented_item": {
    "item": "Lead",
    "id": 145676
  },
  "created_at": "2021-07-12T21:40:48.000Z",
  "attachments": [],
  "activity_id": 45,
  "raw_content": "Demo",
  "reactions": [],
  "is_pinned": false,
  "user": {
    "id": 35,
    "lastname": "Doe",
    "firstname": "Jane",
    "email": "jane.doe@example.com",
    "phone": "+1 222 333 4444",
    "mobile_phone": ""
  }
}

Add an activity to the lead.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/{lead_id}/add_activity

Parameters

Parameter Description
lead_id required Lead's id. The identifier of the lead.
activity_id required The identifier of the activity to add.
user_id required The identifier of the user who posts the activity.
content optional The content of the activity to log.

Create a post-sales process from a template

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/55252/follow_ups/create_from_template?post_sales_template_id=10"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/55252/follow_ups/create_from_template?post_sales_template_id=10", header
post_sales_process = JSON.parse(response)

The above commands return JSON structure like this:

{
  "id": 8,
  "title": "Shipping",
  "description": "",
  "status": "todo",
  "tags": [
    "express",
    "world"
  ],
  "tasks_count": 4,
  "tasks_done_count": 0,
  "next_action_at": "2022-02-06T23:00:01.000Z",
  "lead_id": 55252,
  "user_id": 1,
  "created_at": "2022-02-07T21:27:49.000Z",
  "updated_at": "2022-02-07T21:27:49.000Z",
  "tasks": [
    {
      "id": 52,
      "content": "Prepare package",
      "position": 1,
      "status": "todo",
      "done_at": null,
      "next_action_at": "2022-02-07T23:00:01.000Z",
      "follow_up_id": 11,
      "user_id": 1,
      "created_at": "2022-02-07T21:27:49.000Z",
      "updated_at": "2022-02-07T21:27:49.000Z"
    },
    {
      "id": 53,
      "content": "Print label",
      "position": 2,
      "status": "todo",
      "done_at": null,
      "next_action_at": "2022-02-07T23:00:01.000Z",
      "follow_up_id": 11,
      "user_id": 1,
      "created_at": "2022-02-07T21:27:49.000Z",
      "updated_at": "2022-02-07T21:27:49.000Z"
    },
    {
      "id": 54,
      "content": "Pickup",
      "position": 3,
      "status": "todo",
      "done_at": null,
      "next_action_at": "2022-02-07T23:00:01.000Z",
      "follow_up_id": 11,
      "user_id": 1,
      "created_at": "2022-02-07T21:27:49.000Z",
      "updated_at": "2022-02-07T21:27:49.000Z"
    },
    {
      "id": 55,
      "content": "Delivered",
      "position": 4,
      "status": "todo",
      "done_at": null,
      "next_action_at": "2022-02-07T23:00:01.000Z",
      "follow_up_id": 11,
      "user_id": 1,
      "created_at": "2022-02-07T21:27:49.000Z",
      "updated_at": "2022-02-07T21:27:49.000Z"
    }
  ]
}

Create a post-sales process on a lead from a template.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/{lead_id}/follow_ups/create_from_template

Parameters

Parameter Description
lead_id required Lead's id. The identifier of the lead.
post_sales_template_id required The identifier of the post-sales process template.

Find prospects

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/rows/find_prospects?field_key=Phone&field_value=0387123456"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/rows/find_prospects?field_key=Phone&field_value=0387123456", header
spreadsheet_rows = JSON.parse(response)

The above commands return JSON structure like this:

[
  {
    "id": 133,
    "lead_id": null,
    "is_active": true,
    "content": [
      "Paris",
      "Albert",
      "Einstein",
      "0612233445",
      "0387123456",
      "albert@example.com",
      null,
      null,
      null,
      null,
      null,
      null
    ],
    "spreadsheet_id": 31
  }
]

Find prospects by email or by field.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/rows/find_prospects

Parameters

Parameter Description
email required Email address in the column of the prospect.
field_key optional Field name entered as column for the prospect. It has to be used with the field_value parameter.
field_value optional Field value corresponding to the field_key parameter. Return the prospects containing this value in the field_key. It has to be used with the field_key parameter

You must used at least the parameter email or the parameters field_key and field_value.

Create lead from a prospect

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/rows/145676/create_lead?user_id=12"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/rows/145676/create_lead?user_id=12", header
lead = JSON.parse(response)

The above commands return JSON structure like this:

{
  "id": 57525,
  "title": "Blue Corp",
  "pipeline": "Sales",
  "step": "Incoming",
  "step_id": 12,
  "status": "todo",
  "amount": null,
  "probability": null,
  "second_number": null,
  "amount_percentage": null,
  "currency": "USD",
  "starred": false,
  "remind_date": null,
  "remind_time": null,
  "reminder_at": null,
  "reminder_duration": 0,
  "reminder_activity_id": null,
  "reminder_activity_log_id": null,
  "reminder_note": null,
  "estimated_closing_date": null,
  "created_at": "2021-06-16T17:49:49.000Z",
  "updated_at": "2021-06-25T18:09:41.000Z",
  "closed_at": null,
  "description": "Firstname: Natalia\nLastname: Bawer\nFull name: Natalia Bawer\nEmail: natalia.bawer@loretta-inc.com\nPhone: 801 274 6798\nMobile: 832 764 1930 \nAddress: 1234 N 7864 W President Bld - Salt Lake City, UT 84105\nWeb: http://more-info-loretta.com\nDepartment: Sales\n--- Entrez une description ci-dessous ---\n \n--- \nMet Natalia at a seminar. She could be interested.\nShe is on business trip. Have to call her when she is back.",
  "html_description": "Firstname: Natalia\u003Cbr /\u003ELastname: Bawer\u003Cbr /\u003EFull name: Natalia Bawer\u003Cbr /\u003EEmail: natalia.bawer@loretta-inc.com\u003Cbr /\u003EPhone: 801 274 6798\u003Cbr /\u003EMobile: 832 764 1930\u0026nbsp;\u003Cbr /\u003EAddress: 1234 N 7864 W President Bld - Salt Lake City, UT 84105\u003Cbr /\u003EWeb: http://more-info-loretta.com\u003Cbr /\u003EDepartment: Sales\u003Cbr /\u003E\r\n\u003Cp class=\"lead-desc-separator\"\u003E--- Entrez une description ci-dessous ---\u003C/p\u003E\r\n\u003Cdiv\u003E\u0026nbsp;\u003C/div\u003E\r\n\u003Cbr /\u003E--- \u003Cbr /\u003E\r\n\u003Cp\u003EMet Natalia at a seminar. She could be interested.\u003Cbr /\u003EShe is on business trip. Have to call her when she is back.\u003C/p\u003E",
  "tags": [],
  "created_from": "api",
  "created_by_id": 514,
  "user_id": 12,
  "team_id": 5,
  "client_folder_id": null,
  "client_folder_name": null,
  "comment_count": 0,
  "attachment_count": 1,
  "extended_info": {
    "all_contact_emails": [ "natalia.bawer@loretta-inc.com" ],
    "first_contact_email": "natalia.bawer@loretta-inc.com",
    "permalink": "https://YOUR_SUBDOMAIN_HERE.nocrm.io/leads/57525",
    "fields":
    {
      "email": "natalia.bawer@loretta-inc.com",
      "phone": "801 274 6798",
      "mobile": "832 764 1930 ",
      "address": "1234 N 7864 W President Bld - Salt Lake City, UT 84105",
      "web": "http://more-info-loretta.com",
      "first_name": "Natalia",
      "last_name": "Bawer",
      "full_name": "Natalia Bawer",
      "job": "Sales",
      "fax": null,
      "vat": null
    },
    "fields_by_name":
    {
      "Firstname": "Natalia",
      "Lastname": "Bawer",
      "Full name": "Natalia Bawer",
      "Email": "natalia.bawer@loretta-inc.com",
      "Phone": "801 274 6798",
      "Mobile": "832 764 1930 ",
      "Address": "1234 N 7864 W President Bld - Salt Lake City, UT 84105",
      "Web": "http://more-info-loretta.com",
      "Department": "Sales"
    },
    "comment_count": 0,
    "bcc_count": 0,
    "team": 
    {
      "id": 5,
      "name": "Web Sales",
      "users": [
        {
          "id": 514,
          "lastname": "Stone",
          "firstname": "Stéphanie",
          "email": "stef@example.com",
          "is_manager": true
        },
        {
          "id": 518,
          "lastname": "Doe",
          "firstname": "John",
          "email": "john@example.com",
          "is_manager": false
        }
      ],
      "updated_at": "2014-02-19T16:58:43.000Z",
      "created_at": "2014-02-11T22:41:26.000Z"
    },
    "user": {
      "id": 12,
      "lastname": "Doe",
      "firstname": "John",
      "email": "john@example.com",
      "phone": "+1 222 333 5555",
      "mobile_phone": ""
    },
    "client_folder": null,
    "created_by":
    {
      "id": 514,
      "lastname": "Stone",
      "firstname": "Stephanie",
      "email": "stef@example.com"
    },
    "business_card_id": null,
    "visible_by_count": 1,
    "follow_ups": [],
    "attachments": []
  }
}

Create a lead from a prospect.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/rows/{prospect_id}/create_lead

Parameters

Parameter Description
prospect_id required Prospect's id. The identifier of the prospect.
user_id optional User identifier to assign the lead.

Duplicate a specified lead

With the API key

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" -H "Content-Type: application/json" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/3456/duplicate_lead?step=In+Touch"
require 'rest-client'

key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/3456/duplicate_lead?step=In Touch", header
duplicated_lead = JSON.parse(response)

The above commands return JSON structure like this:

{ 
  "id": 8114,
  "title": "Awesome Company #2",
  "pipeline": null,
  "step": "In Touch",
  "step_id": 47,
  "status": "Todo",
  "amount": 2345,
  "probability": 50,
  "currency": "USD",
  "starred": null,
  "remind_date": null,
  "remind_time": null,
  "reminder_at": null,
  "reminder_duration": null,
  "created_at": "2014-02-28T20:57:29.000Z",
  "estimated_closing_date": null,
  "updated_at": "2014-02-28T20:57:29.000Z",
  "closed_at": null,
  "description": "Firstname: John\nLastname: Doe\nEmail: john.doe@company.com",
  "html_description": "Firstname: John\nLastname: Doe\nEmail: john.doe@company.com",
  "tags": ["google","prospect"],
  "created_from": "api",
  "created_by_id": 514,
  "user_id": 514,
  "team_id": 5,
  "client_folder_id": null,
  "client_folder_name": null,
  "attachment_count": 0,
  "extended_info":
  {
    "all_contact_emails": ["john.doe@company.com"],
    "first_contact_email": "john.doe@company.com",
    "permalink": "https://YOUR_SUBDOMAIN_HERE.nocrm.io/leads/8114",
    "fields":
    {
      "email": "john.doe@company.com",
      "phone": null,
      "mobile": null,
      "address": null,
      "web": null,
      "first_name": "John",
      "last_name": "Doe",
      "full_name": null,
      "job": null,
      "fax": null,
      "vat": null
    },
    "fields_by_name":
    {
      "Email": "john.doe@company.com",
      "Firstname": "John",
      "Lastname": "Doe"
    },
    "comment_count": 0,
    "bcc_count": 0,
    "team": null,
    "user":
    {
      "id": 514,
      "lastname": "Stone",
      "firstname": "Stéphanie",
      "email": "stef@example.com",
      "phone": "2223334444",
      "mobile_phone": ""
    },
    "client_folder": null,
    "created_by": {
      "id": 514,
      "lastname": "Stone",
      "firstname": "Stéphanie",
      "email": "stef@example.com"
    },
    "business_card_id": null,
    "visible_by_count": 1,
    "follow_ups": []
  }
}

Duplicate the lead.

If the step parameter is not used, the duplicated lead will go to the first step of the same pipeline of the lead.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/{lead_id}/duplicate_lead

Parameters

Parameter Description
lead_id required Lead's id. The identifier of the lead.
step optional Step's id or Step's name for the lead. If the step is not found, an error 404 is returned. For information if you have steps in different pipeline that have the same name, it is better to use the step's id.

Update a field into Lead's description

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/145676/update_field?field=Firstname&value=jack"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/145676/update_field?field=Firstname&value=Jack", header
lead = JSON.parse(response)

The above commands return JSON structure like this:

{
  "id": 57525,
  "title": "Blue Corp",
  "pipeline": "Sales",
  "step": "Incoming",
  "step_id": 12,
  "status": "todo",
  "amount": null,
  "probability": null,
  "second_number": null,
  "amount_percentage": null,
  "currency": "USD",
  "starred": false,
  "remind_date": null,
  "remind_time": null,
  "reminder_at": null,
  "reminder_duration": 0,
  "reminder_activity_id": null,
  "reminder_activity_log_id": null,
  "reminder_note": null,
  "estimated_closing_date": null,
  "created_at": "2021-06-16T17:49:49.000Z",
  "updated_at": "2021-06-25T18:09:41.000Z",
  "closed_at": null,
  "description": "Firstname: Jack\nLastname: Bawer\nFull name: Natalia Bawer\nEmail: natalia.bawer@loretta-inc.com\nPhone: 801 274 6798\nMobile: 832 764 1930 \nAddress: 1234 N 7864 W President Bld - Salt Lake City, UT 84105\nWeb: http://more-info-loretta.com\nDepartment: Sales\n--- Entrez une description ci-dessous ---\n \n--- \nMet Natalia at a seminar. She could be interested.\nShe is on business trip. Have to call her when she is back.",
  "html_description": "Firstname: Jack\u003Cbr /\u003ELastname: Bawer\u003Cbr /\u003EFull name: Natalia Bawer\u003Cbr /\u003EEmail: natalia.bawer@loretta-inc.com\u003Cbr /\u003EPhone: 801 274 6798\u003Cbr /\u003EMobile: 832 764 1930\u0026nbsp;\u003Cbr /\u003EAddress: 1234 N 7864 W President Bld - Salt Lake City, UT 84105\u003Cbr /\u003EWeb: http://more-info-loretta.com\u003Cbr /\u003EDepartment: Sales\u003Cbr /\u003E\r\n\u003Cp class=\"lead-desc-separator\"\u003E--- Entrez une description ci-dessous ---\u003C/p\u003E\r\n\u003Cdiv\u003E\u0026nbsp;\u003C/div\u003E\r\n\u003Cbr /\u003E--- \u003Cbr /\u003E\r\n\u003Cp\u003EMet Natalia at a seminar. She could be interested.\u003Cbr /\u003EShe is on business trip. Have to call her when she is back.\u003C/p\u003E",
  "tags": [],
  "created_from": "api",
  "created_by_id": 514,
  "user_id": 12,
  "team_id": 5,
  "client_folder_id": null,
  "client_folder_name": null,
  "comment_count": 0,
  "attachment_count": 1,
  "extended_info": {
    "all_contact_emails": [ "natalia.bawer@loretta-inc.com" ],
    "first_contact_email": "natalia.bawer@loretta-inc.com",
    "permalink": "https://YOUR_SUBDOMAIN_HERE.nocrm.io/leads/57525",
    "fields":
    {
      "email": "natalia.bawer@loretta-inc.com",
      "phone": "801 274 6798",
      "mobile": "832 764 1930 ",
      "address": "1234 N 7864 W President Bld - Salt Lake City, UT 84105",
      "web": "http://more-info-loretta.com",
      "first_name": "Natalia",
      "last_name": "Bawer",
      "full_name": "Natalia Bawer",
      "job": "Sales",
      "fax": null,
      "vat": null
    },
    "fields_by_name":
    {
      "Firstname": "Jack",
      "Lastname": "Bawer",
      "Full name": "Natalia Bawer",
      "Email": "natalia.bawer@loretta-inc.com",
      "Phone": "801 274 6798",
      "Mobile": "832 764 1930 ",
      "Address": "1234 N 7864 W President Bld - Salt Lake City, UT 84105",
      "Web": "http://more-info-loretta.com",
      "Department": "Sales"
    },
    "comment_count": 0,
    "bcc_count": 0,
    "team": 
    {
      "id": 5,
      "name": "Web Sales",
      "users": [
        {
          "id": 514,
          "lastname": "Stone",
          "firstname": "Stéphanie",
          "email": "stef@example.com",
          "is_manager": true
        },
        {
          "id": 518,
          "lastname": "Doe",
          "firstname": "John",
          "email": "john@example.com",
          "is_manager": false
        }
      ],
      "updated_at": "2014-02-19T16:58:43.000Z",
      "created_at": "2014-02-11T22:41:26.000Z"
    },
    "user": {
      "id": 12,
      "lastname": "Doe",
      "firstname": "John",
      "email": "john@example.com",
      "phone": "+1 222 333 5555",
      "mobile_phone": ""
    },
    "client_folder": null,
    "created_by":
    {
      "id": 514,
      "lastname": "Stone",
      "firstname": "Stephanie",
      "email": "stef@example.com"
    },
    "business_card_id": null,
    "visible_by_count": 1,
    "follow_ups": [],
    "attachments": []
  }
}

Update a field's lead into description.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/{lead_id}/update_field

Parameters

Parameter Description
lead_id required Lead's id. The identifier of the lead.
field required Field's name to update.
value required New value of the field.

Append to Lead's description

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/145676/append_to_description?to_append=To add at the end of the description"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/145676/append_to_description?to_append=To add at the end of the description", header
lead = JSON.parse(response)

The above commands return JSON structure like this:

{
  "id": 57525,
  "title": "Blue Corp",
  "pipeline": "Sales",
  "step": "Incoming",
  "step_id": 12,
  "status": "todo",
  "amount": null,
  "probability": null,
  "second_number": null,
  "amount_percentage": null,
  "currency": "USD",
  "starred": false,
  "remind_date": null,
  "remind_time": null,
  "reminder_at": null,
  "reminder_duration": 0,
  "reminder_activity_id": null,
  "reminder_activity_log_id": null,
  "reminder_note": null,
  "estimated_closing_date": null,
  "created_at": "2021-06-16T17:49:49.000Z",
  "updated_at": "2021-06-25T18:09:41.000Z",
  "closed_at": null,
  "description": "Firstname: Jack\nLastname: Bawer\nFull name: Natalia Bawer\nEmail: natalia.bawer@loretta-inc.com\nPhone: 801 274 6798\nMobile: 832 764 1930 \nAddress: 1234 N 7864 W President Bld - Salt Lake City, UT 84105\nWeb: http://more-info-loretta.com\nDepartment: Sales\n--- Entrez une description ci-dessous ---\n \n--- \nMet Natalia at a seminar. She could be interested.\nShe is on business trip. Have to call her when she is back.\nTo add at the end of the description",
  "html_description": "Firstname: Jack\u003Cbr /\u003ELastname: Bawer\u003Cbr /\u003EFull name: Natalia Bawer\u003Cbr /\u003EEmail: natalia.bawer@loretta-inc.com\u003Cbr /\u003EPhone: 801 274 6798\u003Cbr /\u003EMobile: 832 764 1930\u0026nbsp;\u003Cbr /\u003EAddress: 1234 N 7864 W President Bld - Salt Lake City, UT 84105\u003Cbr /\u003EWeb: http://more-info-loretta.com\u003Cbr /\u003EDepartment: Sales\u003Cbr /\u003E\r\n\u003Cp class=\"lead-desc-separator\"\u003E--- Entrez une description ci-dessous ---\u003C/p\u003E\r\n\u003Cdiv\u003E\u0026nbsp;\u003C/div\u003E\r\n\u003Cbr /\u003E--- \u003Cbr /\u003E\r\n\u003Cp\u003EMet Natalia at a seminar. She could be interested.\u003Cbr /\u003EShe is on business trip. Have to call her when she is back.\u003C/p\u003E\u003Cbr /\u003ETo add at the end of the description",
  "tags": [],
  "created_from": "api",
  "created_by_id": 514,
  "user_id": 12,
  "team_id": 5,
  "client_folder_id": null,
  "client_folder_name": null,
  "comment_count": 0,
  "attachment_count": 1,
  "extended_info": {
    "all_contact_emails": [ "natalia.bawer@loretta-inc.com" ],
    "first_contact_email": "natalia.bawer@loretta-inc.com",
    "permalink": "https://YOUR_SUBDOMAIN_HERE.nocrm.io/leads/57525",
    "fields":
    {
      "email": "natalia.bawer@loretta-inc.com",
      "phone": "801 274 6798",
      "mobile": "832 764 1930 ",
      "address": "1234 N 7864 W President Bld - Salt Lake City, UT 84105",
      "web": "http://more-info-loretta.com",
      "first_name": "Natalia",
      "last_name": "Bawer",
      "full_name": "Natalia Bawer",
      "job": "Sales",
      "fax": null,
      "vat": null
    },
    "fields_by_name":
    {
      "Firstname": "Jack",
      "Lastname": "Bawer",
      "Full name": "Natalia Bawer",
      "Email": "natalia.bawer@loretta-inc.com",
      "Phone": "801 274 6798",
      "Mobile": "832 764 1930 ",
      "Address": "1234 N 7864 W President Bld - Salt Lake City, UT 84105",
      "Web": "http://more-info-loretta.com",
      "Department": "Sales"
    },
    "comment_count": 0,
    "bcc_count": 0,
    "team": 
    {
      "id": 5,
      "name": "Web Sales",
      "users": [
        {
          "id": 514,
          "lastname": "Stone",
          "firstname": "Stéphanie",
          "email": "stef@example.com",
          "is_manager": true
        },
        {
          "id": 518,
          "lastname": "Doe",
          "firstname": "John",
          "email": "john@example.com",
          "is_manager": false
        }
      ],
      "updated_at": "2014-02-19T16:58:43.000Z",
      "created_at": "2014-02-11T22:41:26.000Z"
    },
    "user": {
      "id": 12,
      "lastname": "Doe",
      "firstname": "John",
      "email": "john@example.com",
      "phone": "+1 222 333 5555",
      "mobile_phone": ""
    },
    "client_folder": null,
    "created_by":
    {
      "id": 514,
      "lastname": "Stone",
      "firstname": "Stephanie",
      "email": "stef@example.com"
    },
    "business_card_id": null,
    "visible_by_count": 1,
    "follow_ups": [],
    "attachments": []
  }
}

Append text to lead's description.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/{lead_id}/append_to_description

Parameters

Parameter Description
lead_id required Lead's id. The identifier of the lead.
to_append required Text to append at the end of the lead's description.

Delete lead

curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/52345/delete"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/52345/delete", header
deleted_lead_id = JSON.parse(response)

The above commands return JSON structure like this:

{
  "id": 52345
}

Delete a lead.

Http request

GET https://YOUR_SUBDOMAIN_HERE.nocrm.io/api/simple/leads/{lead_id}/delete

Parameters

Parameter Description
lead_id required Lead's id. The identifier of the lead.

Errors

Each end-point if there is an error in the process returns a JSON with the following attributes:

The message is nice if you need to display it to the user but not easy to test as we can change it.

The type is the attribute to test if you want to do a specific process when it happens