Difference between revisions of "API:Contacts:Created"

From docs
Jump to: navigation, search
(Created page with " == API » Created Contacts == '''URL:''' <nowiki>https://app.callproof.com/api/contacts/created/</nowiki> '''Method:''' GET '''Required Fields:''' * '''''key'''''...")
 
Line 2: Line 2:
 
== [[API]] &#187; Created Contacts ==
 
== [[API]] &#187; Created Contacts ==
  
'''URL:''' <nowiki>https://app.callproof.com/api/contacts/created/</nowiki>
+
== Get Contacts Created ==
  
'''Method:''' GET
+
=== Base URL ===
 +
https://app.callproof.com
  
'''Required Fields:'''
+
=== Endpoint ===
 +
/api/contacts/created/
  
* '''''key''''' - API Key
+
=== Purpose ===
* '''''secret''''' - API Key Secret
+
Retrieves contacts created within a specified date range for your CallProof company. Supports pagination so large volumes of contacts can be synced in batches. Typically used to keep external systems in sync with newly created contacts, including phone numbers, assigned reps, and custom field values.
* '''''after''''' - Date/Time Contacts were created after (e.g. '2014-08-10 12:34:56')
 
  
'''Optional Fields:'''
+
=== HTTP Method ===
 +
GET
  
* '''''before''''' - Date/Time Contacts were created after (e.g. '2014-08-10 12:34:56')
+
=== Headers ===
* '''''offset''''' - Only 10 Contacts are returned per request, this field must be used to pull additional results when more are available
+
No required headers.
  
'''Data Returned:'''
+
{| class="wikitable"
 +
! Header !! Required !! Description
 +
|-
 +
| — || — || No headers are required for this endpoint. Authentication is provided via query parameters.
 +
|}
  
* '''''results''''' - Array of Contacts
+
=== Security ===
* '''''more''''' - This field will be set if additional results are available
+
* '''Yes''' – Requires a valid API key and secret with permission to read contacts.
* '''''offset''''' - Current offset of the request
+
 
* '''''errors''''' - Array of errors produced by the request
+
=== Parameters ===
* '''''code''''' - HTTP request status
+
 
 +
==== Query Parameters ====
 +
 
 +
{| class="wikitable"
 +
! 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.
 +
|-
 +
| after || datetime string || Yes || Return only contacts created on or after this date/time.
 +
|-
 +
| before || datetime string || No || Return only contacts created on or before this date/time.
 +
|-
 +
| offset || integer || No || Starting position for paginated results. Defaults to <code>0</code>.
 +
|}
 +
 
 +
==== Path Parameters ====
 +
None.
 +
 
 +
==== Request Body ====
 +
None.
 +
 
 +
=== cURL Example ===
 +
 
 +
<pre>
 +
curl -X GET "https://app.callproof.com/api/contacts/created/?key=YOUR_API_KEY&secret=YOUR_API_SECRET&after=2024-01-01"
 +
</pre>
 +
 
 +
=== Successful Response (200) ===
 +
 
 +
Returns a paginated list of contacts created within the requested date range. Up to 100 contacts are returned per request. If more matching contacts exist, <code>more</code> is set to <code>1</code> so the caller can request the next page using <code>offset</code>.
 +
 
 +
{| class="wikitable"
 +
! Field !! Type !! Description
 +
|-
 +
| results || array || List of contact objects (maximum 100 per response).
 +
|-
 +
| more || integer || <code>1</code> if additional contacts remain; otherwise <code>0</code>.
 +
|-
 +
| offset || integer || Offset used for this response.
 +
|-
 +
| errors || array || Empty when the request succeeds.
 +
|-
 +
| code || integer || HTTP-style status code (<code>200</code> on success).
 +
|}
 +
 
 +
