Back to top

Introduction to the CRM API 

Start with our Core API docs for an introduction to the Kloudless API and more information on connecting user accounts and performing API requests.

Once an account is connected to your application, your application can perform API requests to the CRM API endpoints listed below.

Here are the supported services, listed with service identifiers:

  • CRM Services
    • Salesforce CRM: salesforce
    • Microsoft Dynamics: dynamics
    • Oracle Sales Cloud: oracle
    • Pipeliner CRM: pipeliner

The CRM API has the following available object types:

  • account

  • contact

  • campaign

  • lead

  • opportunity

  • task

Each of these objects types is documented below, with their standard Kloudless attributes listed.

In addition, the original CRM object can be obtained by requesting raw data when performing the API request.


CRM Accounts 

An account represents a Company, Department, or Person within the company, with which your organization is currently involved with. You can associate an account with Contacts and Opportunities.

*Note: This is not to be confused with the Accounts resource, which represents a software service account connected to your Kloudless application.

  • id Unique identifier for this account

  • name Account name

  • owner Identifier of the user that owns this account

  • industry_code Six-digit North American Industry Classification System (NAICS) code

  • industry Industry of account

  • employees Number of employees

  • rating Rating of the account

  • fax Fax number of the account

  • phone Phone number of the account

  • website URL of the company’s Web site

  • annual_revenue Annual revenue of the account

  • billing_address Billing address of the account to deliver the shipment

  • shipping_address Shipping address of the account to deliver the shipment

  • created ISO 8601 timestamp indicating when the account object was created.

  • modified ISO 8601 timestamp indicating when the account object was modified.

  • description Additional details about the Account

  • type Type of object. Always account.

  • raw Underlying object retrieved from the service.

  • api Always crm.

List Accounts 

list accountsGET /accounts/{account_id}/crm/accounts{?page_size,page}

The response contains the following information:

  • count Number of objects on this page

  • page Page identifier

  • next_page The value to provide in the request’s page query parameter for the next page. This will be null if there are no more pages.

  • objects List of account objects

  • type Always object_list

  • api Always crm

  • Parameters
  • page_size
    number (optional) Default: 10 

    Number of objects in each page. For some services, the page_size isn’t respected. The page_size must be between 1 and 1000.

    page
    string (optional) 

    Page to return. Do not provide a page parameter when retrieving the first page. To retrieve pages after the first page, set page to the value of next_page found in the previous page of data retrieved.

  • Response  200Toggle
  • Headers
    Content-Type: application/json
    Body
    {
        "total": 1,
        "count": 1,
        "page": 1,
        "next_page": null,
        "objects": [
            {
                "id": 482938193,
                "name": "Kloudless, Inc.",
                "owner": "owner@company.com",
                "industry_code": 541519,
                "industry": Information Technology,
                "employees": 20,
                "rating": Hot,
                "website": "kloudless.com",
                "created": "2015-09-02T10:11:33.948274Z",
                "modified": "2015-09-02T10:11:33.948274Z",
                "description": Cloud API Services,
                "type": "account",
                "raw": {
                  ...
                },
                "api": "crm"
            },
        ],
        "type": "object_list",
        "api": "crm
    }
    

Create an Account 

create an accountPOST /accounts/{account_id}/crm/accounts

To create an account, perform a POST request with a JSON object of the following parameters:

  • name: Name of the account (required)

  • owner: Identifier of the user that owns this account

  • industry_code: Six-digit North American Industry Classification System (NAICS) code

  • industry: Industry of the account

  • employees: Number of employees

  • rating: Rating of the account

  • fax: Fax number of the account

  • phone: Phone number of the account

  • website: URL of the company’s Web site

  • annual_revenue: Annual revenue of the account

  • billing_address: Billing address of the account to deliver the shipment

  • shipping_address: Shipping address of the account to deliver the shipment

  • description: Details about the account

Here is an example request:

curl -XPOST -H 'Authorization: Bearer [TOKEN]' \
    -H 'Content-Type: application/json' \
    'https://api.kloudless.com/v1/accounts/123/crm/accounts' \
    -XPOST -d '{
        "name":"Simplynk, Inc.",
        "owner": "owner@company.com",
        "industry_code": 541519,
        "industry": Information Technology,
        "employees": 4,
        "rating": Hot,
        "website": "https://angel.co/simplynk",
        "description": "Location-based professional networking"
    }'
  • RequestToggle
  • Headers
    Authorization: Bearer [TOKEN]
    Content-Type: application/json
    Body
    {
        "name":"Simplynk, Inc.",
        "owner": "owner@company.com",
        "industry_code": 541519,
        "industry": Information Technology,
        "employees": 4,
        "rating": Hot,
        "website": "https://angel.co/simplynk",
        "description": "Location-based professional networking"
    }
  • Response  201Toggle
  • Headers
    Content-Type: application/json
    Body
    {
        "id": 53759384745,
        "name":"Simplynk, Inc.",
        "owner": "owner@company.com",
        "industry_code": 541519,
        "industry": Information Technology,
        "employees": 4,
        "rating": Hot,
        "website": "https://angel.co/simplynk",
        "created": "2015-09-30T18:40:11.138633Z",
        "modified": "2015-09-30T18:40:11.138633Z",
        "description": "Location-based professional networking",
        "type": "account",
        "raw": {
          ...
        },
        "api": "crm"
    }

Retrieve an Account 

retrieve an accountGET /accounts/{account_id}/crm/accounts/{account_id}
  • Response  200Toggle
  • Headers
    Content-Type: application/json
    Body
    {
        "id": 482938193,
        "name": "Kloudless, Inc.",
        "owner": "owner@company.com",
        "industry_code": 541519,
        "industry": Information Technology,
        "employees": 20,
        "rating": Hot,
        "website": "kloudless.com",
        "created": "2015-09-02T10:11:33.948274Z",
        "modified": "2015-09-02T10:11:33.948274Z",
        "description": Cloud API Services,
        "type": "account",
        "raw": {
          ...
        },
        "api": "crm"
    }

Update an Account 

update an accountPATCH /accounts/{account_id}/crm/accounts/{account_id}

To update an account, create a JSON object with any of the following properties:

  • name

  • industry_code

  • industry

  • employees

  • rating

  • fax

  • phone

  • website

  • annual_revenue

  • billing_address

  • shipping_address

  • description

The new object will be returned on success.

Example request:

curl -H 'Authorization: Bearer [TOKEN]' \
    -H 'Content-Type: application/json' \
    -XPATCH -d '{
        "employees": 25,
        "description": "Cloud API Services. Storage, CRM, and more"
    }' \
    'https://api.kloudless.com/v1/accounts/15/crm/accounts/482938193'
  • RequestToggle
  • Headers
    Authorization: Bearer [TOKEN]
    Content-Type: application/json
    Body
    {
      "employees": 25,
      "description": "Cloud API Services. Storage, CRM, and more"
    }
  • Response  200Toggle
  • Headers
    Content-Type: application/json
    Body
    {
        "id": 482938193,
        "name": "Kloudless, Inc.",
        "owner": "owner@company.com",
        "industry_code": 541519,
        "industry": Information Technology,
        "employees": 25,
        "rating": Hot,
        "website": "kloudless.com",
        "created": "2015-09-02T10:11:33.948274Z",
        "modified": "2015-09-03T15:43:12.847532Z",
        "description": "Cloud API Services. Storage, CRM, and more",
        "type": "account",
        "raw": {
          ...
        },
        "api": "crm"
    }

