Overview
The Knock Log Call API allows 3rd party vendors to log completed phone calls made outside the Knock ecosystem within the Knock platform. Logged calls will be visible within both Knock guest cards and the analytics platform, giving your team more visibility into outreach and inbound phone leads than ever before.
This endpoint can be used to log a completed, inbound or outbound call with a variety of different outcomes. The call will appear within the manager’s Knock guest card and trigger To-Do list events, identically to a call made within Knock. Calls will also be tracked within analytics. However, they will not show up in the `Call Log` report, as this report lists only features calls with recordings, which is not currently supported with this endpoint.
To log a call, you must include the phone number used by the agent in the call. This should not be an existing Knock tracking number, as any call made with a Knock tracking number will already be logged. Additionally, this endpoint can only be used to log calls made with prospects who already exist as a Knock Prospect and for whom you have access to their Prospect ID.
API
POST /prospect/:prospectID:/call
Path Parameters
prospect ID |
The ID of the Knock Prospect with whom the call was initiated. (This value can be saved from the response from a successful |
Body Parameters
agent.username |
string |
The username of the manager in the call. |
Agent.phone Number |
string |
The phone number used by the manager in the call (should not be an existing Knock Tracking Number) |
start Time |
iso date-time |
The date and time at which the call began |
end Time |
iso date-time |
The date and time at which the call ended |
type |
string |
The type of call being logged Must be one of the following values:
|
outcome |
string |
The outcome of the call Must be one of the following values:
|
sourceTitle (optional) |
string |
The name of the source to whom this call should be attributed. |
Examples
JavaScript
1const API_KEY = 'api-key';
2
3const prospectId = 500;
4
5const agent = {
6 username: '70997020-74bc-11ec-90d6-0242ac120003',
7 phoneNumber '555-555-5555'
8};
9
10const startTime = '2022-01-02T12:15:00.214Z';
11const endTime = '2022-01-02T12:20:00.214Z';
12
13const outcome = 'ANSWERED';
14const type = 'PHONE_CALL_TO_PROSPECT_PLACED';
15
16const requestBody = {
17 agent,
18 endTime,
19 startTime,
20 outcome,
21 type
22};
23
24const logCallEndpoint = `https://syndication.knockrentals.com/prospect/${prospectId}/call`;
25
26const res = await fetch(logCallEndpoint, {
27 body: JSON.stringify(requestBody),
28 headers: {
29 "Content-Type": "application/json",
30 "x-api-key": API_KEY
31 },
32 method: "POST"
33 });
34
35const response = await res.json();
36
37if (response.status === 200) {
38 const callId = response.communicationId;
39} else {
40 // error
41}
Comments
Article is closed for comments.