==== Contact Object Fields ====
 +
 
 +
{| class="wikitable"
 +
! Field !! Type !! Description
 +
|-
 +
| id || integer || Unique contact identifier.
 +
|-
 +
| company || string || Company name.
 +
|-
 +
| contact_phones || array || Contact phone records.
 +
|-
 +
| created_by || string || User who created the contact.
 +
|-
 +
| created_by_id || integer || Creator user ID.
 +
|-
 +
| created_by_email || string || Creator email address.
 +
|-
 +
| contact_type || string || Contact type.
 +
|-
 +
| title || string || Contact title.
 +
|-
 +
| first_name || string || First name.
 +
|-
 +
| last_name || string || Last name.
 +
|-
 +
| email || string || Email address.
 +
|-
 +
| address || string || Street address.
 +
|-
 +
| address2 || string || Secondary address.
 +
|-
 +
| city || string || City.
 +
|-
 +
| state || string || State or province.
 +
|-
 +
| zip || string || ZIP/postal code.
 +
|-
 +
| country || string || Country.
 +
|-
 +
| website || string || Website URL.
 +
|-
 +
| latitude || string || Latitude.
 +
|-
 +
| longitude || string || Longitude.
 +
|-
 +
| last_contacted || string || Last contact date/time.
 +
|-
 +
| default_phone || object || Default phone information.
 +
|-
 +
| account || string || Account identifier.
 +
|-
 +
| invoice || string || Invoice value.
 +
|-
 +
| unknown || integer || Unknown contact flag.
 +
|-
 +
| assigned || integer || Assigned flag.
 +
|-
 +
| do_not_sms || integer || SMS restriction flag.
 +
|-
 +
| updated || string || Last updated date/time.
 +
|-
 +
| created || string || Created date/time.
 +
|-
 +
| custom_fields || array || Contact custom fields.
 +
|-
 +
| reps || array || Assigned sales representatives.
 +
|}
 +
 
 +
==== Contact Phone Object Fields ====
 +
 
 +
{| class="wikitable"
 +
! Field !! Type !! Description
 +
|-
 +
| id || integer || Phone record identifier.
 +
|-
 +
| last_contacted || string || Last contacted date/time.
 +
|-
 +
| unknown || integer || Unknown phone flag.
 +
|-
 +
| do_not_call || integer || Do Not Call flag.
 +
|-
 +
| contact_id || integer || Contact identifier.
 +
|-
 +
| contact || string || Contact name.
 +
|-
 +
| phone_type || string || Phone type.
 +
|-
 +
| phone_number || string || Phone number.
 +
|-
 +
| ext || string || Extension.
 +
|-
 +
| activated || string || Activation date.
 +
|-
 +
| eligible || string || Eligibility date.
 +
|-
 +
| call_result || string || Last call result.
 +
|-
 +
| hidden || integer || Hidden flag.
 +
|-
 +
| dealer_store || string || Dealer/store.
 +
|-
 +
| model || string || Model.
 +
|-
 +
| updated || string || Updated date/time.
 +
|-
 +
| created || string || Created date/time.
 +
|}
 +
 
 +
==== Custom Field Object Fields ====
 +
 
 +
{| class="wikitable"
 +
! Field !! Type !! Description
 +
|-
 +
| id || integer || Custom field identifier.
 +
|-
 +
| name || string || Custom field name.
 +
|-
 +
| value || string || Display value.
 +
|-
 +
| value_id || string || Selected option identifier.
 +
|}
 +
 
 +
==== Rep Object Fields ====
 +
 
 +
{| class="wikitable"
 +
! Field !! Type !! Description
 +
|-
 +
| id || integer || Rep identifier.
 +
|-
 +
| email || string || Rep email.
 +
|-
 +
| user_id || integer || Associated user ID.
 +
|-
 +
| name || string || Rep name.
 +
|-
 +
| title || string || Rep title.
 +
|-
 +
| updated || string || Last updated date/time.
 +
|}
 +
 
 +
==== Example Response ====
 +
 
 +
<pre>
 +
{
 +
  "results": [
 +
    {
 +
      "id": 789,
 +
      "company": "Acme Corp",
 +
      ...
 +
    }
 +
  ],
 +
  "more": 0,
 +
  "offset": 0,
 +
  "errors": [],
 +
  "code": 200
 +
}
 +
</pre>
 +
 
 +
=== Error Responses ===
 +
 
 +
{| class="wikitable"
 +
! Status Code !! Meaning
 +
|-
 +
| 400 || Bad Request – The required <code>after</code> parameter is missing or invalid.
 +
|-
 +
| 401 || Unauthorized – Invalid or missing API credentials.
 +
|-
 +
| 405 || Method Not Allowed – Only GET is supported.
 +
|-
 +
| 500 || Internal Server Error – Unexpected server error.
 +
|}
 +
 
 +
'''400 response body example:'''
 +
 
 +