Delete an Account 

delete an accountDELETE /accounts/{account_id}/crm/accounts/{account_id}

Example request:

curl -L -H 'Authorization: Bearer [TOKEN]' \
    -XDELETE https://api.kloudless.com/accounts/34/crm/accounts/1595832939
  • Response  204

CRM Contacts 

A contact represents a person with whom you communicate in an organization, either in pursuit of a business opportunity or for personal reasons.

  • id Unique identifier for this contact

  • account Indentifier of the associated account

  • owner Identifier of the user that owns this contact

  • lead Identifier of the lead associated with this contact

  • first_name First name of the contact

  • middle_name Middle name of the contact

  • last_name Last name of the contact (required)

  • name Name of the contact

  • title Title of the contact

  • department Department of the contact

  • email Email of the contact

  • fax Fax of the contact

  • phone Phone of the contact

  • mailing_address Mailing address of the contact

  • created ISO 8601 timestamp indicating when the contact object was created.

  • modified ISO 8601 timestamp indicating when the contact object was modified.

  • description Additional details about the Contact

  • type Type of object. Always contact

  • raw Underlying object retrieved from the service

  • api Always crm.

List Contacts 

list contactsGET /accounts/{account_id}/crm/contacts{?page_size,page}

The response contains the following information:

  • count Number of objects on this page

  • page Page identifier

  • next_page The value to provide in the request’s page query parameter for the next page. This will be null if there are no more pages.

  • objects List of contact objects

  • type Always object_list

  • api Always crm

  • Parameters
  • page_size
    number (optional) Default: 10 

    Number of objects in each page. For some services, the page_size isn’t respected. The page_size must be between 1 and 1000.

    page
    string (optional) 

    Page to return. Do not provide a page parameter when retrieving the first page. To retrieve pages after the first page, set page to the value of next_page found in the previous page of data retrieved.

  • Response  200Toggle
  • Headers
    Content-Type: application/json
    Body
    {
        "total": 1,
        "count": 1,
        "page": 1,
        "next_page": null,
        "objects": [
            {
                "id": 1928381283,
                "account": 482938193,
                "owner": "owner@company.com",
                "lead": "3586",
                "name": "Eliot Sun",
                "title": "CEO",
                "department": "Execs",
                "email": "hello@kloudless.com",
                "created": "2015-10-01T02:34:57.123832Z",
                "modified": "2015-10-01T02:34:57.123832Z",
                "description": "CEO",
                "type": "contact",
                "raw": {
                  ...
                },
                "api": "crm"
            },
        ],
        "type": "object_list",
        "api": "crm
    }
    

Create a Contact 

create a contactPOST /accounts/{account_id}/crm/contacts

To create a contact, perform a POST request with a JSON object of the following parameters:

  • first_name: First name of the contact

  • middle_name: Middle name of the contact

  • last_name: Last Name of the contact (required)

  • name: Name of the contact

  • account: Indentifier of the associated account

  • owner: Identifier of the user that owns this contact

  • lead: Identifier of the lead associated with this contact

  • title: Title of the contact

  • department: Department of the contact

  • email: Email of the contact

  • fax: Fax of the contact

  • phone: Phone of the contact

  • mailing_address: Mailing address of the account to deliver the shipment

  • description: Additional details about the Contact

Here is an example request:

curl -XPOST -H 'Authorization: Bearer [TOKEN]' \
    -H 'Content-Type: application/json' \
    'https://api.kloudless.com/v1/accounts/123/crm/contacts' \
    -XPOST -d '{
        "account": 482938193,
        "owner": "owner@company.com",
        "lead": "3586",
        "name": "Vinod Chandru",
        "title": "Customer Service Advisor",
        "department": "Support",
        "email": "hello@kloudless.com",
        "description": "Co-founder of Kloudless, Inc."
    }'
  • RequestToggle
  • Headers
    Authorization: Bearer [TOKEN]
    Content-Type: application/json
    Body
    {
      "account": 482938193,
      "owner": "owner@company.com",
      "lead": "3586",
      "name": "Vinod Chandru",
      "title": "Customer Service Advisor",
      "department": "Support",
      "email": "hello@kloudless.com",
      "description": "Co-founder of Kloudless, Inc."
    }
  • Response  201Toggle
  • Headers
    Content-Type: application/json
    Body
    {
        "id": 3873618434,
        "account": 482938193,
        "owner": "owner@company.com",
        "lead": "3586",
        "name": "Vinod Chandru",
        "title": "Customer Service Advisor",
        "department": "Support",
        "email": "hello@kloudless.com",
        "created": "2015-10-07T20:42:17.954885Z",
        "modified": "2015-10-07T20:42:17.954885Z",
        "description": "Co-founder of Kloudless, Inc.",
        "type": "contact",
        "raw": {
          ...
        },
        "api": "crm"
    }

Retrieve a Contact 

retrieve a contactGET /accounts/{account_id}/crm/contacts/{contact_id}
  • Response  200Toggle
  • Headers
    Content-Type: application/json
    Body
    {
        "id": 1928381283,
        "account": 482938193,
        "owner": "owner@company.com",
        "lead": "3586",
        "name": "Eliot Sun",
        "title": "CEO",
        "department": "Execs",
        "email": "hello@kloudless.com",
        "created": "2015-10-01T02:34:57.123832Z",
        "modified": "2015-10-01T02:34:57.123832Z",
        "description": "CEO",
        "type": "contact",
        "raw": {
          ...
        },
        "api": "crm"
    }

Update a Contact 

update a contactPATCH /accounts/{account_id}/crm/contacts/{contact_id}

To update a contact, create a JSON object with any of the following properties:

  • account

  • owner

  • lead

  • name

  • title

  • department

  • email

  • fax

  • phone

  • mailing_address

  • description

The new object will be returned on success.

Example request:

curl -H 'Authorization: Bearer [TOKEN]' \
    -H 'Content-Type: application/json' \
    -XPATCH -d '{
        "description": "CEO and Co-founder of Kloudless, Inc."
    }' \
    'https://api.kloudless.com/v1/accounts/15/crm/contacts/1928381283'
  • RequestToggle
  • Headers
    Authorization: Bearer [TOKEN]
    Content-Type: application/json
    Body
    {
      "description": "CEO and Co-founder of Kloudless, Inc."
    }
  • Response  200Toggle
  • Headers
    Content-Type: application/json
    Body
    {
        "id": 1928381283,
        "account": 482938193,
        "owner": "owner@company.com",
        "lead": "3586",
        "name": "Eliot Sun",
        "title": "CEO",
        "department": "Execs",
        "email": "hello@kloudless.com",
        "created": "2015-10-01T02:34:57.123832Z",
        "modified": "2015-10-05T03:13:87.857364Z",
        "description": "CEO and Co-founder of Kloudless, Inc.",
        "type": "contact",
        "raw": {
          ...
        },
        "api": "crm"
    }

Delete a Contact 

delete a contactDELETE /accounts/{account_id}/crm/contacts/{contact_id}

Example request:

