API Documentation

This page is intended for software developers wishing to integrate their applications with NetHunt CRM. We support listing folders, creating, searching and updating records via our API.

Interaction with NetHunt CRM happens via HTTPS using GET and POST methods and the "application/json" media type for payload. All URLs in this documentation are relative to "https://nethunt.com/api/v1/zapier". For access control the "Basic" HTTP authentication scheme is employed, where an email address is used in place of the user name and a special API key in place of the password. In order to obtain the API key log into your Gmail account with NetHunt enabled and find the API key under the NetHunt CRM tab in Settings (click on "Generate" if necessary).

Operations

List all accessible folders

GET /triggers/readable-folder
Sample request
GET https://nethunt.com/api/v1/zapier/triggers/readable-folder
Sample result
[
    {
        "id": "596f644b8f6d05e16c24b810",
        "name": "My first folder"
    },
    {
        "id": "596f644b8f6d05e16c24b811",
        "name": "My second folder"
    }
]
Result fields Description
id Folder ID
name Folder name

List folders which the user can create records in

GET /triggers/writable-folder
Sample request
GET https://nethunt.com/api/v1/zapier/triggers/writable-folder
Sample result
[
    {
        "id": "596f644b8f6d05e16c24b810",
        "name": "My first folder"
    },
    {
        "id": "596f644b8f6d05e16c24b811",
        "name": "My second folder"
    }
]
Result fields Description
id Folder ID
name Folder name

List folder fields

GET /triggers/folder-field/{folderId}
Sample request
GET https://nethunt.com/api/v1/zapier/triggers/folder-field/596f710ef5be7653dee0da14
Request parameter Description Default value
folderId Folder ID to list fields Required
Sample result
[
    {
        "name": "Name"
    },
    {
        "name": "Birthday"
    },
    {
        "name": "Primary Email Address"
    }
]
Result fields Description
name Folder field name

Find records by ID or text query

GET /searches/find-record/{folderId}?recordId={recordId}&query={query}&limit={limit}
Sample request
GET https://nethunt.com/api/v1/zapier/searches/find-record/596f710ef5be7653dee0da14?query=Name%3ADoe&limit=10
Request parameter Description Default value
folderId Folder ID to find records in Required
recordId Record ID if available Either recordId or query must be specified
query Search query to narrow records returned Either recordId or query must be specified
limit Maximum number of records to return 1
Sample result
[
    {
        "id": "596f644b8f6d05e16c24b830",
        "recordId": "596f644b8f6d05e16c24b830",
        "createdAt": "2015-01-01T12:34:15.880Z",
        "updatedAt": "2015-02-01T12:30:10.510Z",
        "fields": {
            "Name": "John Doe",
            "Birthday": "1980-01-01",
            "Employed": true,
            "Salary": 100000,
            "Keywords": [
                "Java",
                "Big Data"
            ],
            "Primary Email Address": "John Doe <john.doe@example.com>",
            "Other Email Addresses": [
                "J. Doe <j.doe@example.com>",
                "J. D. <j.d@example.com>"
            ],
            "Co-workers": [
                "596f64368f6d05e16c24b833",
                "596f644b8f6d05e16c24b834"
            ]
        }
    },
    {
        "id": "596f644b8f6d05e16c24b831",
        "recordId": "596f644b8f6d05e16c24b831",
        "createdAt": "2015-02-01T12:35:15.880Z",
        "fields": {
            "Name": "Jane Doe"
        }
    }
]
Result fields Description
id For internal purposes only
recordId Record ID
createdAt Time of record creation
updatedAt Time of last record update
fields Field names and values

Find recently created records

