Skip to main content
The RCM (Relationship and Collections Management) endpoints let you initiate structured outreach campaigns for documents whose loan status is "BEHIND", and record opt-out events for compliance purposes. Every action you take through these endpoints is written to an immutable compliance log and emitted as an activity feed event.
RCM campaigns can only be started on documents that have an attached loan with a status of "BEHIND". If the loan is "CURRENT" or no loan exists, the API returns 400.

Start an RCM campaign

Creates a new outreach campaign for the specified document. You choose which communication channels to activate and provide guidance on tone and cadence. The campaign is recorded in the compliance log with an event type of campaign_started.

Request headers

string
required
Bearer token obtained from your Clerk session. Example: Bearer eyJhbGc...
string
required
Must be application/json.

Path parameters

string
required
The unique identifier of the document for which to start a campaign. The document must be owned by your account and must have a loan with status "BEHIND".

Request body

At least one of sms, email, or call must be true. The API returns 400 if all three are false.
boolean
required
Set to true to include SMS as an outreach channel.
boolean
required
Set to true to include email as an outreach channel.
boolean
required
Set to true to include phone calls as an outreach channel.
string
required
Guidance on the communication tone, for example "professional and empathetic" or "firm but respectful". Maximum 80 characters.
string
required
Guidance on the outreach schedule, for example "once per week" or "day 1, day 5, day 14". Maximum 80 characters.
string
Optional free-form notes for the campaign, for example relevant account context or escalation instructions. Maximum 2000 characters. Leading and trailing whitespace is trimmed before storage.

Response

Returns 201 Created with the newly created campaign record.
object
required
The created RCM campaign.

Example


Record an opt-out

Records an opt-out event for an active campaign. Opt-outs are written to the compliance log with an event type of opt_out and emitted to your activity feed. If you set channel to "all", the campaign is deactivated (its active flag is set to false).
Compliance events logged by this endpoint are permanent and cannot be deleted. Always record opt-outs accurately — they form part of your regulatory audit trail.

Request headers

string
required
Bearer token obtained from your Clerk session.
string
required
Must be application/json.

Path parameters

string
required
The unique identifier of the document whose campaign is being opted out of.

Request body

string
required
The unique identifier of the RCM campaign to opt out of. The campaign must belong to the document specified in the path and must be owned by your account.
string
required
The channel being opted out. One of "sms", "email", "call", or "all". Passing "all" deactivates the entire campaign by setting its active flag to false.
string
Optional notes describing the opt-out circumstances, for example "Borrower requested no further contact by SMS". Maximum 2000 characters. Leading and trailing whitespace is trimmed before storage.

Response

Returns 200 OK confirming the opt-out was recorded.
boolean
required
Always true on a successful opt-out.

Example


Error cases

Start campaign errors

Opt-out errors