👥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.

Request Body

Create Contact

post
Authorizations
Header parameters
API_KEYstringOptionalExample: API_KEY
Body
objectOptionalExample: {"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":"kohli.does34@example.com","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}
Responses
post
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": "kohli.does34@example.com",
  "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
}
200

Successful response

No content

Update a contact

PUThttps://app.ninjapipe.com/api/v1/contacts/{contact_id}/update

Update Contact

put
Authorizations
Header parameters
API_KEYstringOptionalExample: API_KEY
Body
objectOptionalExample: {"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":"kohli.does34@example.com","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":""}
Responses
put
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": "kohli.does34@example.com",
  "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": ""
}
200

Successful response

No content

GEThttps://app.ninjapipe.com/api/v1/contacts/get?contact_id={contact_id}

Get Contact

get
Authorizations
Query parameters
contact_idintegerOptionalExample: 15857
Header parameters
API_KEYstringOptionalExample: API_KEY
Responses
get
GET /api/v1/contacts/get HTTP/1.1
Host: app.ninjapipe.com
Authorization: noauth YOUR_SECRET_TOKEN
Accept: */*
200

Successful response

No content

Get all contacts

GEThttps://app.ninjapipe.com/api/v1/contacts/getall

Parameters:

  • only_body = true - This will send the body without the status/content/message format

  • page - You can paginate with this parameter starting from 0. Increment and send this to fetch pages

  • rows_per_page - You can define how many contacts will be returned with each page above

Get contact

Get Contacts

get
Authorizations
Query parameters
only_bodybooleanOptionalExample: false
Header parameters
API_KEYstringOptionalExample: API_KEY
Responses
get
GET /api/v1/contacts/getall HTTP/1.1
Host: app.ninjapipe.com
Authorization: noauth YOUR_SECRET_TOKEN
Accept: */*
200

Successful response

No content

Search contact

You can search for contacts using the following API.

GEThttps://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

Currently, deleting a contact is not supported via the API. You may use the web or mobile platform to initiate a contact deletion

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