curl -L -H 'Authorization: Bearer [TOKEN]' \
    -XDELETE https://api.kloudless.com/v1/accounts/34/crm/contacts/99843772
  • Response  204

CRM Leads 

A lead represents details about individuals or representatives of organizations who might be potential opportunities.

  • id Unique identifier for this lead

  • owner Identifier of the user that owns this contact

  • name Name of the lead

  • first_name First name of the lead

  • middle_name Middle name of the lead

  • last_name Last name of the lead

  • title Title of the lead

  • status Status of the lead

  • address Address of the lead

  • company Company of the lead

  • industry Industry of the company of the lead

  • annual_revenue Annual revenue of the company

  • rating Rating of the lead

  • email Email of the lead

  • fax Fax of the lead

  • phone Phone of the lead

  • created ISO 8601 timestamp indicating when the lead object was created.

  • modified ISO 8601 timestamp indicating when the lead object was modified.

  • description Additional details about the Lead

  • type Type of object. Always lead

  • raw Underlying object retrieved from the service

  • api Always crm.

List Leads 

list leadsGET /accounts/{account_id}/crm/leads{?page_size,page}

The response contains the following information:

  • count Number of objects on this page

  • page Page identifier

  • next_page The value to provide in the request’s page query parameter for the next page. This will be null if there are no more pages.

  • objects List of lead objects

  • type Always object_list

  • api Always crm

  • Parameters
  • page_size
    number (optional) Default: 10 

    Number of objects in each page. For some services, the page_size isn’t respected. The page_size must be between 1 and 1000.

    page
    string (optional) 

    Page to return. Do not provide a page parameter when retrieving the first page. To retrieve pages after the first page, set page to the value of next_page found in the previous page of data retrieved.

  • Response  200Toggle
  • Headers
    Content-Type: application/json
    Body
    {
        "total": 1,
        "count": 1,
        "page": 1,
        "next_page": null,
        "objects": [
            {
                "id": 7563839,
                "owner": owner@company.com,
                "name": "Eliot Sun",
                "title": "CEO",
                "status": "Contacted",
                "company": "Kloudless, Inc.",
                "industry": "Information Technology",
                "rating": "Hot",
                "email": "hello@kloudless.com",
                "created": "2015-02-19T09:52:01.248537Z",
                "modified": "2015-02-19T09:52:01.248537Z",
                "description": "Knowledgeable about cloud integration",
                "type": "lead",
                "raw": {
                  ...
                },
                "api": "crm"
            },
        ],
        "type": "object_list",
        "api": "crm
    }
    

Create a Lead 

create a leadPOST /accounts/{account_id}/crm/leads

To create a lead, perform a POST request with a JSON object of the following parameters:

  • first_name: First name of the lead

  • middle_name: Middle name of the lead

  • last_name: Last name of the lead (required)

  • name: Name of the lead

  • title: Title of the lead

  • status: Status of the lead

  • address: Address of the lead

  • company: Company of the lead (required)

  • industry: Industry of the company of the lead

  • annual_revenue: Annual revenue of the company

  • rating: Rating of the lead

  • email: Email of the lead

  • fax: Fax of the lead

  • phone: Phone of the lead

  • description: Additional details about the Lead

Here is an example request:

curl -XPOST -H 'Authorization: Bearer [TOKEN]' \
    -H 'Content-Type: application/json' \
    'https://api.kloudless.com/v1/accounts/123/crm/leads' \
    -XPOST -d '{
        "name": "Vinod Chandru",
        "title": "Developer",
        "status": "Contacted",
        "company": "Kloudless, Inc.",
        "industry": "Information Technology",
        "rating": "Hot",
        "email": "hello@kloudless.com",
        "description": "Good contact for Sharepoint"
    }'
  • RequestToggle
  • Headers
    Authorization: Bearer [TOKEN]
    Content-Type: application/json
    Body
    {
        "name": "Vinod Chandru",
        "title": "Developer",
        "status": "Contacted",
        "company": "Kloudless, Inc.",
        "industry": "Information Technology",
        "rating": "Hot",
        "email": "hello@kloudless.com",
        "description": "Good contact for Sharepoint",
    }
  • Response  201Toggle
  • Headers
    Content-Type: application/json
    Body
    {
        "id": 466739103,
        "owner": "owner@company.com",
        "name": "Vinod Chandru",
        "title": "Developer",
        "status": "Contacted",
        "company": "Kloudless, Inc.",
        "industry": "Information Technology",
        "rating": "Hot",
        "email": "hello@kloudless.com",
        "created": "2015-10-09T15:30:66.386432Z",
        "modified": "2015-10-09T15:30:66.386432Z",
        "description": "Good contact for Sharepoint",
        "type": "lead",
        "raw": {
          ...
        },
        "api": "crm"
    }

Retrieve a Lead 

retrieve a leadGET /accounts/{account_id}/crm/leads/{lead_id}
  • Response  200Toggle
  • Headers
    Content-Type: application/json
    Body
    {
        "id": 7563839,
        "owner": "owner@company.com",
        "name": "Eliot Sun",
        "title": "CEO",
        "status": "Contacted",
        "company": "Kloudless, Inc.",
        "industry": "Information Technology",
        "rating": "Hot",
        "email": "hello@kloudless.com",
        "created": "2015-02-19T09:52:01.248537Z",
        "modified": "2015-02-19T09:52:01.248537Z",
        "description": "Knowledgeable about cloud integration",
        "type": "lead",
        "raw": {
          ...
        },
        "api": "crm"
    }

Update a Lead 

update a leadPATCH /accounts/{account_id}/crm/leads/{lead_id}

To update an lead, create a JSON object with any of the following properties:

  • name

  • title

  • status

  • address

  • company

  • industry

  • annual_revenue

  • rating

  • email

  • fax

  • phone

  • description

The new object will be returned on success.

Example request:

curl -H 'Authorization: Bearer [TOKEN]' \
    -H 'Content-Type: application/json' \
    -XPATCH -d '{
        "description": "Good contact for Sharepoint and Office365"
    }' \
    'https://api.kloudless.com/v1/accounts/15/crm/leads/466739103'
  • RequestToggle
  • Headers
    Authorization: Bearer [TOKEN]
    Content-Type: application/json
    Body
    {
      "description": "Good contact for Sharepoint and Office365"
    }
  • Response  200Toggle
  • Headers
    Content-Type: application/json
    Body
    {
        "id": 466739103,
        "owner": "owner@company.com",
        "name": "Vinod Chandru",
        "title": "Developer",
        "status": "Contacted",
        "company": "Kloudless, Inc.",
        "industry": "Information Technology",
        "rating": "Hot",
        "email": "hello@kloudless.com",
        "created": "2015-10-09T15:30:66.386432Z",
        "modified": "2015-10-09T15:30:66.386432Z",
        "description": "Good contact for Sharepoint and Office365",
        "type": "lead",
        "raw": {
          ...
        },
        "api": "crm"
    }

Delete a Lead 

delete a leadDELETE /accounts/{account_id}/crm/leads/{lead_id}

Example request:

curl -L -H 'Authorization: Bearer [TOKEN]' \
    -XDELETE https://api.kloudless.com/v1/accounts/34/crm/leads/1385852
  • Response  204

