Skip to main content

Documentation Index

Fetch the complete documentation index at: https://help.daylit.com/llms.txt

Use this file to discover all available pages before exploring further.

The intelligence API surfaces AI-generated insights produced by Daylit’s agent layer. Each insight has a target_type (customer, invoice, or portfolio), an insight_type key that identifies the model that produced it, and a payload_json object whose shape varies by type. You can list, retrieve, and submit thumbs-up/down feedback on any insight.

List insights

GET /api/intelligence/insights
Returns a paginated list of active insights. company_id is required — the endpoint returns an empty result set if you omit it or if your account does not have membership in the specified company.

Query parameters

company_id
string
required
UUID of the company. Membership is enforced server-side.
target_type
string
Filter by target scope: customer, invoice, or portfolio.
target_id
string
Filter by the specific target’s identifier (UUID or string ID).
insight_type
string
Partial match on the insight type key (e.g. signal matches all signal types).
customer_id
string
Filter to insights linked to a specific customer UUID.
invoice_id
string
Filter to insights linked to a specific invoice UUID.
active_only
boolean
default:"true"
When true, only returns insights where valid_to is null (still active).

Response

results
array
List of insight objects.
curl --request GET \
  --url "https://your-instance.com/api/intelligence/insights?company_id={company_id}&target_type=customer&insight_type=signal" \
  --header "Authorization: Token {token}"

Get insight

GET /api/intelligence/insights/{pk}
Returns a single insight including the full payload_json.

Submit feedback

POST /api/companies/{company_id}/intelligence/insights/{pk}/feedback
Submits or updates your thumbs-up/down rating on an insight. Each user can have at most one feedback record per insight; subsequent calls overwrite the previous rating.
rating
string
required
up or down.
comment
string
Optional free-text comment explaining your rating.

Response

curl --request POST \
  --url "https://your-instance.com/api/companies/{company_id}/intelligence/insights/{pk}/feedback" \
  --header "Authorization: Token {token}" \
  --header "Content-Type: application/json" \
  --data '{"rating": "up", "comment": "Accurate signal — customer did pay late."}'

Payload schemas by insight type

The payload_json field on each insight has a type-specific structure. The following sections document the shape for each supported insight_type.key.

customer_conversation_summary

A concise summary of all customer-level communications.
summary
string
Up to 18 words, clause style. Empty string if no communications exist or content is unsafe.
tone
string
Conversation tone: cooperative, neutral, frustrated, avoidant, unknown, amicable, or defiant.
active_court
string
Which team currently owns the next action: AR, Sales, Operations, Executive, or Customer.
action
string
One concrete next step to advance the conversation. null if no communications.
action_breakdown
object
last_touch
object
commitment_date
string
YYYY-MM-DD promise-to-pay date, or null.
predicted_pay_date
string
YYYY-MM-DD model-predicted payment date, or null.
evidence_trace
array
At most one evidence/reasoning line supporting the summary. null when no communications exist.
unrelated_items
array
Topics mentioned in the conversation that are not related to the main collection issue.

invoice_conversation_summary

A summary of invoice-level communications using a three-question framework.
stress_level
integer
1–10 stress level. 1 = Proactive/Routine, 10 = Total Silence/Potential Loss.
active_topic
string
The immediate to-do or active talking point in the conversation.
desired_outcome
string
What resolution looks like — the north star of the conversation.
blocker
string
Why the desired outcome has not been achieved yet.
last_touch
object

customer_signal / invoice_signal / portfolio_signal

A detected material change signal at the customer, invoice, or portfolio level.
entity
object
signal
object
Present when a material change was detected. null when no change was found (in which case reason is populated).
reason
string
Explanation for why signal is null. Only present when no material change was detected.

invoice_pay_date_prediction

An AI prediction of when an invoice will be paid, with supporting evidence.
predicted_date
string
YYYY-MM-DD predicted payment date. null if insufficient data is available.
basis
string
Primary basis for the prediction: promise (explicit commitment), historical (past payment patterns), pattern (statistical behavior), or judgement (analyst inference).
evidence_sources
array
Data sources used (e.g. communication_thread, payment_history).
alternative_scenarios
array
Other possible payment dates with probabilities.

customer_strategy_plan

A recommended collection strategy for a customer, including email, call, and internal follow-up action options.
strategy_plan
object
The recommended strategy.