← All action domains

Attribution

5 operations. Call each with POST https://app.chirply.io/api/v1/actions/<name> and a bearer token; the response is { "data": { "action", "summary", "result" } }. A read badge means the operation changes nothing; write requires the credential’s write scope.

Acquisition sources

attribution.acquisition_outcomesread

Read first-touch acquisition channels, sources and campaigns from contacts' saved attribution, with new leads, noncanceled appointments and confirmed live-mode invoice, funnel and connected Stripe collections in an explicit UTC window. Group by channel, source or campaign; absent evidence stays unknown and unlinked payments stay unattributed. Mirrored payment intents are deduplicated and currencies stay separate. Counts are period activity, not one acquisition cohort or proof an ad caused a payment. No manual source costs are assigned to campaigns. Read-only; makes no ad-provider calls, changes no contacts and charges nobody.

Parameters

FieldTypeRequiredDescription
fromstring (date)requiredInclusive UTC start date, YYYY-MM-DD.
throughstring (date)requiredInclusive UTC end date, YYYY-MM-DD. Maximum window is 366 days.
group_by"channel" | "source" | "campaign"optionalFirst-touch grouping: channel; channel plus UTM source (ad network fallback); or channel plus source plus campaign name/ID. Missing acquisition evidence stays unknown. Never uses the contact's operational creation source. Default: "channel"

Example

curl -X POST https://app.chirply.io/api/v1/actions/attribution.acquisition_outcomes \
  -H "Authorization: Bearer chp_live_…" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "2026-09-17",
    "through": "2026-09-17"
  }'
Test with your API key

Over MCP the same operation is the tool attribution_acquisition_outcomes at https://app.chirply.io/api/mcp, same bearer token, same input.

Record source cost

attribution.record_spendwriteadmin only

Record one manually verified source cost, currency, UTC date and evidence reference for reporting. Does not create ads, charge an account or transmit anything to an ad platform. Duplicate source/date/currency/reference combinations are rejected. Entries remain in the audit history; correct an error by voiding the entry and recording a replacement with a new reference. Owner/admin only.

Parameters

FieldTypeRequiredDescription
sourcestringrequiredExact contact source key to assign this cost to, such as website or facebook_lead_ad. This is a manual assignment, not inferred campaign attribution.
spent_onstring (date)requiredUTC calendar date the cost was incurred, YYYY-MM-DD.
currency"usd" | "eur" | "gbp" | "cad" | "aud"requiredCurrency of this cost. Supported currencies use two decimal places; no exchange conversion occurs.
amount_minorintegerrequiredCost in minor units: 1250 means 12.50. Zero records a verified zero-cost day. This records a cost and does not charge an ad account.
referencestringrequiredUnique evidence reference within this source, date and currency, such as an ad-account ID plus invoice or export row ID. Reusing it is rejected to prevent duplicates.
notestringoptionalOptional provenance or explanation of how this source was assigned. Never paste credentials. Default: ""

Example

curl -X POST https://app.chirply.io/api/v1/actions/attribution.record_spend \
  -H "Authorization: Bearer chp_live_…" \
  -H "Content-Type: application/json" \
  -d '{
    "source": "example",
    "spent_on": "2026-09-17",
    "currency": "usd",
    "amount_minor": 1,
    "reference": "example"
  }'
Test with your API key

Over MCP the same operation is the tool attribution_record_spend at https://app.chirply.io/api/mcp, same bearer token, same input.

Revenue by Source

attribution.revenue_by_sourceread

Which lead source made the account money: collected revenue (invoices, funnels, and connected Stripe, deduped so the same charge is never counted twice) grouped by each PAYING CONTACT's recorded source, for an optional date range. Attribution is single-touch: every payment counts toward the one source stamped on the contact when it was created — no fractional multi-touch. Each source also carries its paying-contact count, refunds, and a first-touch UTM campaign breakdown from the contact's earliest tracked website visit. Three totals are reported separately and should not be conflated: knownSourceCents is money from a real acquisition channel; importedCents is money from contacts an importer created (Stripe customer sync, file import, API), which records how the record arrived and says nothing about what acquired the customer; unattributedCents is money on payments with no linked contact. A workspace that imported its customers can legitimately show zero known-source revenue. Read-only; changes nothing and charges nobody.

Parameters

FieldTypeRequiredDescription
fromstring (date-time)optionalInclusive start of the collection window as an ISO 8601 timestamp. Filters by when the money was collected, not when the contact was created. Omit for all history.
tostring (date-time)optionalExclusive end of the collection window as an ISO 8601 timestamp. Omit to continue through now.

Example

curl -X POST https://app.chirply.io/api/v1/actions/attribution.revenue_by_source \
  -H "Authorization: Bearer chp_live_…" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "2026-09-17T15:00:00Z",
    "to": "2026-09-17T15:00:00Z"
  }'
Test with your API key

Over MCP the same operation is the tool attribution_revenue_by_source at https://app.chirply.io/api/mcp, same bearer token, same input.

Source outcomes and costs

attribution.source_outcomesread

Read leads created, noncanceled appointments booked and collected revenue by the contact's currently recorded source in an explicit UTC window. Only live-mode payments are included. Revenue stays separated by currency and deduplicates mirrored Stripe charges. Costs are manually entered evidence, not synchronized ad-platform spend; absent costs are unknown. Returns the latest 100 cost entries. Counts describe activity during the same period, not a single acquisition cohort; revenue/cost ratios are observational and exclude service costs. Read-only; makes no ad-provider calls and charges nobody.

Parameters

FieldTypeRequiredDescription
fromstring (date)requiredInclusive UTC start date, YYYY-MM-DD.
throughstring (date)requiredInclusive UTC end date, YYYY-MM-DD. Maximum window is 366 days.

Example

curl -X POST https://app.chirply.io/api/v1/actions/attribution.source_outcomes \
  -H "Authorization: Bearer chp_live_…" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "2026-09-17",
    "through": "2026-09-17"
  }'
Test with your API key

Over MCP the same operation is the tool attribution_source_outcomes at https://app.chirply.io/api/mcp, same bearer token, same input.

Void source cost

attribution.void_spendwriteadmin only

Exclude an erroneous manually recorded cost from future source-outcome totals while preserving its original values and who voided it. Changes reporting only; it does not refund money or change an ad account. A replacement uses a new evidence reference. Owner/admin only.

Parameters

FieldTypeRequiredDescription
entry_idstring (uuid)requiredThe cost entry ID returned by source_outcomes or record_spend.

Example

curl -X POST https://app.chirply.io/api/v1/actions/attribution.void_spend \
  -H "Authorization: Bearer chp_live_…" \
  -H "Content-Type: application/json" \
  -d '{
    "entry_id": "2f6a1c1e-6c3b-4c62-9f6e-8a2d4b7c9e11"
  }'
Test with your API key

Over MCP the same operation is the tool attribution_void_spend at https://app.chirply.io/api/mcp, same bearer token, same input.

The machine-readable version of this page is GET https://app.chirply.io/api/v1/actions?domain=attribution — same operations, with full JSON Schemas. Authentication, errors and rate limits are covered in the API documentation home.