Skip to content

Softphone

Resolves a phone number to its CRM identity (contact/venue/account, effective account, do-not-contact flags). Runs while the phone is ringing: fast or failing, never slow.

Name In Type Required Notes
phone query string Yes The caller’s number, ideally E.164 min length 3
x-bl-identity header string Yes The salesperson bl_identity (RS256 JWT from hub.bookline.ai). papi verifies it against the hub JWKS and forwards it to New Data, which uses it as the actor. min length 1
Code Meaning
200 Successful Response
422 Validation Error
Terminal window
curl -X GET 'https://<partner-api-host>/softphone/caller?phone=<phone>' \
-H 'apikey: <your-api-key>'

Creates the activity in New Data attributed to the acting user (x-bl-identity). Idempotent by sip_callid: a retry returns the same activity with HTTP 200 instead of duplicating.

Name In Type Required Notes
x-bl-identity header string Yes The salesperson bl_identity (RS256 JWT from hub.bookline.ai). papi verifies it against the hub JWKS and forwards it to New Data, which uses it as the actor. min length 1
Field Type Required Notes
number string Yes min length 3
direction inbound / outbound Yes
started_at string Yes format date-time
talked_seconds integer Yes Seconds SPOKEN. A missed call lasts 0. min 0
sip_status integer No
sip_callid string Yes The Call-ID from jambonz CDR. Also the idempotency key. min length 1
call_outcome answered / unanswered Yes
call_type cold / follow_up / other No default other
notes string No
contact_point_id string Yes min length 1
links array of — No default []
Code Meaning
201 Successful Response
422 Validation Error
Terminal window
curl -X POST 'https://<partner-api-host>/softphone/call-activities' \
-H 'apikey: <your-api-key>' \
-H 'Content-Type: application/json' \
-d '{"number": "<number>", "direction": "inbound", "started_at": "<started_at>", "talked_seconds": "<talked_seconds>", "sip_callid": "<sip_callid>", "call_outcome": "answered", "contact_point_id": "<contact_point_id>"}'

PATCH /softphone/call-activities/{activity_id}

Section titled “PATCH /softphone/call-activities/{activity_id}”

Applies the salesperson’s classification (call_type, call_outcome) and notes to an existing activity, as the acting user.

Name In Type Required Notes
activity_id path string Yes
x-bl-identity header string Yes The salesperson bl_identity (RS256 JWT from hub.bookline.ai). papi verifies it against the hub JWKS and forwards it to New Data, which uses it as the actor. min length 1
Field Type Required Notes
call_type cold / follow_up / other No
call_outcome answered / unanswered No
notes string No
Code Meaning
200 Successful Response
422 Validation Error
Terminal window
curl -X PATCH 'https://<partner-api-host>/softphone/call-activities/<activity_id>' \
-H 'apikey: <your-api-key>' \
-H 'Content-Type: application/json' \
-d '{"call_type": "<call_type>", "call_outcome": "<call_outcome>", "notes": "<notes>"}'