CRM Opportunities 

An opportunity represents a business deal with companies or people that generate real revenue for your organization.

  • id Unique identifier for this opportunity

  • account Identifier of the associated account

  • campaign Identifier of the campaign associated with this opportunity

  • owner Identifier of the user that owns this campaign

  • name Name for this opportunity

  • stage_name Current stage of this record

  • closing_date Date when the opportunity is expected to close

  • next_step Description of the next step in closing opportunity

  • amount Estimated total sale amount

  • probability Probability of closing an opportunity

  • opportunity_type Type of opportunity

  • created ISO 8601 timestamp indicating when the account object was created.

  • modified ISO 8601 timestamp indicating when the account object was modified.

  • description Additional details about the Opportunity

  • type Type of object. Always opportunity

  • raw Underlying object retrieved from the service

  • api Always crm.

List Opportunities 

list opportunitiesGET /accounts/{account_id}/crm/opportunities{?page_size,page}

The response contains the following information:

  • count Number of objects on this page

  • page Page identifier

  • next_page The value to provide in the request’s page query parameter for the next page. This will be null if there are no more pages.

  • objects List of opportunity objects

  • type Always object_list

  • api Always crm

  • Parameters
  • page_size
    number (optional) Default: 10 

    Number of objects in each page. For some services, the page_size isn’t respected. The page_size must be between 1 and 1000.

    page
    string (optional) 

    Page to return. Do not provide a page parameter when retrieving the first page. To retrieve pages after the first page, set page to the value of next_page found in the previous page of data retrieved.

  • Response  200Toggle
  • Headers
    Content-Type: application/json
    Body
    {
        "total": 1,
        "count": 1,
        "page": 1,
        "next_page": null,
        "objects": [
            {
                "id": 83234654,
                "account": 482938193,
                "campaign": 14855,
                "owner": "owner@company.com",
                "name": "Integration with Cloud Storage Services",
                "stage_name": "Prospect",
                "closing_date": "2015-12-25T01:01:01.010000Z",
                "next_step": "Contact accounting to pay for invoice",
                "amount": "88888888",
                "probability": "88%",
                "opportunity_type": "Existing Business",
                "created": "2015-10-14T06:53:61.138471Z",
                "modified": "2015-10-14T06:53:61.138471Z",
                "description": "All file and object store services",
                "type": "opportunity",
                "raw": {
                  ...
                },
                "api": "crm"
            },
        ],
        "type": "object_list",
        "api": "crm
    }
    

Create an Opportunity 

create an opportunityPOST /accounts/{account_id}/crm/opportunities

To create an opportunity, perform a POST request with a JSON object of the following parameters:

  • name: Name for this opportunity (required)

  • stage_name: Current stage of this record (required)

  • close_date: Date when the opportunity is expected to close (required)

  • account: Identifier of the associated account

  • campaign: Identifier of the campaign associated with this opportunity

  • next_step: Description of the next step in closing opportunity

  • amount: Estimated total sale amount

  • probability: Probability of closing an opportunity

  • opportunity_type: Type of opportunity

  • description: Details about the opportunity

Here is an example request:

curl -XPOST -H 'Authorization: Bearer [TOKEN]' \
    -H 'Content-Type: application/json' \
    'https://api.kloudless.com/v1/accounts/123/crm/opportunities' \
    -XPOST -d '{
        "account": 482938193,
        "campaign": 14855,
        "owner": "owner@company.com",
        "name": "Integration with Cloud CRM Services",
        "stage_name": "Prospect",
        "closing_date": "2016-01-01T01:01:01.010000Z",
        "next_step": "Contact development team for progress of integration",
        "amount": "88888888",
        "probability": "88%",
        "opportunity_type": "Existing Business",
        "description": "Adding support for Microsoft Dynamics"
    }'
  • RequestToggle
  • Headers
    Authorization: Bearer [TOKEN]
    Content-Type: application/json
    Body
    {
      "account": 482938193,
      "campaign": 14855,
      "name": "Integration with Cloud CRM Services",
      "closing_date": "2016-01-01T01:01:01.010000Z",
      "next_step": "Contact development team for progress of integration",
      "amount": "88888888",
      "probability": "88%",
      "opportunity_type": "Existing Business",
      "description": "Adding support for Microsoft Dynamics"
    }
  • Response  201Toggle
  • Headers
    Content-Type: application/json
    Body
    {
        "id": 4483749126,
        "account": 482938193,
        "campaign": 14855,
        "owner": "owner@company.com",
        "name": "Integration with Cloud CRM Services",
        "closing_date": "2016-01-01T01:01:01.010000Z",
        "next_step": "Contact development team for progress of integration",
        "amount": "88888888",
        "probability": "88%",
        "opportunity_type": "Existing Business",
        "created": "2015-10-15T12:10:54.394523Z",
        "modified": "2015-10-15T12:10:54.394523Z",
        "description": "Adding support for Microsoft Dynamics",
        "type": "opportunity",
        "raw": {
          ...
        },
        "api": "crm"
    }

Retrieve an Opportunity 

retrieve an opportunityGET /accounts/{account_id}/crm/opportunities/{opportunity_id}
  • Response  200Toggle
  • Headers
    Content-Type: application/json
    Body
    {
        "id": 83234654,
        "account": 482938193,
        "campaign": 14855,
        "owner": "owner@company.com",
        "name": "Integration with Cloud Storage Services",
        "closing_date": "2015-12-25T01:01:01.010000Z",
        "next_step": "Contact accounting to pay for invoice",
        "amount": "88888888",
        "probability": "88%",
        "opportunity_type": "Existing Business",
        "created": "2015-10-14T06:53:61.138471Z",
        "modified": "2015-10-14T06:53:61.138471Z",
        "description": "All file and object store services",
        "type": "opportunity",
        "raw": {
          ...
        },
        "api": "crm"
    }

Update an Opportunity 

update an opportunityPATCH /accounts/{account_id}/crm/opportunities/{opportunity_id}

To update an opportunity, create a JSON object with any of the following properties:

  • account

  • campaign

  • name

  • closing_date

  • next_step

  • amount

  • probability

  • opportunity_type

  • description

The new object will be returned on success.

Example request:

curl -H 'Authorization: Bearer [TOKEN]' \
    -H 'Content-Type: application/json' \
    -XPATCH -d '{
        "next_step": "Check in with accounting for invoicing",
    }' \
    'https://api.kloudless.com/v1/accounts/15/crm/opportunities/4483749126'
  • RequestToggle
  • Headers
    Authorization: Bearer [TOKEN]
    Content-Type: application/json
    Body
    {
      "employees": 25,
      "description": "Cloud API Services. Storage, CRM, and more"
    }
  • Response  200Toggle
  • Headers
    Content-Type: application/json
    Body
    {
        "id": 4483749126,
        "account": 482938193,
        "campaign": 14855,
        "owner": "owner@company.com",
        "name": "Integration with Cloud CRM Services",
        "closing_date": "2016-01-01T01:01:01.010000Z",
        "next_step": "Check in with accounting for invoicing",
        "amount": "88888888",
        "probability": "88%",
        "opportunity_type": "Existing Business",
        "created": "2015-10-15T12:10:54.394523Z",
        "modified": "2015-10-16T17:56:12.568423Z",
        "description": "Adding support for Microsoft Dynamics",
        "type": "opportunity",
        "raw": {
          ...
        },
        "api": "crm"
    }

