Skip to main content
These events let you proactively monitor the workspace’s financial status — receive alerts before credits run out, be notified of plan changes, and track the trial cycle without having to check the dashboard manually.

Event list

EventWhen it fires
credit.lowThe credit balance falls below the configured alert threshold
credit.depletedCredits reach zero — the workspace loses the ability to process messages
plan.changedThe workspace plan is changed (upgrade, downgrade, or cancellation)
trial.expiringThe trial period is 3 days from ending
trial.expiredThe trial ended without converting to a paid plan

credit.low

When it fires

The workspace credit balance falls below the alert threshold configured in Settings → Billing. By default, the alert is triggered when less than 20% of the current cycle’s credits remain.

Payload

{
  "event": "credit.low",
  "event_id": "evt_01HX9A1K9MFQR4YZDNV7P9WCE",
  "timestamp": "2026-04-19T18:00:00Z",
  "workspace_id": "ws_abc123",
  "data": {
    "credits_remaining": 1850,
    "credits_total": 10000,
    "credits_used": 8150,
    "usage_percentage": 81.5,
    "alert_threshold_percentage": 80,
    "estimated_depletion_at": "2026-04-21T12:00:00Z",
    "billing_period_end": "2026-04-30T23:59:59Z",
    "plan_id": "plan_pro",
    "plan_name": "Pro"
  }
}

Key fields

FieldTypeDescription
credits_remainingintegerCredits still available
credits_totalintegerTotal credits for the cycle
credits_usedintegerCredits consumed so far
usage_percentagenumberUsage percentage (0–100)
alert_threshold_percentagenumberConfigured threshold that triggered the alert
estimated_depletion_atstring | nullEstimated time when credits will reach zero, based on average consumption
billing_period_endstringEnd date of the current billing period
plan_idstringCurrent plan ID

Usage example

Use credit.low to trigger an automatic alert in Slack or WhatsApp for the billing manager before service is interrupted. The estimated_depletion_at field helps prioritize urgency.

credit.depleted

When it fires

The credit balance reaches zero. When this happens, the workspace enters restricted mode: the AI agent stops responding to new messages until credits are added or the billing cycle renews.

Payload

{
  "event": "credit.depleted",
  "event_id": "evt_01HX9B3M2PGTS6YADOV8Q1XDF",
  "timestamp": "2026-04-21T14:35:00Z",
  "workspace_id": "ws_abc123",
  "data": {
    "credits_remaining": 0,
    "credits_total": 10000,
    "credits_used": 10000,
    "billing_period_end": "2026-04-30T23:59:59Z",
    "plan_id": "plan_pro",
    "plan_name": "Pro",
    "service_status": "restricted",
    "depleted_at": "2026-04-21T14:35:00Z"
  }
}

Key fields

FieldTypeDescription
credits_remainingintegerAlways 0 in this event
service_statusenumrestricted — the AI agent is paused
depleted_atstringISO 8601 timestamp of depletion

Usage example

credit.depleted is critical. When triggered, the AI agent stops responding — contacts may be left without support. Set up an automation that adds credits automatically or immediately notifies the person responsible for billing.

plan.changed

When it fires

The workspace plan is changed: upgrade to a higher plan, downgrade to a lower one, migration between same-tier plans, or subscription cancellation. Includes both the previous and new plans.

Payload

{
  "event": "plan.changed",
  "event_id": "evt_01HX9C5P4RHTW7ZBEPV9S2YEG",
  "timestamp": "2026-04-19T11:00:00Z",
  "workspace_id": "ws_abc123",
  "data": {
    "previous_plan_id": "plan_starter",
    "previous_plan_name": "Starter",
    "new_plan_id": "plan_pro",
    "new_plan_name": "Pro",
    "change_type": "upgrade",
    "effective_at": "2026-04-19T11:00:00Z",
    "billing_period_end": "2026-05-19T23:59:59Z",
    "changed_by": "usr_321"
  }
}

Key fields

FieldTypeDescription
previous_plan_idstringPrevious plan ID
previous_plan_namestringPrevious plan name
new_plan_idstringNew plan ID
new_plan_namestringNew plan name
change_typeenumupgrade, downgrade, canceled, reactivated
effective_atstringWhen the change took effect
changed_bystring | nullID of the user who made the change

Usage example

Use plan.changed with change_type: "canceled" to trigger a retention flow — send a follow-up message or offer support before the customer fully stops using the platform.

trial.expiring

When it fires

The workspace’s trial period is 3 days from expiration and has not yet converted to a paid plan. This event fires only once per trial cycle.

Payload

{
  "event": "trial.expiring",
  "event_id": "evt_01HX9D7Q5SJUW8ZCFQWA3ZFH",
  "timestamp": "2026-04-17T09:00:00Z",
  "workspace_id": "ws_abc123",
  "data": {
    "trial_end_at": "2026-04-20T23:59:59Z",
    "days_remaining": 3,
    "plan_id": "plan_trial",
    "conversations_used": 142,
    "messages_used": 1834,
    "contacts_total": 87,
    "upgrade_url": "https://app.timelyai.com.br/billing/upgrade"
  }
}

Key fields

FieldTypeDescription
trial_end_atstringTrial expiration date/time
days_remainingintegerDays remaining until the trial ends
conversations_usedintegerTotal conversations opened during the trial
messages_usedintegerTotal messages exchanged during the trial
contacts_totalintegerTotal contacts in the workspace
upgrade_urlstringDirect link to the upgrade page

trial.expired

When it fires

The trial period ended without the workspace subscribing to a paid plan. After this date, the workspace enters read-only mode — no AI agents respond and new channels cannot be connected.

Payload

{
  "event": "trial.expired",
  "event_id": "evt_01HX9E9R6TKXV9ADGRXB4AGI",
  "timestamp": "2026-04-21T00:00:00Z",
  "workspace_id": "ws_abc123",
  "data": {
    "trial_end_at": "2026-04-20T23:59:59Z",
    "plan_id": "plan_trial",
    "service_status": "read_only",
    "conversations_used": 198,
    "messages_used": 2540,
    "contacts_total": 115,
    "upgrade_url": "https://app.timelyai.com.br/billing/upgrade",
    "expired_at": "2026-04-21T00:00:00Z"
  }
}

Key fields

FieldTypeDescription
service_statusenumread_only — the workspace is locked for operations
conversations_usedintegerTotal conversations opened during the trial
messages_usedintegerTotal messages during the trial
expired_atstringISO 8601 timestamp of expiration
upgrade_urlstringDirect link to the upgrade page

Usage example

If you are a Timely.ai partner or reseller managing multiple workspaces, use trial.expiring and trial.expired to automate conversion follow-ups. The conversations_used and messages_used fields show customer engagement during the trial — great data for personalizing your outreach.
Billing events are only sent to webhooks that have credit.*, plan.*, or trial.* events in their subscription list. Make sure to include those categories when creating the webhook if you want to receive these notifications.