GET /triggers/new-record/{folderId}?since={since}&limit={limit}
Sample request
GET https://nethunt.com/api/v1/zapier/triggers/new-record/596f710ef5be7653dee0da14?since=2015-01-01T00%3A00%3A00.000Z&limit=2
Request parameter Description Default value
folderId Folder ID to find new records in Required
since Only records created after this time are returned 24 hours before time of request
limit Maximum number of records to return No limit
Sample result
[
    {
        "id": "596f644b8f6d05e16c24b830",
        "recordId": "596f644b8f6d05e16c24b830",
        "createdAt": "2015-01-01T12:34:15.880Z",
        "fields": {
            "Name": "John Doe",
            "Birthday": "1980-01-01",
            "Employed": true,
            "Salary": 100000,
            "Keywords": [
                "Java",
                "Big Data"
            ],
            "Primary Email Address": "John Doe <john.doe@example.com>",
            "Other Email Addresses": [
                "J. Doe <j.doe@example.com>",
                "J. D. <j.d@example.com>"
            ],
            "Co-workers": [
                "596f64368f6d05e16c24b833",
                "596f644b8f6d05e16c24b834"
            ]
        }
    },
    {
        "id": "596f644b8f6d05e16c24b831",
        "recordId": "596f644b8f6d05e16c24b831",
        "createdAt": "2015-02-01T12:35:15.880Z",
        "fields": {
            "Name": "Jane Doe"
        }
    }
]
Result fields Description
id For internal purposes only
recordId Record ID
createdAt Time of record creation
fields Field names and values

Find recently created record comments

GET /triggers/new-comment/{folderId}?since={since}&limit={limit}
Sample request
GET https://nethunt.com/api/v1/zapier/triggers/new-comment/596f710ef5be7653dee0da14?since=2015-01-01T00%3A00%3A00.000Z&limit=2
Request parameter Description Default value
folderId Folder ID to find new record comments in Required
since Only record comments created after this time are returned 24 hours before time of request
limit Maximum number of record comments to return No limit
Sample result
[
    {
        "id": "596f644b8f6d05e16c24b820",
        "commentId": "596f644b8f6d05e16c24b820",
        "recordId": "596f644b8f6d05e16c24b830",
        "createdAt": "2015-01-01T12:34:15.880Z",
        "text": "My first comment"
    },
    {
        "id": "596f644b8f6d05e16c24b821",
        "commentId": "596f644b8f6d05e16c24b821",
        "recordId": "596f644b8f6d05e16c24b831",
        "createdAt": "2015-01-01T14:34:15.880Z",
        "text": "My second comment"
    }
]
Result fields Description
id For internal purposes only
commentId Comment ID
recordId Record ID
createdAt Time of comment creation
text Comment text

Find recently updated records

GET /triggers/updated-record/{folderId}?fieldName={fieldName}&since={since}&limit={limit}
Sample request
GET https://nethunt.com/api/v1/zapier/triggers/updated-record/596f710ef5be7653dee0da14?fieldName=Primary%20Email%20Address&fieldName=Other%20Email%20Addresses&since=2015-01-01T00%3A00%3A00.000Z&limit=1
Request parameter Description Default value
folderId Folder ID to find updated records in Required
fieldName Field name to limit updates observed Optional, multiple parameters with the same name allowed
since Only records updated after this time are returned 24 hours before time of request
limit Maximum number of records to return No limit
Sample result
[
    {
        "id": "596f644b8f6d05e16c24b830-1500113235379",
        "recordId": "596f644b8f6d05e16c24b830",
        "createdAt": "2015-01-01T12:34:15.880Z",
        "updatedAt": "2015-02-01T12:30:10.510Z",
        "fields": {
            "Name": "John Doe",
            "Birthday": "1980-01-01",
            "Employed": true,
            "Salary": 100000,
            "Keywords": [
                "Java",
                "Big Data"
            ],
            "Primary Email Address": "John Doe <john.doe@example.com>",
            "Other Email Addresses": [
                "J. Doe <j.doe@example.com>",
                "J. D. <j.d@example.com>"
            ],
            "Co-workers": [
                "596f64368f6d05e16c24b833",
                "596f644b8f6d05e16c24b834"
            ]
        }
    },
    {
        "id": "596f644b8f6d05e16c24b831",
        "recordId": "596f644b8f6d05e16c24b831",
        "createdAt": "2015-02-01T12:35:15.880Z",
        "fields": {
            "Name": "Jane Doe"
        }
    }
]
Result fields Description
id For internal purposes only
recordId Record ID
createdAt Time of record creation
updatedAt Time of last record update
fields Field names and values