Delete an Opportunity 

delete an opportunityDELETE /accounts/{account_id}/crm/opportunities/{opportunity_id}

Example request:

curl -L -H 'Authorization: Bearer [TOKEN]' \
    -XDELETE https://api.kloudless.com/v1/accounts/34/crm/opportunities/49583321
  • Response  204

CRM Campaigns 

A campaign is a container to plan, execute and monitor the progress of marketing activities.

  • id Unique identifier for this campaign

  • owner Identifier of the user that owns this campaign

  • parent Indentifier of the parent object

  • name Name of campaign

  • campaign_type Type of campaign

  • start Start date of campaign

  • end End date of campaign

  • status Status of campaign

  • expected_revenue Expected revenue

  • actual_cost Actual cost of campaign

  • budgeted_cost Budgeted cost of campaign

  • created ISO 8601 timestamp indicating when the campaign object was created.

  • modified ISO 8601 timestamp indicating when the campaign object was modified.

  • description Additional details about the Campaign

  • type Type of object. Always campaign

  • raw Underlying object retrieved from the service

  • api Always crm.

List Campaigns 

list campaignsGET /accounts/{account_id}/crm/campaigns{?page_size,page}

The response contains the following information:

  • count Number of objects on this page

  • page Page identifier

  • next_page The value to provide in the request’s page query parameter for the next page. This will be null if there are no more pages.

  • objects List of campaign objects

  • type Always object_list

  • api Always crm

  • Parameters
  • page_size
    number (optional) Default: 10 

    Number of objects in each page. For some services, the page_size isn’t respected. The page_size must be between 1 and 1000.

    page
    string (optional) 

    Page to return. Do not provide a page parameter when retrieving the first page. To retrieve pages after the first page, set page to the value of next_page found in the previous page of data retrieved.

  • Response  200Toggle
  • Headers
    Content-Type: application/json
    Body
    {
        "total": 1,
        "count": 1,
        "page": 1,
        "next_page": null,
        "objects": [
            {
                "id": 14855,
                "account": 482938193,
                "owner": "owner@company.com",
                "name": "Integrations Campaign",
                "campaign_type": "Referral",
                "start": "2015-06-01T23:12:69.864353Z",
                "end": "2016-06-01T23:12:69.132442Z",
                "status": "In Progress",
                "expected_revenue": 12345.00,
                "actual_cost": 753.92,
                "budgeted_cost": 1000.00,
                "created": "2015-06-01T23:12:69.864353Z",
                "modified": "2015-06-01T23:12:69.864353Z",
                "description": "Search for possible API Integrations",
                "type": "campaign",
                "raw": {
                  ...
                },
                "api": "crm"
            },
        ],
        "type": "object_list",
        "api": "crm
    }
    

Create a Campaign 

create a campaignPOST /accounts/{account_id}/crm/campaigns

To create a campaign, perform a POST request with a JSON object of the following parameters:

  • name: Name of campaign (required)

  • account: Indentifier of the associated account

  • owner: Identifier of the user that owns this campaign

  • campaign_type: Type of campaign

  • start: Start date of campaign

  • end: End date of campaign

  • status: Status of campaign

  • expected_revenue: Expected revenue

  • actual_cost: Actual cost of campaign

  • budgeted_cost: Budgeted cost of campaign

  • description: Additional details about the Campaign

Here is an example request:

curl -XPOST -H 'Authorization: Bearer [TOKEN]' \
    -H 'Content-Type: application/json' \
    'https://api.kloudless.com/v1/accounts/123/crm/campaigns' \
    -XPOST -d '{
        "account": 482938193,
        "owner": "owner@company.com",
        "campaign_type": "Referral",
        "name": "Marketing Services",
        "start": "2015-11-01T23:12:69.864353Z",
        "end": "2016-11-01T23:12:69.132442Z",
        "status": "Planned",
        "expected_revenue": 100000.00,
        "budgeted_cost": 1000.00,
        "description": "Revamp marketing partnerships"
    }'
  • RequestToggle
  • Headers
    Authorization: Bearer [TOKEN]
    Content-Type: application/json
    Body
    {
      "account": 482938193,
      "owner": "owner@company.com",
      "campaign_type": "Referral",
      "name": "Marketing Services",
      "start": "2015-11-01T23:12:69.864353Z",
      "end": "2016-11-01T23:12:69.132442Z",
      "status": "Planned",
      "expected_revenue": 100000,
      "budgeted_cost": 1000,
      "description": "Revamp marketing partnerships"
    }
  • Response  201Toggle
  • Headers
    Content-Type: application/json
    Body
    {
        "id": 245928442,
        "account": 482938193,
        "owner": "owner@company.com",
        "campaign_type": "Referral",
        "name": "Marketing Services",
        "start": "2015-11-01T23:12:69.864353Z",
        "end": "2016-11-01T23:12:69.132442Z",
        "status": "Planned",
        "expected_revenue": 100000.00,
        "budgeted_cost": 1000.00,
        "created": "2015-10-07T20:42:17.954885Z",
        "modified": "2015-10-07T20:42:17.954885Z",
        "description": "Revamp marketing partnerships",
        "type": "campaign",
        "raw": {
          ...
        },
        "api": "crm"
    }

Retrieve a Campaign 

retrieve a campaignGET /accounts/{account_id}/crm/campaigns/{campaign_id}
  • Response  200Toggle
  • Headers
    Content-Type: application/json
    Body
    {
        "id": 14855,
        "account": 482938193,
        "owner": "owner@company.com",
        "name": "Integrations Campaign",
        "campaign_type": "Referral",
        "start": "2015-06-01T23:12:69.864353Z",
        "end": "2016-06-01T23:12:69.132442Z",
        "status": "In Progress",
        "expected_revenue": 12345.00,
        "actual_cost": 753.92,
        "budgeted_cost": 1000.00,
        "created": "2015-06-01T23:12:69.864353Z",
        "modified": "2015-06-01T23:12:69.864353Z",
        "description": "Search for possible API Integrations",
        "type": "campaign",
        "raw": {
          ...
        },
        "api": "crm"
    }

Update a Campaign 

update a campaignPATCH /accounts/{account_id}/crm/campaigns/{campaign_id}

To update a campaign, create a JSON object with any of the following properties:

  • account

  • owner

  • campaign_type

  • name

  • start

  • end

  • status

  • expected_revenue

  • actual_cost

  • budgeted_cost

  • description

The new object will be returned on success.

Example request:

curl -H 'Authorization: Bearer [TOKEN]' \
    -H 'Content-Type: application/json' \
    -XPATCH -d '{
        "status": "In Progress"
    }' \
    'https://api.kloudless.com/v1/accounts/15/crm/campaigns/245928442'
  • RequestToggle
  • Headers
    Authorization: Bearer [TOKEN]
    Content-Type: application/json
    Body
    {
      "status": "In Progress"
    }
  • Response  200Toggle
  • Headers
    Content-Type: application/json
    Body
    {
        "id": 245928442,
        "account": 482938193,
        "owner": "owner@company.com",
        "campaign_type": "Referral",
        "name": "Marketing Services",
        "start": "2015-11-01T23:12:69.864353Z",
        "end": "2016-11-01T23:12:69.132442Z",
        "status": "In Progress",
        "expected_revenue": 100000.00,
        "budgeted_cost": 1000.00,
        "created": "2015-10-07T20:42:17.954885Z",
        "modified": "2015-10-17T13:12:46.355834Z",
        "description": "Revamp marketing partnerships",
        "type": "campaign",
        "raw": {
          ...
        },
        "api": "crm"
    }

