API:ContactPhones:Get

From docs
Revision as of 11:38, 17 July 2026 by Ashley DeBon (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

API » Get Contact Phones

Base URL

https://app.callproof.com

Endpoint

/api/contact_phones/get/

Purpose

Retrieves all phone numbers associated with a specific contact in your CallProof company. Use this when you need the complete phone list for a known contact, including phone type, status flags, and related details.

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 contact phones.

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.
id integer Yes Unique identifier of the contact whose phone numbers 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_phones/get/?key=YOUR_API_KEY&secret=YOUR_API_SECRET&id=789"

Successful Response (200)

Returns all phone numbers linked to the specified contact.

Field Type Description
results array List of contact phone objects for the specified contact.
results[].id integer Unique identifier for the phone number.
results[].last_contacted string Date and time this phone was last contacted (YYYY-MM-DD HH:MM:SS), or empty if none.
results[].unknown integer 1 if marked unknown; otherwise 0.
results[].do_not_call integer 1 if do-not-call is enabled; otherwise 0.
results[].contact_id integer Associated contact identifier.
results[].contact string Contact display name.
results[].phone_type string Phone type name (for example, Mobile or Office).
results[].phone_number string Phone number.
results[].ext string Phone extension, if any.
results[].activated string Activation date/time, if set.
results[].eligible string Eligibility date/time, if set.
results[].call_result string Last call result, if any.
results[].hidden integer 1 if the phone is hidden; otherwise 0.
results[].dealer_store string Associated dealer/store name, if any.
results[].model string Model value, if any.
results[].updated string Date and time the phone record was last updated (YYYY-MM-DD HH:MM:SS).
results[].created string Date and time the phone record was created (YYYY-MM-DD HH:MM:SS).
errors array Empty list when the request succeeds.
code integer HTTP-style status value; 200 on success.

Example response:

{
  "results": [
    {
      "id": 1001,
      "last_contacted": "2024-06-15 14:30:00",
      "unknown": 0,
      "do_not_call": 0,
      "contact_id": 789,
      "contact": "John Doe",
      "phone_type": "Mobile",
      "phone_number": "5551234567",
      "ext": "",
      "activated": "",
      "eligible": "",
      "call_result": "",
      "hidden": 0,
      "dealer_store": "",
      "model": "",
      "updated": "2024-06-15 14:30:00",
      "created": "2024-01-10 09:00:00"
    }
  ],
  "errors": [],
  "code": 200
}

Notes

  • The id parameter is the contact ID, not the phone-number ID.
  • The contact must belong to your company; otherwise the request is rejected.
  • All phone numbers associated with the contact are returned.
  • If the contact exists but has no phone numbers, the response returns an empty results list with status 200.
  • This endpoint does not support date-range filtering or pagination. Use /api/contact_phones/updated/ when syncing by update date.

Error Responses

Status Code Meaning
400 Bad Request – The contact ID is missing, invalid, or does not match a contact in your company.
401 Unauthorized – The API key and/or secret is missing, invalid, inactive, associated with a disabled account, or lacks permission to read contact phones.
405 Method Not Allowed – A method other than GET was used.
500 Internal Server Error – An unexpected server problem occurred. Not specified in Swagger.

400 response body example:

{
  "results": [],
  "errors": ["Invalid 'id' 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
}