Find recent record changes

GET /triggers/record-change/{folderId}?recordId={recordId}&fieldName={fieldName}&since={since}&limit={limit}
Sample request
GET https://nethunt.com/api/v1/zapier/triggers/record-change/596f710ef5be7653dee0da14?fieldName=Primary%20Email%20Address&fieldName=Other%20Email%20Addresses&since=2015-01-01T00%3A00%3A00.000Z&limit=1
Request parameter Description Default value
folderId Folder ID Required
recordId Record ID to look for single record changes If missing, changes for all folder records are returned
fieldName Field name to limit changes observed Optional, multiple parameters with the same name allowed
since Only changes made after this time are returned 24 hours before time of request
limit Maximum number of changes to return No limit
Sample result
[
    {
        "id": "597084cc39b70d3b5959c604",
        "recordId": "596f644b8f6d05e16c24b830",
        "time": "2017-03-01T12:30:10.510Z",
        "user": {
            "personalName": "Jane Doe",
            "emailAddress": "<jane.doe@example.com>"
        },
        "recordAction": "DELETE"
    },
    {
        "id": "597084cc39b70d3b5959c603",
        "recordId": "596f644b8f6d05e16c24b830",
        "time": "2015-03-01T12:30:10.510Z",
        "user": {
            "personalName": "Jane Doe",
            "emailAddress": "<jane.doe@example.com>"
        },
        "recordAction": "UPDATE",
        "fieldActions": {
            "Salary": {
                "remove": 100000,
                "add": 200000
            },
            "Keywords": {
                "remove": [
                    "Java"
                ],
                "add": [
                    "JavaScript"
                ]
            }
        }
    },
    {
        "id": "597084cc39b70d3b5959c602",
        "recordId": "596f644b8f6d05e16c24b830",
        "time": "2015-02-01T12:30:10.510Z",
        "user": {
            "personalName": "John Doe",
            "emailAddress": "<john.doe@example.com>"
        },
        "recordAction": "CREATE",
        "fieldActions": {
            "Name": {
                "add": "John Doe"
            },
            "Birthday": {
                "add": "1980-01-01"
            },
            "Employed": {
                "add": true
            },
            "Salary": {
                "add": 100000
            },
            "Keywords": {
                "add": [
                    "Java",
                    "Big Data"
                ]
            },
            "Primary Email Address": {
                "add": "John Doe <john.doe@example.com>"
            },
            "Other Email Addresses": {
                "add": [
                    "J. Doe <j.doe@example.com>",
                    "J. D. <j.d@example.com>"
                ]
            },
            "Co-workers": {
                "add": [
                    "596f64368f6d05e16c24b833",
                    "596f644b8f6d05e16c24b834"
                ]
            }
        }
    }
]
Result fields Description
id For internal purposes only
recordId Record ID
time Time of record change
user User who made that change
recordAction One of CREATE, UPDATE, DELETE
fieldActions Names of record fields along with actual changes made to them

Create a new record

POST /actions/create-record/{folderId}
Sample request
POST https://nethunt.com/api/v1/zapier/actions/create-record/596f710ef5be7653dee0da14
{
    "timeZone": "Europe/London",
    "fields": {
        "Name": "John Doe",
        "Birthday": "1980-01-01",
        "Employed": true,
        "Salary": 100000,
        "Keywords": [
            "Java",
            "Big Data"
        ],
        "Primary Email Address": "John Doe <john.doe@example.com>",
        "Other Email Addresses": [
            "J. Doe <j.doe@example.com>",
            "J. D. <j.d@example.com>"
        ],
        "Co-workers": [
            "596f64368f6d05e16c24b833",
            "596f644b8f6d05e16c24b834"
        ]
    }
}
Request parameters and fields Description Default value
folderId Folder ID to create a record in Required
timeZone User time zone Required
fields Field names and values Required
Sample result
{
    "recordId": "596f644b8f6d05e16c24b830",
    "createdAt": "2015-01-01T12:34:15.880Z",
    "fields": {
        "Name": "John Doe",
        "Birthday": "1980-01-01",
        "Employed": true,
        "Salary": 100000,
        "Keywords": [
            "Java",
            "Big Data"
        ],
        "Primary Email Address": "John Doe <john.doe@example.com>",
        "Other Email Addresses": [
            "J. Doe <j.doe@example.com>",
            "J. D. <j.d@example.com>"
        ],
        "Co-workers": [
            "596f64368f6d05e16c24b833",
            "596f644b8f6d05e16c24b834"
        ]
    }
}
Result fields Description
recordId Record ID
createdAt Time of record creation
fields Field names and values

