New Call

From docs
Jump to: navigation, search

Mobile_API »Store New Call

Base URL

https://apimobile.callproof.com

Endpoint

/api/new-call

Purpose

Logs a new phone call for the authenticated user. Creates a call record when none exists for the same details, or updates duration when a matching call already exists. Incoming calls from iOS devices are ignored. Optionally clears a related follow-up recommendation when the call is logged from a recommended follow-up action.

HTTP Method

POST

Headers

Header Required Description
Authorization Yes Bearer access token

Security

  • Yes – Requires Bearer Token authentication.

Parameters

Path Parameters

None.

Query Parameters

None.

Request Body

Parameter Type Required Description
phone_number string Yes Phone number for the call (digits only after processing; minimum 7 characters; letters are not allowed)
call_date integer Yes Call start time as a Unix timestamp (milliseconds)
call_duration integer No Call duration in seconds (defaults to 0 when omitted)
call_type string No Call direction/type (for example, incoming, outgoing, unknown)
call_id integer No Local device call identifier (defaults to 0 when omitted)
contact_id integer No Contact to associate with the call
device_type string No Device type that logged the call (for example, iOS). Incoming iOS calls are rejected
recommended_followup integer No When set to 1 and contact_id is provided, removes the related call follow-up recommendation for that contact

cURL Example for Android

 curl --location 'https://apimobile.callproof.com/api/new-call' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --header 'Content-Type: application/json' \ --data '{ "phone_number": "YOUR_PHONE_NUMBER", "call_date": YOUR_CALL_DATE_MILLISECONDS, "call_duration": 0, "call_type": "outgoing", "call_id": 0, "contact_id": "", "device_type": "Android", "recommended_followup": "" }' 

cURL Example for iOS

 curl --location 'https://apimobile.callproof.com/api/new-call' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --header 'Content-Type: application/json' \ --data '{ "phone_number": "YOUR_PHONE_NUMBER", "call_date": YOUR_CALL_DATE_MILLISECONDS, "call_duration": 0, "call_type": "outgoing", "call_id": 0, "contact_id": "", "device_type": "iOS", "recommended_followup": "" }' 

Successful Response (200)

Indicates that the call was logged (or an existing matching call was updated) successfully.

Field Type Description
clientStatusCode integer Status indicator for the client (for example, 200)
user_id integer Identifier of the authenticated user
company_id integer Identifier of the authenticated user’s company
message string Confirmation message (for example, "Call Details Added Successfully")
uri string Requested resource URI

Error Responses

Status Code Meaning
200 Validation failed – response body uses clientStatusCode 401 with the first validation error message
400 Bad Request – the call could not be logged
401 Unauthorized – missing, invalid, or expired Bearer token
  • Validation (HTTP 200, clientStatusCode 401) – Missing/invalid phone_number, missing/invalid call_date, or invalid call_duration.
  • 400 – Incoming iOS call ignored, call could not be added/updated (for example, "Error while Adding New Call Details" / "Error While Adding New Call Details").
  • 401 – Authentication failed or the access token is missing/expired.