Delete a Campaign 

delete a campaignDELETE /accounts/{account_id}/crm/campaigns/{campaign_id}

Example request:

curl -L -H 'Authorization: Bearer [TOKEN]' \
    -XDELETE https://api.kloudless.com/v1/accounts/34/crm/campaigns/4553521
  • Response  204

CRM Tasks 

A task represents a business activity like a todo item.

  • id Unique identifier for this task

  • account Indentifier of the associated account

  • owner Identifier of the user that owns this task

  • status Status of task

  • priority Priority of task

  • subject Subject of task

  • created ISO 8601 timestamp indicating when the task object was created.

  • modified ISO 8601 timestamp indicating when the task object was modified.

  • description Additional details about the Task

  • type Type of object. Always task

  • raw Underlying object retrieved from the service

  • api Always crm.

List Tasks 

list taskGET /accounts/{account_id}/crm/tasks{?page_size,page}

The response contains the following information:

  • count Number of objects on this page

  • page Page identifier

  • next_page The value to provide in the request’s page query parameter for the next page. This will be null if there are no more pages.

  • objects List of task objects

  • type Always object_list

  • api Always crm

  • Parameters
  • page_size
    number (optional) Default: 10 

    Number of objects in each page. For some services, the page_size isn’t respected. The page_size must be between 1 and 1000.

    page
    string (optional) 

    Page to return. Do not provide a page parameter when retrieving the first page. To retrieve pages after the first page, set page to the value of next_page found in the previous page of data retrieved.

  • Response  200Toggle
  • Headers
    Content-Type: application/json
    Body
    {
        "total": 1,
        "count": 1,
        "page": 1,
        "next_page": null,
        "objects": [
            {
                "id": 142,
                "account": 482938193,
                "owner": "owner@company.com",
                "status": "Not Started",
                "priority": "high",
                "subject": "Email quote to customer"
                "created": "2015-06-01T23:12:69.864353Z",
                "modified": "2015-06-01T23:12:69.864353Z",
                "description": "Follow-up from Dreamforce",
                "type": "task",
                "raw": {
                  ...
                },
                "api": "crm"
            },
        ],
        "type": "object_list",
        "api": "crm
    }
    

Create a Task 

create a taskPOST /accounts/{account_id}/crm/tasks

To create a task, perform a POST request with a JSON object of the following parameters:

  • status: Status of task (required)

  • priority: Priority of task (required)

  • account: Indentifier of the associated account

  • owner: Identifier of the user that owns this task

  • subject: Actual subject of task

  • description: Additional details about the Task

Here is an example request:

curl -XPOST -H 'Authorization: Bearer [TOKEN]' \
    -H 'Content-Type: application/json' \
    'https://api.kloudless.com/v1/accounts/123/crm/tasks' \
    -XPOST -d '{
        "account": 482938193,
        "owner": "owner@company.com",
        "status": "Completed",
        "priority": "low",
        "subject": "finish marketing report for 2015-06-01",
        "description": "Bi-weekly marketing report"
    }'
  • RequestToggle
  • Headers
    Authorization: Bearer [TOKEN]
    Content-Type: application/json
    Body
    {
      "account": 482938193,
      "owner": "owner@company.com",
      "status": "Completed",
      "priority": "low",
      "subject": "finish marketing report for 2015-06-01",
      "description": "Bi-weekly marketing report"
    }
  • Response  201Toggle
  • Headers
    Content-Type: application/json
    Body
    {
        "id": 453,
        "account": 482938193,
        "owner": "owner@company.com",
        "status": "Completed",
        "priority": "low",
        "subject": "finish marketing report for 2015-06-01",
        "created": "2015-10-07T20:42:17.954885Z",
        "modified": "2015-10-07T20:42:17.954885Z",
        "description": "Bi-weekly marketing report",
        "type": "task",
        "raw": {
          ...
        },
        "api": "crm"
    }

Retrieve a Task 

retrieve a taskGET /accounts/{account_id}/crm/tasks/{task_id}
  • Response  200Toggle
  • Headers
    Content-Type: application/json
    Body
    {
        "id": 142,
        "account": 482938193,
        "owner": "owner@company.com",
        "status": "Not Started",
        "priority": "high",
        "subject": "Email quote to customer"
        "created": "2015-06-01T23:12:69.864353Z",
        "modified": "2015-06-01T23:12:69.864353Z",
        "description": "Follow-up from Dreamforce",
        "type": "task",
        "raw": {
          ...
        },
        "api": "crm"
    }

Update a Task 

update a taskPATCH /accounts/{account_id}/crm/tasks/{task_id}

To update a task, create a JSON object with any of the following properties:

  • account

  • owner

  • status

  • priority

  • subject

  • description

The new object will be returned on success.

Example request:

curl -H 'Authorization: Bearer [TOKEN]' \
    -H 'Content-Type: application/json' \
    -XPATCH -d '{
        "status": "completed"
    }' \
    'https://api.kloudless.com/v1/accounts/15/crm/tasks/142'
  • RequestToggle
  • Headers
    Authorization: Bearer [TOKEN]
    Content-Type: application/json
    Body
    {
      "status": "completed"
    }
  • Response  200Toggle
  • Headers
    Content-Type: application/json
    Body
    {
        "id": 142,
        "account": 482938193,
        "owner": "owner@company.com",
        "status": "Completed",
        "priority": "high",
        "subject": "Email quote to customer"
        "created": "2015-06-01T23:12:69.864353Z",
        "modified": "2015-10-015T11:45:12.347413Z",
        "description": "Follow-up from Dreamforce",
        "type": "task",
        "raw": {
          ...
        },
        "api": "crm"
    }

Delete a Task 

delete a campaignDELETE /accounts/{account_id}/crm/tasks/{task_id}

Example request:

curl -L -H 'Authorization: Bearer [TOKEN]' \
    -XDELETE https://api.kloudless.com/v1/accounts/34/crm/tasks/124
  • Response  204

CRM Objects 

A CRM Object is any standard or custom object of the upstream CRM service. The CRM Objects endpoints allow operations on any generic object provided by the CRM service by transmitting and receiving raw data via Kloudless.

  • raw Underlying object retrieved from the service

Querying the objects endpoint requires a query parameter raw_type to query the service for objects of that type. The raw_type query parameter is case-sensitive. Possible raw_type values along with the associated object schema can be shown via the List Schemas and Retrieve Schema endpoints respectively.

When creating or updating a CRM object, Kloudless will process all the fields sent in the JSON object. For standard fields, it will use the Kloudless lowercase syntax. For nonstandard fields, it will use the service specific syntax like fieldname. For custom fields, it will follow service specific syntax like CustomField__c for Salesforce.

List Objects 

list objectsGET /accounts/{account_id}/crm/objects{?raw_type,page_size,page}

