Skip to content

GET /api/agent/contacts/{id} ​

Drill into a single contact by Xero external id. Returns who to send to (email, contactPersons), how the account is classified (accountNumber, paymentTerms, contactGroups, contactStatus) with contactDetailsSyncedAt as the provenance stamp over all of them, plus LTV, payment-days median, cadence, ABC tier, last invoice + bill, and a recent-paid-invoices list with line-item account context. If you only need email addresses across several contacts, use GET /api/agent/contacts instead — it carries email on every list row for one call rather than one per contact. Archived contacts ARE returned here (unlike the list endpoint); check contactStatus. Sensitive root: returns 404 indistinguishable from a genuine miss when the contact is flagged sensitive and the key lacks READ_SENSITIVE. Sensitive sub-field: paid-invoice entries on sensitive account codes have their accountName masked to Sensitive account.

Auth ​

  • Required scope: READ_CONTACTS
  • Header: Authorization: Bearer cr_live_<prefix>_<secret>

Query parameters ​

NameTypeRequiredNotes
idstringyesXero contact external id.

Responses ​

200 — Single-contact drill payload ​

Body: ContactDrillResponse

FieldTypeRequiredNotes
contactContactDrillyes
redactedItemCountintegeryesNumber of recentPaidInvoices[] entries masked due to sensitive-account gating.
billingAlertBillingAlertno
xeroAlertXeroAlertno

401 — Unauthorized ​

Body: ErrorResponse

FieldTypeRequiredNotes
errorstringyes

403 — Key lacks the required scope ​

Body: ErrorResponse

FieldTypeRequiredNotes
errorstringyes

404 — Contact does not exist for the org — or exists but is flagged sensitive and the key lacks READ_SENSITIVE. ​

Body: ErrorResponse

FieldTypeRequiredNotes
errorstringyes

429 — Rate-limited (per-minute burst) or query credits exhausted. Credits return individually on a rolling 5h window — retry after Retry-After seconds for one more call. ​

Body:

any

Response headers ​

Every successful response carries X-CashRunway-Subscription, X-CashRunway-Plan, X-CashRunway-Quota-Remaining, and X-CashRunway-Quota-Reset. Trialing subscriptions also include X-CashRunway-Trial-Days-Remaining. See the overview for details.

Released under a proprietary license. · cashrunway.ai