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 actions API gives you programmatic control over every AI-recommended collection action Daylit schedules for your company. Each action represents a suggested outreach step — an email, call, or internal task — attached to an invoice and customer. You can filter the action inbox by category, approve or edit content before sending, and record the outcome after the fact.

List actions

company_id
string
required
UUID of the company whose actions you want to list.
GET /api/companies/{company_id}/actions
Returns a paginated list of scheduled actions for the company. Use the category query parameter to filter by inbox tab.

Query parameters

category
string
Preset filter combination. One of:
  • needs_action — proposed, action-required, AI-recommended actions waiting for your review.
  • awaiting_customer — proposed actions where the AI’s top recommendation is to wait for the customer to respond.
  • history — completed actions and recommended cancelled actions. Soft-deleted actions are included by default.
  • alternatives — all action-required proposed actions for a specific invoice (requires invoice_id).
status
string
Comma-separated list of statuses to include (e.g. proposed,scheduled). Applied on top of any category preset.
invoice_id
string
Filter by invoice UUID.
customer_id
string
Filter by customer UUID.
Free-text search across action description, recommendation label, trigger event label, customer name, and invoice number.
include_deleted
boolean
default:"false"
Include soft-deleted actions. Defaults to true when category=history.
executed_after
string
ISO date (YYYY-MM-DD). Only available when category=history. Filters by executed_at date, falling back to updated_at for actions that were cancelled before execution.
executed_before
string
ISO date (YYYY-MM-DD). Only available when category=history.
page
integer
default:"1"
Page number.
page_size
integer
default:"20"
Number of results per page.

Response

count
integer
Total number of matching actions.
page
integer
Current page number.
page_size
integer
Number of results returned.
data
array
List of action objects.
curl --request GET \
  --url "https://your-instance.com/api/companies/{company_id}/actions?category=needs_action" \
  --header "Authorization: Token {token}"

Get action detail

GET /api/companies/{company_id}/actions/{action_id}
Returns a single action, including soft-deleted actions. This endpoint always shows the action regardless of its current status.
company_id
string
required
UUID of the company.
action_id
string
required
UUID of the action.
curl --request GET \
  --url "https://your-instance.com/api/companies/{company_id}/actions/{action_id}" \
  --header "Authorization: Token {token}"

Approve action

POST /api/companies/{company_id}/actions/{action_id}/approve
Approves a proposed or scheduled action, transitioning its status to processing. You can optionally supply edited content and record who approved it.
company_id
string
required
UUID of the company.
action_id
string
required
UUID of the action.
final_content
string
Edited content to use instead of the AI-generated draft. Stored in metadata.final_content.
approved_by
string
UUID of the CompanyContact who approved the action.
comment
string
Optional comment recorded in the approval log.
Returns 400 if the action status is not proposed or scheduled.
curl --request POST \
  --url "https://your-instance.com/api/companies/{company_id}/actions/{action_id}/approve" \
  --header "Authorization: Token {token}" \
  --header "Content-Type: application/json" \
  --data '{"final_content": "Hi Acme, following up on invoice #1042...", "comment": "Reviewed and approved."}'

Reject action

POST /api/companies/{company_id}/actions/{action_id}/reject
Rejects an action, cancelling it and recording the reason. Completed actions cannot be rejected.
company_id
string
required
UUID of the company.
action_id
string
required
UUID of the action.
reason
string
Reason for rejection. Stored in the approval log.
approved_by
string
UUID of the CompanyContact who rejected the action.
comment
string
Optional additional comment.
Returns 400 if the action status is completed.
curl --request POST \
  --url "https://your-instance.com/api/companies/{company_id}/actions/{action_id}/reject" \
  --header "Authorization: Token {token}" \
  --header "Content-Type: application/json" \
  --data '{"reason": "Customer already paid — no action needed."}'

Send action

POST /api/companies/{company_id}/actions/{action_id}/send
Marks a proposed or scheduled action as completed and records delivery details. Use this endpoint when you send the outreach yourself (e.g. outside Daylit) and want to log the outcome.
company_id
string
required
UUID of the company.
action_id
string
required
UUID of the action.
final_content
string
Final content that was sent. Stored in metadata.final_content.
channel_id
string
Delivery channel identifier (e.g. email thread ID).
external_id
string
External reference ID for tracking.
response_deadline
string
ISO datetime after which the action is considered overdue for a response. Must be timezone-aware.
Returns 400 if the action status is not proposed or scheduled, or if response_deadline cannot be parsed.
curl --request POST \
  --url "https://your-instance.com/api/companies/{company_id}/actions/{action_id}/send" \
  --header "Authorization: Token {token}" \
  --header "Content-Type: application/json" \
  --data '{"channel_id": "thread_abc123", "response_deadline": "2026-06-01T17:00:00Z"}'

Cancel action

POST /api/companies/{company_id}/actions/{action_id}/cancel
Cancels an action and records the reason and who cancelled it.
company_id
string
required
UUID of the company.
action_id
string
required
UUID of the action.
reason
string
Reason for cancellation. Stored in the approval log.
approved_by
string
UUID of the CompanyContact who cancelled the action.
curl --request POST \
  --url "https://your-instance.com/api/companies/{company_id}/actions/{action_id}/cancel" \
  --header "Authorization: Token {token}" \
  --header "Content-Type: application/json" \
  --data '{"reason": "Invoice is in dispute — pausing collection."}'

Complete action

POST /api/companies/{company_id}/actions/{action_id}/complete
Marks an action as completed without sending through Daylit. Use this to log completion of tasks or calls handled outside the platform.
company_id
string
required
UUID of the company.
action_id
string
required
UUID of the action.
curl --request POST \
  --url "https://your-instance.com/api/companies/{company_id}/actions/{action_id}/complete" \
  --header "Authorization: Token {token}"