Contacts
Get Contacts
GET /v2/contacts/[contact_id]
Optional Parameters
- contact_id - If omitted then a list of contacts will be returned.
- client_id - Show contacts for a particular client
- limit - Limit number of records returned. Maximum 1000 records
- offset - Start position for fetching records
Sample Response - Single Client
{
"data": [
{
"contact_id": "1",
"contact_name": "John Doe",
"email": "john@example.com",
"tel": "555 1234 567",
"fax": "",
"mobile": "",
"role": "",
"company_name": "Acme Corp",
"client_id": "1",
"date_created": "2014-09-19 17:04:41",
"date_modified": "2014-09-19 16:04:41",
"user_id": "1234"
}
]
}
"data": [
{
"contact_id": "1",
"contact_name": "John Doe",
"email": "john@example.com",
"tel": "555 1234 567",
"fax": "",
"mobile": "",
"role": "",
"company_name": "Acme Corp",
"client_id": "1",
"date_created": "2014-09-19 17:04:41",
"date_modified": "2014-09-19 16:04:41",
"user_id": "1234"
}
]
}
Sample Response - Multiple Contacts
{
"paging": {
"offset": 0,
"limit": 1000,
"total_records": 2
},
"data": [
{
"contact_id": "1",
"contact_name": "John Doe",
"email": "john@example.com",
"tel": "555 1234 567",
"fax": "",
"mobile": "",
"role": "",
"company_name": "Acme Corp",
"client_id": "1",
"date_created": "2014-09-19 17:04:41",
"date_modified": "2014-09-19 16:04:41",
"user_id": "1234"
},
{
"contact_id": "1",
"contact_name": "Jane Doe",
"email": "jane@example.com",
"tel": "555 1234 566",
"fax": "",
"mobile": "",
"role": "",
"company_name": "Acme Corp",
"client_id": "1",
"date_created": "2014-09-18 12:04:41",
"date_modified": "2014-09-18 13:04:41",
"user_id": "1234"
}
]
}
"paging": {
"offset": 0,
"limit": 1000,
"total_records": 2
},
"data": [
{
"contact_id": "1",
"contact_name": "John Doe",
"email": "john@example.com",
"tel": "555 1234 567",
"fax": "",
"mobile": "",
"role": "",
"company_name": "Acme Corp",
"client_id": "1",
"date_created": "2014-09-19 17:04:41",
"date_modified": "2014-09-19 16:04:41",
"user_id": "1234"
},
{
"contact_id": "1",
"contact_name": "Jane Doe",
"email": "jane@example.com",
"tel": "555 1234 566",
"fax": "",
"mobile": "",
"role": "",
"company_name": "Acme Corp",
"client_id": "1",
"date_created": "2014-09-18 12:04:41",
"date_modified": "2014-09-18 13:04:41",
"user_id": "1234"
}
]
}
Example Calls
Get all contacts
curl -X GET "https://api.projectbubble.com/v2/contacts" \
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8"
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8"
Get all contacts for a specific client
curl -X GET "https://api.projectbubble.com/v2/contacts?client_id=1" \
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8"
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8"
Response Codes
200 - OK or "No records found"
401 - Permission error. Your user account (API Key) does not have permission to access contacts.
401 - Permission error. Your user account (API Key) does not have permission to access contacts.
Create Contact
POST /v2/contacts
Required Parameters
- contact_name - Contact name
- Optional Parameters
- email - Email
- tel - Tel
- fax - Fax
- mobile - Mobile
- role - Role
- company_name - Company name
- client_id - Client ID
- user_id - Creator user ID
Sample Response
{
"data": [
{
"contact_id": "1",
"contact_name": "John Doe",
"email": "john@example.com",
"tel": "555 1234 567",
"fax": "",
"mobile": "",
"role": "",
"company_name": "Acme Corp",
"client_id": "1",
"date_created": "2014-09-19 17:04:41",
"date_modified": "2014-09-19 16:04:41",
"user_id": "1234"
}
]
}
"data": [
{
"contact_id": "1",
"contact_name": "John Doe",
"email": "john@example.com",
"tel": "555 1234 567",
"fax": "",
"mobile": "",
"role": "",
"company_name": "Acme Corp",
"client_id": "1",
"date_created": "2014-09-19 17:04:41",
"date_modified": "2014-09-19 16:04:41",
"user_id": "1234"
}
]
}
Example Calls
Get all contacts
curl -X POST "https://api.projectbubble.com/v2/contacts" \
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8" \
-d '{"contact_name": "John Doe", "email": "john@example.com", \
"tel": "555 1234 567", "company_name": "Acme Corp"}'
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8" \
-d '{"contact_name": "John Doe", "email": "john@example.com", \
"tel": "555 1234 567", "company_name": "Acme Corp"}'
Response Codes
201 - Created OK
401 - Permission error. Your user account (API Key) does not have permission to access contacts.
404 - Contacts not found
401 - Permission error. Your user account (API Key) does not have permission to access contacts.
404 - Contacts not found
Update Contact
PUT /v2/contacts/[contact_id]
Required Parameters
- contact_id - Contact id
Optional Parameters
- email - Email
- tel - Tel
- fax - Fax
- mobile - Mobile
- role - Role
- company_name - Company name
- client_id - Client ID
- user_id - Creator user ID
Sample Response
{
"data": [
{
"contact_id": "1",
"contact_name": "Jack Doe",
"email": "john@example.com",
"tel": "555 1234 567",
"fax": "",
"mobile": "",
"role": "",
"company_name": "Acme Corp",
"client_id": "1",
"date_created": "2014-09-19 17:04:41",
"date_modified": "2014-09-19 16:04:41",
"user_id": "1234"
}
]
}
"data": [
{
"contact_id": "1",
"contact_name": "Jack Doe",
"email": "john@example.com",
"tel": "555 1234 567",
"fax": "",
"mobile": "",
"role": "",
"company_name": "Acme Corp",
"client_id": "1",
"date_created": "2014-09-19 17:04:41",
"date_modified": "2014-09-19 16:04:41",
"user_id": "1234"
}
]
}
Example Calls
curl -X PUT "https://api.projectbubble.com/v2/contacts" \
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8" \
-d '{"contact_name": "Jack Doe"}
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8" \
-d '{"contact_name": "Jack Doe"}
Response Codes
200 - OK
401 - Permission error. Your user account (API Key) does not have permission to access contacts.
404 - Contacts not found
401 - Permission error. Your user account (API Key) does not have permission to access contacts.
404 - Contacts not found
Delete Contact
DELETE /v2/contacts/[contact_id]
Sample Response
[]
Example Calls
curl -X DELETE "https://api.projectbubble.com/v2/contacts/1" \
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8"
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8"
Response Codes
200 - OK
401 - Permission error. Your user account (API Key) does not have permission to access contacts.
404 - Contacts not found
401 - Permission error. Your user account (API Key) does not have permission to access contacts.
404 - Contacts not found
© 2005 - 2024 ProProfs