The response contains the following information:

  • count Number of objects on this page

  • page Page identifier

  • next_page The value to provide in the request’s page query parameter for the next page. This will be null if there are no more pages.

  • objects List of raw_type objects

  • Parameters
  • raw_type
    string (required) Default: Goal 

    Name of object to query The raw_type must be a standard or custom object type

    page_size
    number (optional) Default: 10 

    Number of objects in each page. For some services, the page_size isn’t respected. The page_size must be between 1 and 1000.

    page
    string (optional) 

    Page to return. Do not provide a page parameter when retrieving the first page. To retrieve pages after the first page, set page to the value of next_page found in the previous page of data retrieved.

  • Response  200Toggle
  • Headers
    Content-Type: application/json
    Body
    {
        "total": 1,
        "count": 1,
        "page": 1,
        "next_page": null,
        "objects": [
            {
                "raw": {
                  ...
                },
                "api": "crm"
            },
        ],
        "type": "object_list",
        "api": "crm
    }
    

Create an Object 

create an objectPOST /accounts/{account_id}/crm/objects{?raw_type}

To create an object, perform a POST request with a JSON object of the raw_type parameters. Note, all the parameters are case sensitive. An example for the raw_type Goal of the Salesforce CRM is shown below:

  • CompletionDate

  • Description

  • DueDate

  • ImageUrl

  • IsKeyCompanyGoal

  • LastReferenceDate

  • LastViewedDate

  • Name

  • Progress

  • StartDate

  • Status

Here is an example request:

curl -XPOST -H 'Authorization: Bearer [TOKEN]' \
    -H 'Content-Type: application/json' \
    'https://api.kloudless.com/v1/accounts/123/crm/objects?raw_type=Goal' \
    -XPOST -d '{
        "Name": "Reach Goal 1",
        "Progress": "Published",
        "StartDate": "2015-06-01T23:12:69.864353Z",
        "DueDate": "2016-06-01T23:12:69.132442Z"
    }'
  • RequestToggle
  • Headers
    Authorization: Bearer [TOKEN]
    Content-Type: application/json
    Body
    {
      "Name": "Reach Goal 1",
      "Progress": "Published",
      "StartDate": "2015-06-01T23:12:69.864353Z",
      "DueDate": "2016-06-01T23:12:69.132442Z"
    }
  • Response  201Toggle
  • Headers
    Content-Type: application/json
    Body
    {
        "raw": {
          ...
        },
        "api": "crm"
    }

Retrieve an Object 

retrieve an objectGET /accounts/{account_id}/crm/objects/{object_id}?{raw_type}
  • Response  200Toggle
  • Headers
    Content-Type: application/json
    Body
    {
        "raw": {
          ...
        },
        "api": "crm"
    }

Update an Object 

update an objectPATCH /accounts/{account_id}/crm/objects/{object_id}?{raw_type}

To update an object of type raw_type, create a JSON object with the raw_type properties.

The new object will be returned on success.

Example request:

curl -H 'Authorization: Bearer [TOKEN]' \
    -H 'Content-Type: application/json' \
    -XPATCH -d '{
        "employees": 25,
        "description": "Cloud API Services. Storage, CRM, and more"
    }' \
    'https://api.kloudless.com/v1/accounts/15/crm/objects/1234?raw_type=Goal'
  • RequestToggle
  • Headers
    Authorization: Bearer [TOKEN]
    Content-Type: application/json
    Body
    {
      "status": "Completed"
    }
  • Response  200Toggle
  • Headers
    Content-Type: application/json
    Body
    {
        "raw": {
          ...
        },
        "api": "crm"
    }

Delete an Object 

delete an objectDELETE /accounts/{account_id}/crm/objects/{object_id}?{raw_type}

Example request:

curl -L -H 'Authorization: Bearer [TOKEN]' \
    -XDELETE https://api.kloudless.com/v1/accounts/34/crm/objects/1324?raw_type=Goal
  • Response  204

Other CRM Endpoints 

List Schemas 

List schemas for CRMGET /accounts/{account_id}/crm/schemas{?page_size,page}

Returns information on all field names and properties for all objects within the CRM service. Currently, the raw response from the service provider is returned. Additionally, a type field will always be returned within the raw response. This is equivalent to the raw_type used in the other object methods for crm.

Example request:

curl -H 'Authorization: Bearer [TOKEN]' \
    -H 'Content-Type: application/json' \
    'https://api.kloudless.com/v1/accounts/15/crm/schemas'
  • Parameters
  • page_size
    number (optional) Default: 1000 

    Number of objects on each page.

    page
    string (optional) 

    Page to return. Do not provide a page parameter when retrieving the first page. To retrieve pages after the first page, set page to the value of next_page found in the previous page of data retrieved.

  • RequestToggle
  • Headers
    Authorization: Bearer [TOKEN]
    Content-Type: application/json
  • Response  200Toggle
  • Headers
    Content-Type: application/json
    Body
    {
        "total": 1,
        "count": 1,
        "page": 1,
        "next_page": null,
        "objects": [
            {
                "raw": {
                  ...,
                  "type": <raw_type of the CRM object>
                },
                "api": "crm"
            },
        ],
        "type": "object_list",
        "api": "crm
    }
    

Retrieve a Schema 

Retrieve schema CRM objectGET /accounts/{account_id}/crm/schemas/{raw_type}

Returns information on all field names and properties for a specific CRM object with the given raw_type. Currently, the raw response from the service provider is returned.

Example request:

curl -H 'Authorization: Bearer [TOKEN]' \
    -H 'Content-Type: application/json' \
    'https://api.kloudless.com/v1/accounts/15/crm/schemas/Account'
  • RequestToggle
  • Headers
    Authorization: Bearer [TOKEN]
    Content-Type: application/json
  • Response  200Toggle
  • Headers
    Content-Type: application/json
    Body
    {
        {
            "raw": {
              ...,
              "type": <raw_type of the CRM object>
            },
            "api": "crm"
        },
    }

Batch Requests 

Perform a batch request for CRM contentPOST /accounts/{account_id}/crm/batch

Allows you to perform a series of API requests through a single batch request for all CRM content pertaining to leads, opportunities, campaigns, contacts, etc. The batch endpoint accepts a JSON object with the following format:

  • requests: an array of objects with the required fields:
    • id - A unique identifier for the request
    • headers - Optional headers for the request (coming soon)
    • method - The http method of the request
    • url_data - A JSON object of data to construct the url of the request
      • raw_type - The object type endpoint
      • id - The id of the object
      • params - A JSON object of any query params to be appended to the url
    • data - The data of the request (binary data is currently unsupported)

The response contains the following information:

  • responses an array of objects corresponding to each request with the following format:

    • objects If a collection, will return objects (if available)
      • raw any raw response for each object
    • object If a resource, will return the object (if available)
      • raw any raw response for the object
  • errors Any errors encountered will be returned (if available)

Service-specific notes:

  • dynamics only allows up to two concurrent batch requests to a tenant. It is therefore highly likely to encounter rate-limiting if batch requests are made to dynamics accounts.

Example request:

