Contacts API

Contacts

GET https://api.mothernode.com/contacts

Receive a list of all Contacts

Sample Response:

{
  "contacts": [
   {
      "contact_id": "0000000a-a0a0-00a0-a000-a00a00a0000a",
      "first_name": "Eric",
      "last_name": "Miller",
      "salutation": "",
      "title": "",
      "department": "",
      "email": "",
      "alt_email": null,
      "company_name": null,
      "use_company_default": "0",
      "address1": "1234 Main St.",
      "address2": "PO Box 123",
      "city": "Louisville",
      "state": "KY",
      "zip": "42218",
      "country": "US",
      "tel": null,
      "fax": null,
      "website": "",
      "toll_free": null,
      "contact_birthday": "0000-00-00",
      "contact_tel": "522.123.4567",
      "contact_tel_ext": "",
      "contact_mobile": "",
      "contact_pager": "",
      "contact_fax": "",
      "contact_home": "",
      "is_decision_maker": "0",
      "is_campaign_participant": "0",
      "is_survey_participant": "0",
      "do_not_call": "0",
      "do_not_email": "0",
      "exclude_from_campaign": "0",
      "twitter": "",
      "linkedin": "",
      "assistant": "",
      "contact_ass_email": "",
      "contact_ass_tel": ""
    }
  ]
}


Filter records:

GET https://api.mothernode.com/contacts?email=email@email.com

GET https://api.mothernode.com/contacts?first_name=Bob&last_name=Kelly


GET https://api.mothernode.com/contacts/{id}

Receive a single Contact

GET https://api.mothernode.com/contacts/78683d72-aa24-11e5-ab45-e03f49a0757a

Sample Response:

{
  "contact": {
    "contact_id": "78683d72-aa24-11e5-ab45-e03f49a0757a",
    "first_name": "James",
    "last_name": "Smith",
    "salutation": "Mr.",
    "title": "Office Manager",
    "department": "Accounting",
    "email": "jsmith@test.com",
    "alt_email": null,
    "company_name": null,
    "use_company_default": "0",
    "address1": "3100 Prescot Blvd",
    "address2": null,
    "city": "Dallas",
    "state": "TX",
    "zip": "76122",
    "country": "US",
    "tel": "222-333-3333",
    "fax": null,
    "website": null,
    "toll_free": null,
    "contact_birthday": "0000-00-00",
    "contact_tel": null,
    "contact_tel_ext": null,
    "contact_mobile": null,
    "contact_pager": null,
    "contact_fax": null,
    "contact_home": null,
    "is_decision_maker": "0",
    "is_campaign_participant": "0",
    "is_survey_participant": "0",
    "do_not_call": "0",
    "do_not_email": "0",
    "exclude_from_campaign": "0",
    "twitter": "",
    "linkedin": "",
    "assistant": "",
    "contact_ass_email": "",
    "contact_ass_tel": "",
	"custom_fields": {
      "your_custom_field_1_c10": "Sample 1",
      "your_custom_field_2_c11": "Option 1, Option 2"
    }
  }
}

POST https://api.mothernode.com/contacts

Create a new Contact

{
	"contact": 
	{
		"first_name": "James",
		"last_name": "Smith",
		"salutation": "Mr.",
		"title": "Office Manager",
		"department": "Accounting",
		"email": "jsmith@test.com",
		"address1": "3100 Prescot Blvd",
		"city": "Dallas",
		"state": "TX",
		"zip": "76122",
		"country": "US",
		"tel": "222-333-3333",
		"custom_fields": {
		  "your_custom_field_1_c10": "Sample 1",
		  "your_custom_field_2_c11": "Option 1, Option 2"
		}
	}
}


On success will return status code 201 with response:

{
  "contact": {
    "contact_id": "78683d72-aa24-11e5-ab45-e03f49a0757a",
    "first_name": "James",
    "last_name": "Smith",
    "salutation": "Mr.",
    "title": "Office Manager",
    "department": "Accounting",
    "email": "jsmith@test.com",
    "alt_email": null,
    "company_name": null,
    "use_company_default": "0",
    "address1": "3100 Prescot Blvd",
    "address2": null,
    "city": "Dallas",
    "state": "TX",
    "zip": "76122",
    "country": "US",
    "tel": "222-333-3333",
    "fax": null,
    "website": null,
    "toll_free": null,
    "contact_birthday": "0000-00-00",
    "contact_tel": null,
    "contact_tel_ext": null,
    "contact_mobile": null,
    "contact_pager": null,
    "contact_fax": null,
    "contact_home": null,
    "is_decision_maker": "0",
    "is_campaign_participant": "0",
    "is_survey_participant": "0",
    "do_not_call": "0",
    "do_not_email": "0",
    "exclude_from_campaign": "0",
    "twitter": "",
    "linkedin": "",
    "assistant": "",
    "contact_ass_email": "",
    "contact_ass_tel": "",
	"custom_fields": {
      "your_custom_field_1_c10": "Sample 1",
      "your_custom_field_2_c11": "Option 1, Option 2"
    }
  }
}


PUT https://api.mothernode.com/contacts/{id}

Modify an existing Contact

{
  "contact":
    {
      "last_name": "Smith",
      "address2": "Appt. 201"
    }
}

On success will return status code 200 with response:

{
  "contact": {
    "contact_id": "000f4dba-c057-102b-8953-00188b3d92fd",
    "first_name": "James",
    "last_name": "Smith",
    "salutation": "Mr.",
    "title": "Office Manager",
    "department": "Accounting",
    "email": "jbigalow@test.com",
    "alt_email": null,
    "company_name": null,
    "use_company_default": "1",
    "address1": "3100 Prescot Blvd",
    "address2": "Appt. 2",
    "city": "Dallas",
    "state": "TX",
    "zip": "76122",
    "country": "US",
    "tel": null,
    "fax": null,
    "website": null,
    "toll_free": null,
    "contact_birthday": "0000-00-00",
    "contact_tel": "214-909-3242",
    "contact_tel_ext": "",
    "contact_mobile": "469-831-8282",
    "contact_pager": "",
    "contact_fax": "214-909-3241",
    "contact_home": "",
    "is_decision_maker": "0",
    "is_campaign_participant": "0",
    "is_survey_participant": "0",
    "do_not_call": "0",
    "do_not_email": "0",
    "exclude_from_campaign": "0",
    "twitter": "",
    "linkedin": "",
    "assistant": "",
    "contact_ass_email": "",
    "contact_ass_tel": "",
	"custom_fields": {
      "your_custom_field_1_c10": "Sample 1",
      "your_custom_field_2_c11": "Option 1, Option 2"
    }
  }
}

DELETE https://api.mothernode.com/contacts/{id}

Remove a Contact from the database

Response:

HTTP/1.1 200 OK
{}

GET https://api.mothernode.com/contacts/count

Receive a count of all Contacts

Response:

{
  "record_count": "658"
}

Filter records:

GET https://api.mothernode.com/contacts/count?email=email@email.com
Print Friendly, PDF & Email

Was this article helpful?

Related Articles