Retention
CRM V4 retention by customer CNPJ for the months the period touches, against as many months right before it: monthly customer churn (CNPJs that stopped billing recurring revenue) and gross revenue retention (GRR). Reads analytics.obt_crm_v4_retention_monthly. Rates come from the summed months, never from averaged rates. An organization without CRM V4 recurring revenue answers 200 with hasData: false, current: null and empty months. Aggregates only, no CNPJ in the response. Both dates are required; the period spans at most 366 days. Cached for 30 minutes.
ClientIdAuthClientSecretAuthx-client-id<token>Client ID
x-client-secret<token>Client secret
organizationId*stringOrganization identifier (UUID, required)
uuidstartDate*stringFirst day of the period, inclusive (YYYY-MM-DD, UTC). Required.
dateendDate*stringLast day of the period, inclusive (YYYY-MM-DD, UTC). Required. At most 366 days from startDate.
dateSuccessful response
application/json- response
period*previousPeriod*As many whole months as the period touches, right before its first month.
hasData*booleanWhether current has a base.
current*|Sum of the months of the window; null when no CNPJ billed recurring revenue in it.
previous*|Sum of the months of the window; null when no CNPJ billed recurring revenue in it.
months*array<>One item per month of the period with a row in the model, ascending.
curl -X GET "https://example.com/v1/crm-v4/retention?organizationId=11111111-1111-4111-8111-111111111111&startDate=2026-10-01&endDate=2026-10-02"{ "period": { "startDate": "2026-10-01", "endDate": "2026-10-31" }, "previousPeriod": { "startDate": "2026-09-01", "endDate": "2026-09-30" }, "hasData": true, "current": { "customersBase": 40, "customersRetained": 38, "revenueBase": 200000, "revenueRetained": 188000, "churnRate": 5, "grr": 94 }, "previous": { "customersBase": 38, "customersRetained": 37, "revenueBase": 190000, "revenueRetained": 185000, "churnRate": 2.63, "grr": 97.37 }, "months": [ { "month": "2026-10", "customersBase": 40, "churnRate": 5, "grr": 94 } ]}