👥Contacts
Create/Update/Get contacts within your tenant.
Create contact
POST
https://app.ninjapipe.com/api/v1/contacts/create
Creates a new contact in your workspace.
Make sure to add API_KEY as a header. This is your API Key found in the API & Integrations page.
Request Body
API_KEY
{"category":"Lead","first_name":"Display","last_name":"Picture","picture_url":"https://cdn.pixabay.com/photo/2016/08/08/09/17/avatar-1577909_1280.png","email":"[email protected]","organization":"Example Corp.","phone":null,"address":"123 Main St.","state":"CA","zip_code":"12345","country":"USA","timezone":"America/Los_Angeles","currency":"USD","industry":"Technology","company_size":"100-500","position":"CEO","revenue":"10M-50M","mrr":"100K-500K","churn":"5%","lead_source":"Website","lead_status":"New","instagram":"johndoe","tiktok":"johndoe","facebook":"johndoe","twitter":"johndoe","linkedIn":"testin","by_phone":true,"by_email":true,"by_text":false,"by_social":true}
POST /api/v1/contacts/create HTTP/1.1
Host: app.ninjapipe.com
Authorization: noauth YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 681
{
"category": "Lead",
"first_name": "Display",
"last_name": "Picture",
"picture_url": "https://cdn.pixabay.com/photo/2016/08/08/09/17/avatar-1577909_1280.png",
"email": "[email protected]",
"organization": "Example Corp.",
"phone": null,
"address": "123 Main St.",
"state": "CA",
"zip_code": "12345",
"country": "USA",
"timezone": "America/Los_Angeles",
"currency": "USD",
"industry": "Technology",
"company_size": "100-500",
"position": "CEO",
"revenue": "10M-50M",
"mrr": "100K-500K",
"churn": "5%",
"lead_source": "Website",
"lead_status": "New",
"instagram": "johndoe",
"tiktok": "johndoe",
"facebook": "johndoe",
"twitter": "johndoe",
"linkedIn": "testin",
"by_phone": true,
"by_email": true,
"by_text": false,
"by_social": true
}
Successful response
No content
Update a contact
PUT
https://app.ninjapipe.com/api/v1/contacts/{contact_id}/update
API_KEY
{"category":"Nurtured","first_name":"Display","last_name":"Picture","picture_url":"https://cdn.pixabay.com/photo/2016/08/08/09/17/avatar-1577909_1280.png","email":"[email protected]","organization":"Example Corp.","address":"123 Main St.","state":"CA","zip_code":"12345","country":"USA","timezone":"America/Los_Angeles","currency":"USD","industry":"Technology","company_size":"100-500","position":"CEO","revenue":"10M-50M","mrr":"100K-500K","churn":"5%","lead_source":"Website","lead_status":"New","instagram":"johndoe","tiktok":"johndoe","facebook":"johndoe","twitter":"johndoe","linkedIn":"testin","by_phone":true,"by_email":true,"by_text":false,"by_social":true,"has_client_portal":false,"company_phone":null,"whatsapp":null,"phone_code":"0","account_type":"client","phone":""}
PUT /api/v1/contacts/15857/update HTTP/1.1
Host: app.ninjapipe.com
Authorization: noauth YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 787
{
"category": "Nurtured",
"first_name": "Display",
"last_name": "Picture",
"picture_url": "https://cdn.pixabay.com/photo/2016/08/08/09/17/avatar-1577909_1280.png",
"email": "[email protected]",
"organization": "Example Corp.",
"address": "123 Main St.",
"state": "CA",
"zip_code": "12345",
"country": "USA",
"timezone": "America/Los_Angeles",
"currency": "USD",
"industry": "Technology",
"company_size": "100-500",
"position": "CEO",
"revenue": "10M-50M",
"mrr": "100K-500K",
"churn": "5%",
"lead_source": "Website",
"lead_status": "New",
"instagram": "johndoe",
"tiktok": "johndoe",
"facebook": "johndoe",
"twitter": "johndoe",
"linkedIn": "testin",
"by_phone": true,
"by_email": true,
"by_text": false,
"by_social": true,
"has_client_portal": false,
"company_phone": null,
"whatsapp": null,
"phone_code": "0",
"account_type": "client",
"phone": ""
}
Successful response
No content
GET
https://app.ninjapipe.com/api/v1/contacts/get?contact_id={contact_id}
15857
API_KEY
GET /api/v1/contacts/get HTTP/1.1
Host: app.ninjapipe.com
Authorization: noauth YOUR_SECRET_TOKEN
Accept: */*
Successful response
No content
Get all contacts
GET
https://app.ninjapipe.com/api/v1/contacts/getall
Parameters:
only_body = true
- This will send the body without the status/content/message formatpage
- You can paginate with this parameter starting from 0. Increment and send this to fetch pagesrows_per_page
- You can define how many contacts will be returned with each page above
Get contact
false
API_KEY
GET /api/v1/contacts/getall HTTP/1.1
Host: app.ninjapipe.com
Authorization: noauth YOUR_SECRET_TOKEN
Accept: */*
Successful response
No content
Search contact
You can search for contacts using the following API.
GET
https://app.ninjapipe.com/api/v1/contacts/search?search_term=YOUR_KEYWORD
Parameters:
search_term - Send any keyword you'd like to search. The search API matches first and last names, emails and phone numbers.
only_body - Sends only the body of the result and avoids the status and message in the response
Delete contact
Add Comment
Add a comment to a contact.
POST
https://app.ninjapipe.com/api/v1/pipelines/add-comment
Request Body
{
"comment_text": "Test comment from API",
"module_type": "contact", //hardcode this
"module_id": 123 //contact's ID
}
Headers
API_KEY
Last updated