Difference between revisions of "API:Contacts:Created"

From docs
Jump to: navigation, search
Line 277: Line 277:
 
}
 
}
 
</pre>
 
</pre>
 +
 +
=== Notes ===
 +
 +
* Returns only contacts created within the specified date range.
 +
* Results are limited to a maximum of <code>100</code> contacts per request.
 +
* If additional matching contacts are available, the response sets <code>more</code> to <code>1</code>. Use the returned <code>offset</code> value to retrieve the next page of results.
 +
* The <code>before</code> parameter is optional. If omitted, all contacts created on or after the specified <code>after</code> date are returned.
 +
* Each contact record may include associated phone numbers, assigned sales representatives, and visible custom field values.
 +
* The <code>default_phone</code> object identifies the contact's default phone number when one has been configured.
 +
* Only custom fields visible to the authenticated company are returned.
 +
* Dates and times are returned in the format <code>YYYY-MM-DD HH:MM:SS</code>.
 +
* Authentication is performed using the <code>key</code> and <code>secret</code> query parameters.
 +
* Only contacts that belong to the authenticated company are returned.

Revision as of 08:37, 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
}

Notes

  • Returns only contacts created within the specified date range.
  • Results are limited to a maximum of 100 contacts per request.
  • If additional matching contacts are available, the response sets more to 1. Use the returned offset value to retrieve the next page of results.
  • The before parameter is optional. If omitted, all contacts created on or after the specified after date are returned.
  • Each contact record may include associated phone numbers, assigned sales representatives, and visible custom field values.
  • The default_phone object identifies the contact's default phone number when one has been configured.
  • Only custom fields visible to the authenticated company are returned.
  • Dates and times are returned in the format YYYY-MM-DD HH:MM:SS.
  • Authentication is performed using the key and secret query parameters.
  • Only contacts that belong to the authenticated company are returned.