propipelines.com API
Welcome to the Pro Pipe Lines 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:
- your account address which is of the form https://YOUR_SLUG_HERE.propipelines.com
- a token that can be a private key generated by your administrator from the admin section of your account or a user token returned by a login
There are two ways to connect on the API and it depends on what you intend to do:
- if the user who makes the request is not important, use the API key that makes the request as the first admin user of the account.
- if the requests have to be made by a specific a user, use the login method that will give you a USER_TOKEN to make the requests. The requests in this case will depend on the rights of the user meaning if the user is not admin, he/she could not access of admin actions.
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:
- Use one of the generated keys from your account or the user token
- Use an https request to call the API method you want with the one of the key, your parameters and by using the correct http method
REST defines which http method is to be used depending on wich kind of request your performing.
- To read something use GET method
- To create something use POST method
- To update something use PUT method
- To destroy something use DELETE method
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 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@propipelines.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:
- user not dependent using one of your API key: it is for the account and it grants you admin rights. Meaning if you create a lead for example with this api key without specifying a user, the lead won't belong to any specific user and will appear in the interface as an unassigned lead.
- user dependent using a USER token: all the requests will use the privacy of the users and some requests won;t be allowed depending of the user rights.
Ping API
With the API key
curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SLUG_HERE.propipelines.com/api/v2/ping"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SLUG_HERE.propipelines.com/api/v2/ping", header
JSON.parse(response)
With the USER token
curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/api/v2/ping
Log as
With the API key
curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_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_SLUG_HERE.propipelines.com/api/v2/auth/log_as
Parameters
| Parameter | Description | |
|---|---|---|
| user_id | required | User id or email to retrieve the USER token for this user. |
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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/api/v2/auth/login", header
token = JSON.parse(response)
The above commands return JSON structure like this:
{
"token": "ITd-Jb3EC_nCXI2fez4hhg",
"slug": "THE_SLUG_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:
- concatenate your
email, a colon character:and yourpassword - Base64 encode the previous string
- use the header parameter
Authorizationlike defined bellow
Http request
GET https://YOUR_SLUG_HERE.propipelines.com/api/v2/auth/login
HEADERS
| Name | Value |
|---|---|
| Authorization | Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ== |
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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/api/v2/auth/logout
Steps
List the steps
With the API key
curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SLUG_HERE.propipelines.com/api/v2/steps"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SLUG_HERE.propipelines.com/api/v2/steps", header
steps = JSON.parse(response)
With the USER token
curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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. |
Retrieve a step
With the API key
curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/api/v2/steps/1189", header
step = JSON.parse(response)
With the USER token
shell curl -H "X-USER-TOKEN": ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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. |
Pipelines
List the pipelines
With the API key
curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SLUG_HERE.propipelines.com/api/v2/pipelines"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SLUG_HERE.propipelines.com/api/v2/pipelines", header
pipelines = JSON.parse(response)
With the USER token
curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/api/v2/pipelines
Client folders
List the client folders
With the API key
curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SLUG_HERE.propipelines.com/api/v2/clients"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SLUG_HERE.propipelines.com/api/v2/clients", header
clients = JSON.parse(response)
With the USER token
curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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. |
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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/api/v2/clients", parameters, header
client = JSON.parse(response)
The above commands return JSON structure like this:
{
"id": 13,
"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_SLUG_HERE.propipelines.com/clients/13",
"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"
}
}
}
Return the client folder created.
Http request
POST https://YOUR_SLUG_HERE.propipelines.com/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) |
Retrieve a client folder
With the API key
curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/api/v2/clients/12", header
client = JSON.parse(response)
With the USER token
curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/api/v2/clients/12", header
client = 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,
"extended_info": {
"permalink": "https://YOUR_SLUG_HERE.propipelines.com/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"
}
}
}
Return the client folder, previously created in your account.
Http request
GET https://YOUR_SLUG_HERE.propipelines.com/api/v2/clients/{id}
Parameters
| Parameter | Description | |
|---|---|---|
| id | required | The identifier of the lead |
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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/api/v2/clients/12", parameters, header
client = JSON.parse(response)
The above commands return JSON structure like this:
{
"id": 12,
"name": "Blue Corp",
"description": "",
"is_active": true,
"created_at": "2015-04-22T22:03:20.000Z",
"user_id": 514,
"extended_info": {
"permalink": "https://YOUR_SLUG_HERE.propipelines.com/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"
}
}
}
Update the client folder previously created.
Http request
PUT https://YOUR_SLUG_HERE.propipelines.com/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 |
Delete a client folder
With the API key
curl -XDELETE -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/api/v2/clients/12", header
client = JSON.parse(response)
With the USER token
curl -XDELETE -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/api/v2/clients/{id}
Parameters
| Parameter | Description | |
|---|---|---|
| id | required | The identifier of the client folder |
Categories
List the categories
With the API key
curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/api/v2/categories", parameters, header
categories = JSON.parse(response)
With the USER token
curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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",
"created_at": "2015-09-06T22:46:06.000Z",
"position": null
},
{
"id": 58,
"name": "Europe",
"category": "Origin",
"created_at": null,
"position": null
},
{
"id": 59,
"name": "Asia",
"category": "Origin",
"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",
"created_at": "2015-09-06T22:46:06.000Z",
"position": null
},
{
"id": 61,
"name": "Tablet",
"category": "Product",
"created_at": null,
"position": null
},
{
"id": 62,
"name": "Computer",
"category": "Product",
"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_SLUG_HERE.propipelines.com/api/v2/categories
Parameters
| Parameter | Default | Description | |
|---|---|---|---|
| include_tags | optional | false |
Include the supertags under each categories returned. |
Create a category
With the API key
curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8"
"https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/api/v2/category
Parameters
| Parameter | Default | Description | |
|---|---|---|---|
| name | required | The category name |
Predefined tags
List the predefined tags
With the API key
curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/api/v2/predefined_tags", header
categories = JSON.parse(response)
With the USER token
curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/api/v2/predefined_tags", header
categories = JSON.parse(response)
The above commands return JSON structure like this:
[
{
"id": 54,
"name": "US",
"category": "Origin",
"created_at": "2015-09-06T22:46:06.000Z",
"position": null
},
{
"id": 58,
"name": "Europe",
"category": "Origin",
"created_at": null,
"position": null
},
{
"id": 59,
"name": "Asia",
"category": "Origin",
"created_at": null,
"position": null
},
{
"id": 60,
"name": "Phone",
"category": "Product",
"created_at": "2015-09-06T22:46:06.000Z",
"position": null
},
{
"id": 61,
"name": "Tablet",
"category": "Product",
"created_at": null,
"position": null
},
{
"id": 62,
"name": "Computer",
"category": "Product",
"created_at": null,
"position": null
}
]
Return the list of predefined tags, previously created in your account.
Http request
GET https://YOUR_SLUG_HERE.propipelines.com/api/v2/predefined_tags
Create a predefined tag
With the API key
curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8"
"https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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",
"created_at":"2020-06-18T12:55:55.000Z",
"position":null
}
Return the created predefined tag.
Http request
POST https://YOUR_SLUG_HERE.propipelines.com/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 |
Fields
List the fields
With the API key
curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SLUG_HERE.propipelines.com/api/v2/fields"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SLUG_HERE.propipelines.com/api/v2/fields", header
fields = JSON.parse(response)
With the USER token
curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/api/v2/fields
Parameters
| Parameter | Default | Description | |
|---|---|---|---|
| type | optional | To restrict the type of fields you want. The values can be lead or client. |
Create a field
With the API key
curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8"
"https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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 |
Activities
List the activities
With the API key
curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SLUG_HERE.propipelines.com/api/v2/activities"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SLUG_HERE.propipelines.com/api/v2/activities", header
activities = JSON.parse(response)
With the USER token
curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/api/v2/activities
Leads
List the leads
With the API key
curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SLUG_HERE.propipelines.com/api/v2/leads"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SLUG_HERE.propipelines.com/api/v2/leads", header
leads = JSON.parse(response)
With the USER token
curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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,
"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",
"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,
"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",
"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 change this limit. To navigate in the large amount of data, use the parameter offset to shift the data.
Http request
GET https://YOUR_SLUG_HERE.propipelines.com/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. |
|
| 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. |
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"]}' "https://YOUR_SLUG_HERE.propipelines.com/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"]
}
response = RestClient.post "https://YOUR_SLUG_HERE.propipelines.com/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"]}' "https://YOUR_SLUG_HERE.propipelines.com/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"]
}
response = RestClient.post "https://YOUR_SLUG_HERE.propipelines.com/api/v2/leads", parameters, header
lead = JSON.parse(response)
The above commands return JSON structure like this:
{
"id": 8114,
"title": "Awesome Company",
"pipeline": null,
"step": "Incoming",
"step_id": 45,
"status": "Todo",
"amount": null,
"probability": null,
"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_SLUG_HERE.propipelines.com/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": []
}
}
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:
- nobody using the
APIkey and will be unassigned. You will find it in theUnassigned leadstab. - the logged user using the
USERtoken.
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_SLUG_HERE.propipelines.com/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. |
Retrieve a lead
With the API key
curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/api/v2/leads/8113", header
lead = JSON.parse(response)
With the USER token
curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/api/v2/leads/8113", header
lead = JSON.parse(response)
The above commands return JSON structured 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,
"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",
"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_SLUG_HERE.propipelines.com/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@propipelines.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": []
}
}
Retrieve a lead previously created from its id.
Http request
GET https://YOUR_SLUG_HERE.propipelines.com/api/v2/leads/{id}
Parameters
| Parameter | Description | |
|---|---|---|
| id | required | Lead's id. The identifier of the lead. |
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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/api/v2/leads/8113", parameters, header
updated_lead = JSON.parse(response)
The above commands return JSON structured like this:
{
"id": 8113,
"title": "Loretta Inc.",
"pipeline": null,
"step": "In-touch",
"step_id": 45,
"status": "Standby",
"amount": 1562.89,
"probability": 85,
"currency": "USD",
"starred": true,
"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",
"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",
"extended_info":
{
"first_contact_email": "natalia.bawer@loretta-inc.com",
"all_contact_emails": ["natalia.bawer@loretta-inc.com"],
"permalink": "https://YOUR_SLUG_HERE.propipelines.com/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@propipelines.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": []
}
}
Update a lead previously created.
Http request
PUT https://YOUR_SLUG_HERE.propipelines.com/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. | |
| 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. The probability cannot be set if there is no amount. | |
| 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. |
Assign a lead
With the API key
curl -XPOST -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" -H "Content-Type: application/json" -d '{"user_id":436}' "https://YOUR_SLUG_HERE.propipelines.com/api/v2/leads/8113/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_SLUG_HERE.propipelines.com/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":436}' "https://YOUR_SLUG_HERE.propipelines.com/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: 436 }
response = RestClient.post "https://YOUR_SLUG_HERE.propipelines.com/api/v2/leads/8113/assign", parameters, header
lead = JSON.parse(response)
The above commands return JSON structured like this:
{
"id": 8113,
"title": "Loretta Inc.",
"pipeline": null,
"step": "In-touch",
"step_id": 45,
"status": "Standby",
"amount": 1562.89,
"probability": 85,
"currency": "USD",
"starred": true,
"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",
"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": 436,
"team_id": 5,
"client_folder_id": 1,
"client_folder_name": "Acme",
"extended_info":
{
"first_contact_email": "natalia.bawer@loretta-inc.com",
"all_contact_emails": ["natalia.bawer@loretta-inc.com"],
"permalink": "https://YOUR_SLUG_HERE.propipelines.com/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@propipelines.com",
"is_manager": false
}
],
"updated_at": "2014-02-19T16:58:43.000Z",
"created_at": "2014-02-11T22:41:26.000Z"
},
"user":
{
"id": 436,
"lastname": "Rose",
"firstname": "Juliette",
"email": "juliette@example.com",
"phone": "",
"mobile_phone": "3334445555"
},
"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": 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_SLUG_HERE.propipelines.com/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. |
List the unassigned leads
With the API key
curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/api/v2/leads/unassigned", header
unassigned_leads = JSON.parse(response)
With the USER token
curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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,
"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",
"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,
"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",
"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 change this limit.
Http request
GET https://YOUR_SLUG_HERE.propipelines.com/api/v2/leads/unassigned
Parameters
| Parameter | Default | Description | |
|---|---|---|---|
| limit | optional | 100 | Maximum count of data returned by the request. |
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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/api/v2/leads/8113/add_to_client", parameters, header
lead = JSON.parse(response)
The above commands return JSON structured like this:
{
"id": 8113,
"title": "Loretta Inc.",
"pipeline": null,
"step": "In-touch",
"step_id": 45,
"status": "Standby",
"amount": 1562.89,
"probability": 85,
"currency": "USD",
"starred": true,
"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",
"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": 436,
"team_id": 5,
"client_folder_id": 12,
"client_folder_name": "Blue Corp",
"extended_info":
{
"first_contact_email": "natalia.bawer@loretta-inc.com",
"all_contact_emails": ["natalia.bawer@loretta-inc.com"],
"permalink": "https://YOUR_SLUG_HERE.propipelines.com/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": 436,
"lastname": "Rose",
"firstname": "Juliette",
"email": "juliette@example.com",
"phone": "2223334444",
"mobile_phone": ""
},
"client_folder":
{
"id": 12,
"name": "Blue Corp",
"description": "",
"is_active": true,
"created_at": "2015-01-30T22:03:14.000Z"
},
"business_card_id": null,
"visible_by_count": 1,
"follow_ups": []
}
}
Add a lead to an existing client folder.
Http request
POST https://YOUR_SLUG_HERE.propipelines.com/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 |
Retrieve the business card of a lead
With the API key
curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/api/v2/leads/{id}/business_card
Parameters
| Parameter | Description | |
|---|---|---|
| id | required | Lead's id. The identifier of the lead. |
Delete a lead
With the API key
curl -XDELETE -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/api/v2/leads/8113", header
lead = JSON.parse(response)
With the USER token
curl -XDELETE -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/api/v2/leads/{id}
Parameters
| Parameter | Description | |
|---|---|---|
| id | required | Lead's id. The identifier of the lead. |
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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/api/v2/leads/delete_multiple
Parameters
| Parameter | Description | |
|---|---|---|
| ids | required | Comma separated lead's ids. |
Retrieve all comments from a lead
With the API key
curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/api/v2/leads/9402/comments", header
comments = JSON.parse(response)
With the USER token
curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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"
}
],
"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": [],
"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_SLUG_HERE.propipelines.com/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. |
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 wonderful","user_id":514}' "https://YOUR_SLUG_HERE.propipelines.com/api/v2/leads/9402/comments"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
parameters = {
content: "This is wonderful",
user_id: 514
}
response = RestClient.post "https://YOUR_SLUG_HERE.propipelines.com/api/v2/leads/9402/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 wonderful","user_id":514}' "https://YOUR_SLUG_HERE.propipelines.com/api/v2/leads/9402/comments"
require 'rest-client'
token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
parameters = {
content: "This is wonderful"
}
response = RestClient.post "https://YOUR_SLUG_HERE.propipelines.com/api/v2/leads/9402/comments", parameters, header
comments = JSON.parse(response)
The above commands return JSON structured like this:
{
"id": 13834,
"content": "This is a wonderful",
"commented_item":
{
"item": "Lead",
"id": 9402
},
"created_at": "2015-08-20T21:57:40.000Z",
"attachments": [],
"activity_id": null,
"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_SLUG_HERE.propipelines.com/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 |
Delete a comment on a lead
With the API key
curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" -XDELETE "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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. |
Retrieves all duplicates of a lead
With the API key
curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/api/v2/leads/9402/duplicates", header
attachments = JSON.parse(response)
With the USER token
curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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,
"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",
"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_SLUG_HERE.propipelines.com/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@propipelines.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,
"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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/api/v2/leads/{lead_id}/duplicates
Parameters
| Parameter | Description | |
|---|---|---|
| lead_id | required | Lead's id. The identifier of the lead. |
Retrieve all attachments
With the API key
curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/api/v2/leads/9402/attachments", header
attachments = JSON.parse(response)
With the USER token
curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/api/v2/leads/{lead_id}/attachments
Parameters
| Parameter | Description | |
|---|---|---|
| lead_id | required | Lead's id. The identifier of the lead. |
Retrieve one attachment
With the API key
curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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. |
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_SLUG_HERE.propipelines.com/api/v2/leads/9402/attachments"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
request = RestClient::Request.new(
method: :post,
url: 'https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/api/v2/leads/9402/attachments"
require 'rest-client'
token = "ITd-Jb3EC_nCXI2fez4hhg"
request = RestClient::Request.new(
method: :post,
url: 'https://YOUR_SLUG_HERE.propipelines.com/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\u0026X-Amz-Date=20160630T224423Z\u0026X-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_SLUG_HERE.propipelines.com/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 |
Delete an attachment on a lead
With the API key
curl -XDELETE -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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. |
List the action histories on a lead
With the API key
curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" -XGET "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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. |
Send an email from a template
With the API key
curl -XPOST -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" -H "Content-Type: application/json" "https://YOUR_SLUG_HERE.propipelines.com/api/v2/leads/9402/emails/send_email_from_template"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
request = RestClient::Request.new(
method: :post,
url: 'https://YOUR_SLUG_HERE.propipelines.com/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
})
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" "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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
})
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:
- If the user doing the request cannot access to the email template
- If some variables are not found in the lead, and still present in the email
- If we cannot find an email address to send the email in the lead
Http request
POST https://YOUR_SLUG_HERE.propipelines.com/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. |
Prospecting lists
List the prospecting lists
With the API key
curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SLUG_HERE.propipelines.com/api/v2/spreadsheets"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SLUG_HERE.propipelines.com/api/v2/spreadsheets", header
spreadsheets = JSON.parse(response)
With the USER token
curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/spreadsheets/17198",
"is_archived": true,
"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_SLUG_HERE.propipelines.com/spreadsheets/17197",
"is_archived": false,
"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_SLUG_HERE.propipelines.com/api/v2/spreadsheets
Parameters
| Parameter | Default | Description | |
|---|---|---|---|
| title | optional | Filter the prospecting list by title (exact match) | |
| 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 |
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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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:
- the user of the
user_idattribute when you are using theAPIkey authentication. - the user logged when you are using the
USERtoken authentication.
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_SLUG_HERE.propipelines.com/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. |
Retrieve a prospecting list
With the API key
curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/api/v2/spreadsheets/112", header
spreadsheet = JSON.parse(response)
With the USER token
curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/api/v2/spreadsheets/{id}
Parameters
| Parameter | Description | |
|---|---|---|
| id | required | Prospecting list's identifier. |
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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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. |
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 wonderful","user_id":514}' "https://YOUR_SLUG_HERE.propipelines.com/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 wonderful",
user_id: 514
}
response = RestClient.post "https://YOUR_SLUG_HERE.propipelines.com/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 wonderful","user_id":514}' "https://YOUR_SLUG_HERE.propipelines.com/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 wonderful",
user_id: 514
}
response = RestClient.post "https://YOUR_SLUG_HERE.propipelines.com/api/v2/spreadsheets/112/comments", parameters, header
comments = JSON.parse(response)
The above commands return JSON structured like this:
{
"id": 13834,
"content": "This is a wonderful",
"commented_item":
{
"item": "Spreadsheet",
"id": 112
},
"created_at": "2015-08-20T21:57:40.000Z",
"attachments": [],
"activity_id": null,
"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_SLUG_HERE.propipelines.com/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 |
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 wonderful","user_id":514}' "https://YOUR_SLUG_HERE.propipelines.com/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 wonderful",
user_id: 514
}
response = RestClient.post "https://YOUR_SLUG_HERE.propipelines.com/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 wonderful","user_id":514}' "https://YOUR_SLUG_HERE.propipelines.com/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 wonderful",
user_id: 514
}
response = RestClient.post "https://YOUR_SLUG_HERE.propipelines.com/api/v2/spreadsheets/112/rows/4/comments", parameters, header
comments = JSON.parse(response)
The above commands return JSON structured like this:
{
"id": 13834,
"content": "This is a wonderful",
"commented_item":
{
"item": "SpreadsheetRow",
"id": 4
},
"created_at": "2015-08-20T21:57:40.000Z",
"attachments": [],
"activity_id": null,
"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_SLUG_HERE.propipelines.com/api/v2/spreadsheets/{spreadsheet_id}/rows/{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 |
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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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. |
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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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. |
Create a lead from a prospect
With the API key
curl -XPOST -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/api/v2/spreadsheets/112/rows/115/create_lead", header
lead = JSON.parse(response)
The above commands return JSON structured like this:
{
"id": 871369,
"title": "Green Corp",
"pipeline": null,
"step": "Incoming",
"step_id": 45,
"status": "Todo",
"amount": null,
"probability": null,
"currency": "USD",
"starred": null,
"remind_date": null,
"remind_time": null,
"reminder_at": null,
"reminder_duration": null,
"created_at": "2019-10-28T20:57:29.000Z",
"estimated_closing_date": null,
"updated_at": "2019-10-28T20:57:29.000Z",
"closed_at": null,
"description": "Firstname: Julia\nLastname: Green\nEmail: julia.green@example.com\nPhone: 345 234 7777",
"html_description": "Firstname: Julia<br>Lastname: Green<br>Email: julia.green@example.com<br>Phone: 345 234 7777",
"tags": [],
"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": ["julia.green@example.com"],
"first_contact_email": "julia.green@example.com",
"permalink": "https://YOUR_SLUG_HERE.propipelines.com/leads/871369",
"fields":
{
"email": "julia.green@example.com",
"phone": "345 234 7777",
"mobile": null,
"address": null,
"web": null,
"first_name": "Julia",
"last_name": "Green",
"full_name": null,
"job": null,
"fax": null,
"vat": null
},
"fields_by_name":
{
"Email": "julia.green@example.com",
"Firstname": "Julia",
"Lastname": "Green",
"Phone": "345 234 7777"
},
"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": []
}
}
Create a lead from a prospect and associate the new lead created to the prospect in the prospecting list
Http request
POST https://YOUR_SLUG_HERE.propipelines.com/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. |
Delete a prospect in a prospecting list
With the API key
curl -XDELETE -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/api/v2/spreadsheets/{spreadsheet_id}/rows/{id}
Parameters
| Parameter | Default | Description | |
|---|---|---|---|
| spreadsheet_id | required | Prospecting list's identifier. | |
| id | required | Prospect's identifier. |
List all prospects called
With the API key
curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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 Pro Pipe Lines application. All prospects called outside of Pro Pipe Lines are not retrieved.
Http request
GET https://YOUR_SLUG_HERE.propipelines.com/api/v2/rows/called_from
Parameters
| Parameter | Description | |
|---|---|---|
| phone_number | required | The phone number which has been called from a prospect. |
Users
List all the users
With the API key
curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SLUG_HERE.propipelines.com/api/v2/users"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SLUG_HERE.propipelines.com/api/v2/users", header
users = JSON.parse(response)
With the USER token
curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/users/514"
},
{
"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_SLUG_HERE.propipelines.com/users/515"
}
]
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.
- has_activated: true if the user has activated its account
- is_disabled: true if the administrator of the account has deleted the user. The user cannot access to the account anymore.
Http request
GET https://YOUR_SLUG_HERE.propipelines.com/api/v2/users
Parameters
| Parameter | Default | Description | |
|---|---|---|---|
| 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 |
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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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": "",
"im": "",
"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_SLUG_HERE.propipelines.com/users/639"
}
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_SLUG_HERE.propipelines.com/api/v2/users
Parameters
| Parameter | Default | Description | |
|---|---|---|---|
| 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. |
Retrieve a user
With the API key
curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SLUG_HERE.propipelines.com/api/v2/users/514"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SLUG_HERE.propipelines.com/api/v2/users/514", header
user = JSON.parse(response)
With the USER token
curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SLUG_HERE.propipelines.com/api/v2/users/514"
require 'rest-client'
token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SLUG_HERE.propipelines.com/api/v2/users/514", header
user = JSON.parse(response)
The above commands return JSON structure like this:
{
"id": 514,
"lastname": "Doe",
"firstname": "John",
"email": "john.doe@mycompany.com",
"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_SLUG_HERE.propipelines.com/users/514"
}
Retrieve a specific user from its id.
Http request
GET https://YOUR_SLUG_HERE.propipelines.com/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. |
Send the activation email
With the API key
curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/api/v2/users/1234/send_activation_email", header
With the USER token
curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/api/v2/users/{id}/send_activation_email
Parameters
| Parameter | Description | |
|---|---|---|
| id | required | The id of the user |
Disable a user
With the API key
curl -XPUT -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/api/v2/users/639/disable", header
With the USER token
curl -XPUT -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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",
"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": "2015-07-22T16:58:43.000Z",
"created_at": "2015-07-22T16:58:43.000Z",
"is_admin": true,
"has_activated": true,
"is_disabled": true,
"locale": "en",
"permalink": "https://YOUR_SLUG_HERE.propipelines.com/users/1234"
}
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_SLUG_HERE.propipelines.com/api/v2/users/{id}/disable
Parameters
| Parameter | Description | |
|---|---|---|
| id | required | The id of the user |
Teams
List all the teams
With the API key
curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SLUG_HERE.propipelines.com/api/v2/teams"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SLUG_HERE.propipelines.com/api/v2/teams", header
teams = JSON.parse(response)
With the USER token
curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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@propipelines.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_SLUG_HERE.propipelines.com/api/v2/teams
Create a team
With the API key
curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" -H "Content-Type: application/json" -d '{"name":"Web Sales"}' "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/api/v2/teams", parameters, header
team = JSON.parse(response)
The above commands return JSON structure like this:
{
"id": 15,
"name": "Web Sales",
"users": [],
"updated_at": "2015-07-22T16:58:43.000Z",
"created_at": "2015-07-22T16:58:43.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_SLUG_HERE.propipelines.com/api/v2/teams
Parameters
| Parameter | Description | |
|---|---|---|
| name | required | The name of the team |
Retrieve a team
With the API key
curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SLUG_HERE.propipelines.com/api/v2/teams/15"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SLUG_HERE.propipelines.com/api/v2/teams/15", header
team = JSON.parse(response)
With the USER token
curl -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SLUG_HERE.propipelines.com/api/v2/teams/15"
require 'rest-client'
token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SLUG_HERE.propipelines.com/api/v2/teams/15", header
team = JSON.parse(response)
The above commands return JSON structure like this:
{
"id": 15,
"name": "Web Sales",
"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": "2015-07-22T16:58:43.000Z",
"created_at": "2015-07-22T16:58:43.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_SLUG_HERE.propipelines.com/api/v2/teams/{id}
Parameters
| Parameter | Description | |
|---|---|---|
| id | required | The id or name of the team to retrieve. |
Update a team
With the API key
curl -XPUT -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" -H "Content-Type: application/json" -d '{"name":"My new team name"}' "https://YOUR_SLUG_HERE.propipelines.com/api/v2/teams/15"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
parameters = {
name: "My new team name"
}
response = RestClient.put "https://YOUR_SLUG_HERE.propipelines.com/api/v2/teams/15", 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":"My new team name"}' "https://YOUR_SLUG_HERE.propipelines.com/api/v2/teams/15"
require 'rest-client'
token = "ITd-Jb3EC_nCXI2fez4hhg"
header = { 'X-USER-TOKEN' => token, content_type: :json, accept: "application/json" }
parameters = {
name: "my new team name"
}
response = RestClient.put "https://YOUR_SLUG_HERE.propipelines.com/api/v2/teams/15", parameters, header
The above commands return JSON structure like this:
{
"id": 15,
"name": "My new team name",
"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": "2015-07-22T16:58:43.000Z",
"created_at": "2015-07-22T16:58:43.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_SLUG_HERE.propipelines.com/api/v2/teams/{id}
Parameters
| Parameter | Description | |
|---|---|---|
| id | required | The id of the team |
| name | required | The new team's name |
Delete a team
With the API key
curl -XDELETE -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/api/v2/teams/15", header
With the USER token
curl -XDELETE -H "X-USER-TOKEN: ITd-Jb3EC_nCXI2fez4hhg" "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/api/v2/teams/{id}
Parameters
| Parameter | Description | |
|---|---|---|
| id | required | The id of the team |
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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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. |
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_SLUG_HERE.propipelines.com/api/v2/teams/15/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_SLUG_HERE.propipelines.com/api/v2/teams/15/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_SLUG_HERE.propipelines.com/api/v2/teams/15/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_SLUG_HERE.propipelines.com/api/v2/teams/15/remove_member", parameters, header
team = JSON.parse(response)
The above commands return JSON structure like this:
{
"id": 15,
"users": [],
"updated_at": "2016-04-07T16:58:43.000Z",
"created_at": "2015-07-22T16:58:43.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_SLUG_HERE.propipelines.com/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. |
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 |
|---|---|
| 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 modified 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. |
| 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. |
List the webhooks
With the API key
curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SLUG_HERE.propipelines.com/api/v2/webhooks"
require 'rest-client'
key = "91Jy7XxreymBRMASfTF8"
header = { 'X-API-KEY' => key, content_type: :json, accept: "application/json" }
response = RestClient.get "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/api/v2/webhooks
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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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 |
Delete a webhook
With the API key
curl -XDELETE -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/api/v2/webhooks/{id}
Parameters
| Parameter | Description | |
|---|---|---|
| id | required | The id of the webhook |
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:
- a unique id
- the event name which triggered the notification
- a signature. This signature is a SHA1 encryption of the id of the object and the private api key you specified in the webhook
- a data object containing the data on which the trigger occured. For example a lead object.
- the comments associated to the data. The comments are only send when the way to send the notification is by email in order to process the data with all the context
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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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@propipelines.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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/api/v2/webhook_events
Retrieve a webhook event
curl -H "X-API-KEY: 91Jy7XxreymBRMASfTF8" "https://YOUR_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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_SLUG_HERE.propipelines.com/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@propipelines.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_SLUG_HERE.propipelines.com/api/v2/webhook_events/{id}
Parameters
| Parameter | Description | |
|---|---|---|
| id | required | The id of the webhook event |
Errors
The API uses the following error codes:
| Error Code | Message |
|---|---|
| 400 | Parameter [status | step | user_id] not recognized. |
| 400 | The date [updated_after | start_date | end_date] is not formatted properly |
| 400 | The date updated_after is not formatted properly |
| 400 | Parameter user_id [not recognized | should not be used with USER token]. |
| 400 | You cannot update the parameters status, step, starred, amount or probability without assigning the lead first. |
| 400 | Missing parameter: remind_at is required when status is changed to standby |
| 400 | Date format invalid for remind_date (YYYY-MM-DD) or remind_time (HH:MM) |
| 400 | A probability cannot be set without an amount |
| 401 | Unauthorized: api key [missing | invalid] |
| 401 | Unauthorized: you cannot use this action with a USER token. You have to use the API key method to authenticate. |
| 401 | Unauthorized: the user has not the privileges to do this action. |
| 401 | Invalid login or password |
| 402 | Suspended account: pay your subscription to use the API. |
| 403 | Cannot access this feature. |
| 404 | Entry not found -- The specified object could not be found |
| 405 | |
| 422 | Unprocessable -- Unable to perform your request |
| 422 | Missing required parameter |