API:Contact:Images:Get
Contents
API » Get Contact Images
Base URL
Endpoint
/api/contact/images/get/
Purpose
Retrieves images associated with a specific contact in your CallProof company. Use this to obtain image URLs and related source information for a known contact, such as images linked to event forms or custom fields.
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 images 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/images/get/?key=YOUR_API_KEY&secret=YOUR_API_SECRET&contact_id=789"
Successful Response (200)
Returns the images linked to the specified contact. When the contact ID is valid, the response includes image 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 images associated with the contact. |
| results[].via | string | Event form name when the image was captured through an event form. Empty when not applicable. |
| results[].custom_field | string | Custom field name associated with the image when it was not captured through an event form. Empty when not applicable. |
| results[].url | string | Relative URL of the image, or null if no image file is available. |
| results[].created | string | Date and time the image 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": [
{
"via": "Site Visit Form",
"custom_field": "",
"url": "/media/contact_images/789/photo1.jpg",
"created": "2024-06-15 14:30:00"
},
{
"via": "",
"custom_field": "Storefront Photo",
"url": "/media/contact_images/789/storefront.png",
"created": "2024-06-10 09:15:00"
}
],
"errors": {},
"code": 200
}
Notes
- A valid
contact_idbelonging to your company is required. - Up to 50 images are returned for the contact, ordered 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. viais populated when the image came from an event form; otherwise it is empty.custom_fieldis populated when the image is associated with a custom field and was not captured through an event form.- Image URLs are returned as relative paths. Not specified in Swagger whether a full absolute URL is also available.
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
}