API:Contact:Email:Get
Contents
API » Get Contact Emails
Base URL
Endpoint
/api/contact/email/messages/get/
Purpose
Retrieves email messages associated with a specific contact in your CallProof company. Use this to obtain recent email activity for a known contact, including subject, send date, direction, attachments, and the sales representative linked to each message.
HTTP Method
GET
Headers
No required headers.
| Header | Required | Description |
|---|---|---|
| — | — | No headers are required for this endpoint. Authentication is provided via query parameters. |
Security
- Yes – Requires a valid API key and secret with permission to read contacts.
Parameters
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| key | string | Yes | Public API key assigned to your CallProof account. |
| secret | string | Yes | Private API secret paired with the API key. |
| contact_id | integer | Yes | Unique identifier of the contact whose email messages should be retrieved. Must belong to your company. |
Path Parameters
None.
Request Body
None.
cURL Example
curl -X GET "https://app.callproof.com/api/contact/email/messages/get/?key=YOUR_API_KEY&secret=YOUR_API_SECRET&contact_id=789"
Successful Response (200)
Returns email messages linked to the specified contact. When the contact ID is valid, the response includes message details. When the contact ID is missing or invalid, the request may still return status 200 with validation details in errors and an empty results list.
| Field | Type | Description |
|---|---|---|
| results | array | List of email messages associated with the contact. |
| results[].email_message_id | integer | Unique identifier for the email message. |
| results[].rep | object or null | Profile of the sales representative associated with the message. |
| results[].rep.id | integer | Rep profile identifier. |
| results[].rep.email | string | Rep email address. |
| results[].rep.user_id | integer | Associated user account identifier. |
| results[].rep.name | string | Rep display name. |
| results[].rep.title | string | Rep job title. |
| results[].rep.updated | string | Date and time the rep profile was last updated. |
| results[].contact | string | Display name of the associated contact. |
| results[].contact_id | integer | Unique identifier of the associated contact. |
| results[].contact_company_name | string | Name of the company associated with the contact. |
| results[].inbox | string | 1 if the message is an inbound/inbox message; 0 if outbound/sent.
|
| results[].subject | string | Email subject line. |
| results[].has_files | string | 1 if the message has attachments; otherwise 0.
|
| results[].files | array | Attachments associated with the email message. |
| results[].files[].user_file_id | integer | Unique identifier for the attachment file. |
| results[].files[].name | string | Original file name. |
| results[].files[].url | string | URL that can be used to access or download the file. |
| results[].files[].is_shared | string | 1 if the file is shared; otherwise 0.
|
| results[].files[].rep | object or null | Profile of the user associated with the file. |
| results[].files[].reps | array | Sales representatives with whom the file is shared. |
| results[].files[].created | string | Date and time the file was created. |
| results[].files[].updated | string | Date and time the file was last updated. |
| results[].send_date | string | Date and time the email was sent (YYYY-MM-DD HH:MM:SS).
|
| results[].created | string | Date and time the email record was created (YYYY-MM-DD HH:MM:SS).
|
| errors | object | Empty object when the request succeeds. May contain validation messages when the contact ID is invalid. |
| code | integer | HTTP-style status value; 200 on success.
|
Example response:
{
"results": [
{
"email_message_id": 9001,
"rep": {
"id": 123,
"email": "rep@example.com",
"user_id": 456,
"name": "Jane Smith",
"title": "Account Executive",
"updated": "2024-06-01 10:00:00"
},
"contact": "John Doe",
"contact_id": 789,
"contact_company_name": "Acme Corp",
"inbox": "1",
"subject": "Follow-up on proposal",
"has_files": "1",
"files": [
{
"user_file_id": 501,
"name": "proposal.pdf",
"url": "/user_files/ab/cd/ef/gh/abcdef...",
"is_shared": "0",
"rep": null,
"reps": [],
"updated": "2024-06-15 14:30:00",
"created": "2024-06-15 14:30:00"
}
],
"send_date": "2024-06-15 14:30:00",
"created": "2024-06-15 14:31:00"
}
],
"errors": {},
"code": 200
}
Notes
- A valid
contact_idbelonging to your company is required. - Up to 50 email messages are returned for the contact, ordered by send date from newest to oldest.
- If the contact ID is missing or invalid, the response may still return
200with an emptyresultslist and a validation message inerrors. inboxindicates message direction:1for inbound messages and0for outbound messages.- Attachment details are included when
has_filesis1. - The full email body content is not included in this response. Not specified in Swagger.
Error Responses
| Status Code | Meaning |
|---|---|
| 200 | Validation issue – The contact ID is missing or invalid. The response includes an errors object and an empty results list.
|
| 401 | Unauthorized – The API key and/or secret is missing, invalid, inactive, associated with a disabled account, or lacks permission to read contacts. |
| 405 | Method Not Allowed – A method other than GET was used. |
| 500 | Internal Server Error – An unexpected server problem occurred. Not specified in Swagger. |
200 validation response example:
{
"results": [],
"errors": {
"contact_id": "Valid contact id required"
},
"code": 200
}
401 response body example:
{
"results": [],
"errors": ["Invalid API Key"],
"code": 401
}
405 response body example:
{
"results": [],
"errors": ["Method not allowed"],
"code": 405
}