Sample Payloads¶
This document provides sample payloads for events and API operations. For complete field definitions, see the Event Catalog.
Event Payloads¶
All events follow the same envelope structure:
{
"id": 12345,
"type": "event.type",
"createdUtc": "2026-01-28T10:30:00Z",
"companyId": 92,
"payload": { /* event-specific data */ },
"metadata": { /* optional context */ }
}
client.created¶
{
"id": 45678,
"type": "client.created",
"createdUtc": "2026-01-28T10:30:00Z",
"companyId": 92,
"payload": {
"client_id": 12345,
"first_name": "Jane",
"last_name": "Smith",
"email": "jane.smith@example.com",
"phone": "+14155551234",
"status": "Client - Active",
"status_id": 42,
"employee_id": 7,
"employee_name": "John Advisor",
"affiliate_id": null,
"created_date": "2026-01-28T10:30:00Z"
},
"metadata": {
"source": "web_portal",
"user_id": 7
}
}
client.status_changed¶
{
"id": 45679,
"type": "client.status_changed",
"createdUtc": "2026-01-28T14:22:00Z",
"companyId": 92,
"payload": {
"client_id": 12345,
"previous_status": "Client - Active",
"new_status": "Client - Graduated",
"changed_date": "2026-01-28T14:22:00Z",
"changed_by_employee_id": 7,
"status_note": "All items removed"
}
}
lead.created¶
{
"id": 45680,
"type": "lead.created",
"createdUtc": "2026-01-28T09:15:00Z",
"companyId": 92,
"payload": {
"client_id": 12346,
"first_name": "Michael",
"last_name": "Johnson",
"email": "michael.j@example.com",
"phone": "+14155559876",
"status": "Lead - New",
"status_id": 10,
"source": "website_form",
"created_date": "2026-01-28T09:15:00Z"
}
}
payment.succeeded¶
{
"id": 45681,
"type": "payment.succeeded",
"createdUtc": "2026-01-28T11:45:00Z",
"companyId": 92,
"payload": {
"payment_id": 9876,
"invoice_id": 5432,
"client_id": 12345,
"payment_amount": 99.00,
"payment_method": "Credit Card",
"date_paid": "2026-01-28T11:45:00Z",
"transaction_id": "ch_3AbCdEfGhIjK"
}
}
payment.failed¶
{
"id": 45682,
"type": "payment.failed",
"createdUtc": "2026-01-28T11:50:00Z",
"companyId": 92,
"payload": {
"payment_id": 9877,
"invoice_id": 5433,
"client_id": 12347,
"amount_attempted": 149.00,
"failure_reason": "Card declined - insufficient funds",
"payment_method": "Credit Card",
"attempted_date": "2026-01-28T11:50:00Z"
}
}
invoice.created¶
{
"id": 45683,
"type": "invoice.created",
"createdUtc": "2026-01-28T08:00:00Z",
"companyId": 92,
"payload": {
"invoice_id": 5434,
"client_id": 12345,
"amount": 99.00,
"due_date": "2026-02-05",
"description": "Monthly Service Fee",
"invoice_status": "Unpaid",
"created_date": "2026-01-28T08:00:00Z"
}
}
invoice.status_changed¶
{
"id": 45684,
"type": "invoice.status_changed",
"createdUtc": "2026-01-28T11:45:10Z",
"companyId": 92,
"payload": {
"invoice_id": 5432,
"previous_status": "Unpaid",
"new_status": "Paid",
"total_paid": 99.00,
"balance": 0.00,
"payment_date": "2026-01-28"
}
}
affiliate.created¶
{
"id": 45685,
"type": "affiliate.created",
"createdUtc": "2026-01-28T13:20:00Z",
"companyId": 92,
"payload": {
"employee_id": 456,
"full_name": "Sarah Partner",
"email": "sarah@partnercompany.com",
"phone": "+14155553333",
"affiliate_code": "SARAH2024",
"is_approved_affiliate": false,
"created_date": "2026-01-28T13:20:00Z"
}
}
document.uploaded¶
{
"id": 45686,
"type": "document.uploaded",
"createdUtc": "2026-01-28T15:10:00Z",
"companyId": 92,
"payload": {
"client_doc_id": 7890,
"client_id": 12345,
"doc_name": "credit_report_2024.pdf",
"doc_type_name": "Credit Report",
"created_date": "2026-01-28T15:10:00Z"
}
}
agreement.signed¶
{
"id": 45687,
"type": "agreement.signed",
"createdUtc": "2026-01-28T10:35:00Z",
"companyId": 92,
"payload": {
"agreement_signed_id": 3456,
"client_id": 12345,
"signed_date": "2026-01-28T10:35:00Z",
"name_signed": "Jane Smith",
"agreement_name": "Service Agreement 2024"
}
}
Notes¶
- All timestamps use ISO 8601 format with UTC timezone
- Optional fields may be
nullor absent - For complete field definitions and descriptions, see Event Catalog
API Operations¶
For API request/response examples (creating leads, updating clients, searching, etc.), see: - Error Handling - Common error responses - Events API - Event polling and retrieval - Webhooks API - Webhook subscription management - Authentication - API authentication details