company logo

Help center

Check Out Boxly's Quick Start Video Guides
All collectionsGetting leads in - Channel ConnectionsAPI Documents to get leads into BoxlyBoxly Phones API Integration Guide

Boxly Phones API Integration Guide

A Clear, Simple Explanation for Everyone Followed by the Full Developer Specification

How the Boxly Phones API Works


The Phones API allows Boxly to receive information about your phone calls automatically. When someone calls your practice, your phone system already knows everything about the call. All this guide does is tell your phone system how to send that information to Boxly so it appears inside the correct lead’s timeline.

Here is what happens in simple terms

  1. A call happens at your practice.

  2. Before or during the call, your phone system can look up the caller's number in Boxly. If they're an existing lead, Boxly returns a direct URL to their lead record. What your phone system does with that URL is up to your implementation.

  3. When the call ends, your phone system sends Boxly a message containing the details of that call.

  4. Boxly reads the phone number of the person who called.

  5. If the person already exists as a lead in Boxly:
    Boxly adds that call to the same lead’s conversation thread.

  6. If the person is new:
    Boxly creates a brand-new lead automatically.

  7. Boxly shows:

    • Inbound calls on the left

    • Outbound calls on the right

  8. If your phone system includes a summary or transcript, Boxly can understand what the call was about (for example, “Invisalign enquiry”, “Implant follow-up”, “Voicemail”, “Cancelled appointment”).

  9. With this context, Boxly can automatically route the lead to the correct treatment box.

  10. If your phone system includes a recording link, Boxly will make the recording playable inside the lead’s history.

You do not need to do anything else.

There is no syncing.
There is no searching for leads.
There is no complex setup.

Your phone provider simply sends Boxly one message per call, and Boxly handles everything after that.

Important Information Before You Start


1. A lead lookup endpoint is available (optional)

✅ Your phone system can optionally look up a caller before submitting the call.
✅ If a match is found, Boxly returns the lead URL — your phone system can use it however it needs to.
✅ The lookup is optional. If you skip it, Boxly still matches or creates the lead automatically when the call is submitted.
✅ Always submit the call data after the call ends regardless of whether you ran a lookup first.

2. Only one request per call

✅ All call information must be included in a single POST request.
❌ Do not split a call into separate requests.

3. Send the data after the call ends

✅ The call should be fully completed before sending the request.

4. The summary is extremely important

✅ It helps Boxly understand the purpose of the call and route the lead correctly.

5. Recording links should be sent immediately

❌ Recordings cannot be added later or retrieved by Boxly.

6. The Phones API is part of the Boxly Pro plan

❌ If you are not on the Pro plan, this integration will not work.

All-in-One Marketing Suite Guide

All-in-One Marketing Suite Inside Boxly Guide

How to Set Up the Phones API in Boxly


  1. Go to Channels → API Channel

  2. Click “Create Channel” and choose “Phones”

  3. Give the channel a name

  4. Go to this channel→ API Keys and create a new key

  5. Copy the API key and give it to your phone provider or developer

  6. Add all your phone numbers under Settings → Phone Numbers

  7. Your IT person or phone provider uses the API key and this guide to send your call data to Boxly

Everything else is handled automatically by Boxly.

Developer Guide


info icon
This section contains everything your developer or phone provider needs to implement the integration correctly.

✅ All fields are clearly marked as Required, Strongly Recommended or Optional.

1. Lead Lookup (Optional)

GET https://api.boxly.ai/api/api_channel/api/v1/search_enquiry/

Authentication: X-API-KEY: your_api_key

Query parameter: phone — caller's number in E.164 format

Response

Meaning

What your system can do

200 + {"lead_found": "No"}

No existing lead

Treat as new — Boxly creates the lead automatically on submission

200 + lead details including lead_url

Existing lead found

Use the lead_url however your phone system needs to — for example as a screen pop when the agent answers

401

Invalid or missing API key

Check your API key

What Boxly provides: a lead_url pointing directly to the lead record in Boxly. What your phone system does with that URL is entirely up to your implementation.

Always submit the call after the call ends regardless of the lookup result.

2. Endpoint

POST https://api.boxly.ai/api/api_channel/api/v1/submit_enquiry/

Authentication

Include this header:
X-API-KEY: your_api_key

3. Payload Structure

All fields must be included in one payload:

{
"root": {
"lead": { ... },
"reply": { ... },
"notes": [ ... ]
}
}

4. Lead Object

Used by Boxly to identify the lead.

Required

Field

Example

Description

phone

"+447700900123"

Must be E.164 format. This is how Boxly finds or creates the lead.

Optional but useful

Field

Example

Description

first_name

"Sarah"

Used if a new lead is created

last_name

"Doyle"

Optional

email

"[email protected]"

Optional

gender

"Female"

Optional

date_of_birth

"1990-05-10"

Optional

5. Reply Object (Call Metadata)

✅ This is the most important part of the request.

Required fields

Field

Example

Description

message

"Call ended"

Short description of the call. Placeholder allowed.

message_type

"phone"

Must always be “phone”.

from_number

"+447700900123"

Caller number.

to_number

"+441234567890"

Receiver number.

date_time

"2025-10-15T09:45:00Z"

ISO timestamp.

Strongly Recommended Fields

These are needed for call quality, routing, and context.

Field

Example

Description

duration

{ "seconds": 120 }

Length of call.

direction

"inbound"

inbound or outbound. Controls left or right placement in the timeline.

call_outcome

"answered"

answered, missed, busy, voicemail.

summary

"Enquired about Invisalign"

Helps Boxly route the lead correctly.

recording_link

"https://audio.com/call123.mp3"

Direct audio file URL.

recording_link_redirect

"https://view.com/call123"

Browser view link.

extension

"101"

Phone extension used.

Optional Fields

Field

Example/Type

Description

call_action

"voicemail"

Call category.

call_outcome_reason

"busy"

Reason for outcome.

status

"completed"

Status of the call.

sub_data

array

Structured question/answer pairs

submission_link

string

URL to original submission - including UTMs

6. Notes Object (Optional)

Field

Example

Description

description

"Voicemail left"

Required in each note.

files

["https://cdn.com/file.pdf"]

Optional file URLs.

links

[{ "url": "...", "label": "..." }]

Optional links.

7. Full Example Payload

{
  "root": {
    "lead": {
      "phone": "+447700900123",
      "first_name": "Sarah",
      "last_name": "Doyle"
    },
    "reply": {
      "message": "Inbound call",
      "message_type": "phone",
      "from_number": "+447700900123",
      "to_number": "+441234567890",
      "date_time": "2025-10-15T09:45:00Z",
      "duration": { "seconds": 120 },
      "direction": "inbound",
      "call_outcome": "answered",
      "summary": "Lead asked about Invisalign consultation",
      "recording_link": "https://recordings.example.com/rec123.mp3",
      "recording_link_redirect": "https://view.example.com/rec123",
      "status": "completed",
      "extension": "101"
    },
    "notes": [
      {
        "description": "Invisalign related enquiry"
      }
    ]
  }
}

8. Common Developer Errors (Must Avoid)

  1. Sending multiple POST requests for the same call

Only one request per call is allowed.

  1. Missing required fields

Boxly cannot process calls without message, message_type, from_number, to_number, or date_time.

  1. Not including a summary

Without a summary, Boxly cannot classify or route the call.

  1. Incorrect phone number formatting

Phone numbers must be in E.164 format.

  1. Not sending recording links immediately

Recordings cannot be added later.

9. API Responses

201 – Lead created
A new lead was created and the call was attached.

200 – Lead found
Existing lead updated with the call.

400 – Invalid payload
Usually due to missing fields or badly formatted data.

401 – Invalid API key
Authentication header missing or incorrect.

403 – Channel disabled
Phones API channel not active.

500 – Server error
Unexpected error. Contact Boxly support.

Summary of What Will Happen After You Send the Data


When each call finishes:

  • Your phone system sends Boxly the call information

  • Boxly checks if the caller is already a lead

  • If yes, Boxly adds the call to the existing lead

  • If not, Boxly creates a new lead

  • Inbound calls appear on the left

  • Outbound calls appear on the right

  • Summaries help Boxly understand the call and route the lead

  • Recording links appear inside the lead’s timeline

  • Everything is tracked in the API log

info icon
You do not have to do any searching or syncing.
Your phone system simply sends the call, and Boxly handles the rest.

Boxly is here to help you work smarter, not harder - let’s keep streamlining your lead management together! 

Contact us at [email protected] if you need any assistance!

Did this answer your question?
😞
😐
😁