Contact
Endpoint GET /projects/:projectId/contacts/:contactId
Retrieve a project's contact data by id.
Path Parameters
Required
projectId
- The project's id.contactId
- The contact's id.
Example Request:
- curl
- Node.js
curl -H "Authorization: Bearer ACCESS_TOKEN" "https://api.commoninja.com/platform/api/v1/projects/894f5aed-29f5-46c5-9f26-022bfccc5292/contacts/894f5aed-29f5-46c5-9f26-022bfccc5292"
const axios = require('axios');
async function getData() {
const response = await axios.get('https://api.commoninja.com/platform/api/v1/projects/894f5aed-29f5-46c5-9f26-022bfccc5292/contacts/894f5aed-29f5-46c5-9f26-022bfccc5292', {
headers: {
'Authorization': 'Bearer ACCESS_TOKEN'
},
});
return response.data;
}
getData();
Example Response:
{
"contactId": "894f5aed-29f5-46c5-9f26-022bfccc5292",
"projectId": "894f5aed-29f5-46c5-9f26-022bfccc5292",
"email": "[email protected]",
"phone": "+1234567890",
"name": "John Doe",
"thumbnail": "https://example.com/thumbnail.jpg",
"address": "123 Main St, Anytown, USA",
"company": "Acme Inc.",
"source": "Website",
"notes": ["Note 1", "Note 2"],
"created": "2023-04-25T09:44:42.842Z",
"updated": "2023-04-25T09:44:42.842Z"
}