<pre>
 +
{
 +
  "results": [],
 +
  "errors": ["Invalid 'after' field"],
 +
  "code": 400
 +
}
 +
</pre>
 +
 
 +
'''401 response body example:'''
 +
 
 +
<pre>
 +
{
 +
  "results": [],
 +
  "errors": ["Invalid API Key"],
 +
  "code": 401
 +
}
 +
</pre>
 +
 
 +
'''405 response body example:'''
 +
 
 +
<pre>
 +
{
 +
  "results": [],
 +
  "errors": ["Method not allowed"],
 +
  "code": 405
 +
}
 +
</pre>

Revision as of 08:36, 17 July 2026

API » Created Contacts

Get Contacts Created

Base URL

https://app.callproof.com

Endpoint

/api/contacts/created/

Purpose

Retrieves contacts created within a specified date range for your CallProof company. Supports pagination so large volumes of contacts can be synced in batches. Typically used to keep external systems in sync with newly created contacts, including phone numbers, assigned reps, and custom field values.

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.
after datetime string Yes Return only contacts created on or after this date/time.
before datetime string No Return only contacts created on or before this date/time.
offset integer No Starting position for paginated results. Defaults to 0.

Path Parameters

None.

Request Body

None.

cURL Example

curl -X GET "https://app.callproof.com/api/contacts/created/?key=YOUR_API_KEY&secret=YOUR_API_SECRET&after=2024-01-01"

Successful Response (200)

Returns a paginated list of contacts created within the requested date range. Up to 100 contacts are returned per request. If more matching contacts exist, more is set to 1 so the caller can request the next page using offset.

Field Type Description
results array List of contact objects (maximum 100 per response).
more integer 1 if additional contacts remain; otherwise 0.
offset integer Offset used for this response.
errors array Empty when the request succeeds.
code integer HTTP-style status code (200 on success).

Contact Object Fields

Field Type Description
id integer Unique contact identifier.
company string Company name.
contact_phones array Contact phone records.
created_by string User who created the contact.
created_by_id integer Creator user ID.
created_by_email string Creator email address.
contact_type string Contact type.
title string Contact title.
first_name string First name.
last_name string Last name.
email string Email address.
address string Street address.
address2 string Secondary address.
city string City.
state string State or province.
zip string ZIP/postal code.
country string Country.
website string Website URL.
latitude string Latitude.
longitude string Longitude.
last_contacted string Last contact date/time.
default_phone object Default phone information.
account string Account identifier.
invoice string Invoice value.
unknown integer Unknown contact flag.
assigned integer Assigned flag.
do_not_sms integer SMS restriction flag.
updated string Last updated date/time.
created string Created date/time.
custom_fields array Contact custom fields.
reps array Assigned sales representatives.

Contact Phone Object Fields

Field Type Description
id integer Phone record identifier.
last_contacted string Last contacted date/time.
unknown integer Unknown phone flag.
do_not_call integer Do Not Call flag.
contact_id integer Contact identifier.
contact string Contact name.
phone_type string Phone type.
phone_number string Phone number.
ext string Extension.
activated string Activation date.
eligible string Eligibility date.
call_result string Last call result.
hidden integer Hidden flag.
dealer_store string Dealer/store.
model string Model.
updated string Updated date/time.
created string Created date/time.

Custom Field Object Fields

Field Type Description
id integer Custom field identifier.
name string Custom field name.
value string Display value.
value_id string Selected option identifier.

Rep Object Fields

Field Type Description
id integer Rep identifier.
email string Rep email.
user_id integer Associated user ID.
name string Rep name.
title string Rep title.
updated string Last updated date/time.

Example Response

{
  "results": [
    {
      "id": 789,
      "company": "Acme Corp",
      ...
    }
  ],
  "more": 0,
  "offset": 0,
  "errors": [],
  "code": 200
}

Error Responses

Status Code Meaning
400 Bad Request – The required after parameter is missing or invalid.
401 Unauthorized – Invalid or missing API credentials.
405 Method Not Allowed – Only GET is supported.
500 Internal Server Error – Unexpected server error.

400 response body example:

{
  "results": [],
  "errors": ["Invalid 'after' field"],
  "code": 400
}

401 response body example:

{
  "results": [],
  "errors": ["Invalid API Key"],
  "code": 401
}

405 response body example:

{
  "results": [],
  "errors": ["Method not allowed"],
  "code": 405
}