Create a new record comment

POST /actions/create-comment/{recordId}
Sample request
POST https://nethunt.com/api/v1/zapier/actions/create-comment/596f644b8f6d05e16c24b830
{
    "text": "It's a comment"
}
Request parameters and fields Description Default value
recordId Record ID to create a comment for Required
text Actual comment text Required
Sample result
{
    "commentId": "5970b408bbd55ad726e11bc3",
    "createdAt": "2015-01-01T12:34:15.880Z"
}
Result fields Description
commentId Comment ID
createdAt Time of comment creation

Update a record

POST /zapier/actions/update-record/{recordId}?overwrite={overwrite}
Sample request
POST https://nethunt.com/api/v1/zapier/actions/update-record/596f644b8f6d05e16c24b830
{
    "fieldActions": {
        "Name": {
            "overwrite": true,
            "add": "John Doe"
        },
        "Salary": {
            "remove": 100000,
            "add": 200000
        },
        "Keywords": {
            "remove": [
                "Java"
            ],
            "add": [
                "JavaScript"
            ]
        }
    }
}
Request parameters and fields Description Default value
recordId Record ID Required
overwrite Default "overwrite" setting for the field actions false
fieldActions Names of record fields along with actions to perform Required
Field action fields Description Default value
overwrite Clears existing record field value (do not use with "remove") If missing, the query parameter "overwrite" is used
remove Value(s) to remove (do not use with "overwrite" enabled) Optional
add Value(s) to add to the field. If the field can hold only single value and is not empty, either "remove" or "overwrite" must be used. Optional
Sample result
{
    "recordId": "596f644b8f6d05e16c24b830",
    "updatedAt": "2015-01-05T12:34:15.880Z",
    "fields": {
        "Name": "John Doe",
        "Birthday": "1980-01-01",
        "Employed": true,
        "Salary": 200000,
        "Keywords": [
            "Big Data",
            "JavaScript"
        ],
        "Primary Email Address": "John Doe <john.doe@example.com>",
        "Other Email Addresses": [
            "J. Doe <j.doe@example.com>",
            "J. D. <j.d@example.com>"
        ],
        "Co-workers": [
            "596f64368f6d05e16c24b833",
            "596f644b8f6d05e16c24b834"
        ]
    }
}
Result fields Description
recordId Record ID
updatedAt Time of last record update
fields Field names and values

Link a Gmail thread to a record

POST /actions/link-gmail-thread/{recordId}
Sample request
POST https://nethunt.com/api/v1/zapier/actions/link-gmail-thread/596f644b8f6d05e16c24b830
{
    "gmailThreadId": "1234567890abcdef"
}
Request parameters and fields Description Default value
recordId Record ID to link with an email thread Required
gmailThreadId Gmail conversation ID to link with a record Required
Sample result
{
}

Verify request credentials

GET /triggers/auth-test
Sample request
GET https://nethunt.com/api/v1/zapier/triggers/auth-test
Sample result
[
    {
        "user": {
            "personalName": "John Doe",
            "emailAddress": "<john.doe@example.com>"
        }
    }
]
Result fields Description
user Name and email address of the user who makes the request

NetHunt CRM for Gmail

Your smart Inbox