API:Contact:Files:Get
Contents
API » Get Contact Files
Base URL
Endpoint
/api/contact/files/created/
Purpose
Retrieves files associated with a specific contact in your CallProof company. Use this to obtain the file list for a known contact, including file name, download URL, who uploaded the file, and which sales representatives the file is shared with.
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 files 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/files/created/?key=YOUR_API_KEY&secret=YOUR_API_SECRET&contact_id=789"
Successful Response (200)
Returns the files linked to the specified contact. When the contact ID is valid, the response includes file 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 files associated with the contact. |
| results[].user_file_id | integer | Unique identifier for the file. |
| results[].name | string | Original file name. |
| results[].url | string | URL that can be used to access or download the file. |
| results[].is_shared | string | 1 if the file is shared with one or more sales representatives; otherwise 0.
|
| results[].rep | object or null | Profile of the user who uploaded the file. |
| 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[].reps | array | Sales representatives with whom the file is shared. |
| results[].created | string | Date and time the file was created (YYYY-MM-DD HH:MM:SS).
|
| results[].updated | string | Date and time the file was last updated (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": [
{
"user_file_id": 501,
"name": "proposal.pdf",
"url": "/user_files/ab/cd/ef/gh/abcdef...",
"is_shared": "1",
"rep": {
"id": 123,
"email": "rep@example.com",
"user_id": 456,
"name": "Jane Smith",
"title": "Account Executive",
"updated": "2024-06-01 10:00:00"
},
"reps": [
{
"id": 124,
"email": "manager@example.com",
"user_id": 457,
"name": "Alex Manager",
"title": "Sales Manager",
"updated": "2024-06-02 11:00:00"
}
],
"updated": "2024-06-15 14:30:00",
"created": "2024-06-15 14:30:00"
}
],
"errors": {},
"code": 200
}
Notes
- Despite the route name, this endpoint returns files currently associated with a contact. It does not filter by a creation date range.
- A valid
contact_idbelonging to your company is required. - Up to 50 files 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. - Shared-file details are included so you can see which sales representatives have access to each file.
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
}