curl -H 'Authorization: Bearer [TOKEN]' \
    -H 'Content-Type: application/json' \
    -XPOST -d '{
        "requests": [{
            "id": "92fae13",
            "method": "GET",
            "url_data": {
                "raw_type": "Account",
                "id": "001D000000C0aBCIER",
                "params": {
                    "fields": "Name,BillingPostalCode"
                }
            }
        },{
            "id": "c23a87f",
            "method": "GET",
            "url_data": {
                "raw_type": "Account",
                "id": "001D000000K0fXOIAZ"
                "params": {
                    "fields": "Name,BillingPostalCode"
                }
            }
        }]
    }' \
    'https://api.kloudless.com/v1/accounts/15/crm/batch'
  • RequestToggle
  • Headers
    Authorization: Bearer [TOKEN]
    Content-Type: application/json
    Body
    {
        "requests": [{
            "id": "92fae13",
            "method": "GET",
            "url_data": {
                "raw_type": "Account",
                "id": "001D000000C0aBCIER",
                "params": {
                    "fields": ["Name", "BillingPostalCode"]
                }
            }
        },{
            "id": "c23a87f",
            "method": "GET",
            "url_data": {
                "raw_type": "Account",
                "id": "001D000000K0fXOIAZ"
                "params": {
                    "fields": ["Name", "BillingPostalCode"]
                }
            }
        }]
    }
  • Response  200Toggle
  • Headers
    Content-Type: application/json
    Body
    {
      "responses": [
        {
          "object": {
            "id": "001D000000C0aBCIER",
            "name": "TestName",
            "raw": {
              "Name": "TestName",
              "BillingPostalCode": "94110",
              "Id": "001D000000C0aBCIER"
            },
            "type": "account",
            "api": "crm"
          }
        },
        {
          "object": {
            "id": "001D000000K0fXOIAZ",
            "name": "NewName",
            "raw": {
              "Name": "NewName",
              "BillingPostalCode": "94105",
              "Id": "001D000000K0fXOIAZ"
            },
            "type": "account",
            "api": "crm"
          }
        }
      ]
    }
Search for CRM contentGET /accounts/{account_id,account_id,...}/crm/search{?q,lang,page_size,page}

The CRM Search endpoint allows your application to perform searches for both standard Kloudless object types as well as using service-specific query languages.

Check out the Parameters section below for more information on the required parameters.

The response contains the following information:

  • count Number of file objects in search results.

  • page Page identifier

  • next_page The value to provide in the request’s page query parameter for the next page. This will be null if there are no more pages.

  • objects List of file objects in search results, in decreasing order of relevancy.

  • errors Contains account IDs mapped to error responses for any accounts that failed the API request. Only present when performing multi-account searches (see below).

Example request:

curl -H 'Authorization: Bearer [TOKEN]' \
    'https://api.kloudless.com/v1/accounts/123/crm/search?q=hello+world'

This endpoint supports comma-separated Account IDs. Resources under multiple accounts can be searched by separating the account IDs with commas:

curl -H 'Authorization: Bearer [TOKEN1],[TOKEN2],[TOKEN3]' \
    'https://api.kloudless.com/v1/accounts/123,456,789/crm/search?q=eliot+sun'

Search Query Languages

More information on each of the supported values for the lang parameter is provided below.

Keyword Search (lang=keyword)

Kloudless attempts to find matching objects of the types supported by the unified Kloudless API using the best mechanism available. This option is usually less efficient than a service-specific query language as multiple object types must be checked.

Supported by:

  • dynamics

Default lang for:

  • dynamics

Salesforce Object Query Language (lang=SOQL)

You can find Salesforce’s SOQL documentation here.

Supported by:

  • salesforce

Default lang for:

  • salesforce

Dynamics Query Language (lang=DQL)

Kloudless has created a query language to convert a query statement into the OData protocol used by Dynamics to search for specific fields. Keywords are case-sensitive, and logical operators (AND, OR) are only supported in the WHERE clause.

Supported by:

  • dynamics

Default lang for:

  • None

Example queries and a list of supported keywords are below.

SELECT accountid, name, numberofemployees FROM account WHERE name LIKE '%kloud%' ORDER BY name ASC
SELECT leadid, fullname, emailaddress1, statuscode FROM lead WHERE fullname LIKE '%kloud%' AND emailaddress1 != '' ORDER BY fullname ASC
SELECT opportunityid, name, salesstage, parentaccountid.accountid FROM opportunity WHERE name LIKE '%kloud%' ORDER BY name ASC
  • SELECT: Required keyword to begin the query ($select)

    • Use with <property names>: A comma delimited list of properties that will be returned in the response
    • Note: For single-valued and collection-valued navigation properties, suffix the property name with a . along with any additional property names of the related entity. EX: parentaccountid.accountid Equivalent OData parameter: $select
  • FROM: Required keyword to denote which entity to query

    • Use with <entity name>: The case-sensitive name of an entity to query
  • WHERE: Optional keyword to filter properties based on values ($filter)

    • <property name> LIKE '%keyword%': filter property to containkeyword`
      • EX: `WHERE name LIKE ‘%kloud%’
    • <property name><operator><value>: filter property on value with operator
      • EX: WHERE name='kloudless'
  • ORDER BY: Optional keyword to order results ($orderby)

    • <property name> <ordering>: Either ASC or DESC to sort results
      • EX: ORDER BY fullname ASC

Kloudless Query Language (lang=KQL) [Coming Soon]

Kloudless aims to provide a unified search query language, KQL, to query CRM services. This capability is still under development and not yet available.

  • Parameters
  • q
    string (required) 

    The terms to search for.

    lang
    string (required) 

    The query language used to search. Refer to the Search Query Languages section above for more information.

    Choices: keyword soql dql

    page_size
    number (optional) Default: 30 

    Number of objects on each page. For some services, the page_size isn’t respected. The page_size must be between 1 and 1000.

    page
    string (optional) 

    Page to return. Do not provide a page parameter when retrieving the first page. To retrieve pages after the first page, set page to the value of next_page found in the previous page of data retrieved.

  • Response  200Toggle
  • Headers
    Content-Type: application/json
    Body
    {
        "count": 2,
        "page": 1,
        "next_page": 2,
        "objects": [
            {
                "id": 1928381283,
                "account": 482938193,
                "owner": "owner@company.com",
                "campaign": 14855,
                "lead": "3586",
                "name": "Eliot Sun",
                "title": "CEO",
                "department": "Execs",
                "email": "hello@kloudless.com",
                "created": "2015-10-01T02:34:57.123832Z",
                "modified": "2015-10-05T03:13:87.857364Z",
                "description": "CEO and Co-founder of Kloudless, Inc.",
                "type": "contact",
                "raw": {
                  ...
                },
                "api": "crm"
            },
            {
                "id": 7563839,
                "campaign": 14855,
                "name": "Eliot Sun",
                "title": "CEO",
                "status": "Contacted",
                "company": "Kloudless, Inc.",
                "industry": "Information Technology",
                "rating": "Hot",
                "email": "hello@kloudless.com",
                "created": "2015-02-19T09:52:01.248537Z",
                "modified": "2015-02-19T09:52:01.248537Z",
                "description": "Knowledgeable about cloud integration",
                "type": "lead",
                "raw": {
                  ...
                },
                "api": "crm"
            }
        ],
        "type": "object_list",
        "api": "crm
    }