"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
campaign_started.
Request headers
Bearer token obtained from your Clerk session. Example:
Bearer eyJhbGc...Must be
application/json.Path parameters
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 ofsms, email, or call must be true. The API returns 400 if all three are false.
Set to
true to include SMS as an outreach channel.Set to
true to include email as an outreach channel.Set to
true to include phone calls as an outreach channel.Guidance on the communication tone, for example
"professional and empathetic" or "firm but respectful". Maximum 80 characters.Guidance on the outreach schedule, for example
"once per week" or "day 1, day 5, day 14". Maximum 80 characters.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
Returns201 Created with the newly created campaign record.
The created RCM campaign.
Example
Record an opt-out
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).
Request headers
Bearer token obtained from your Clerk session.
Must be
application/json.Path parameters
The unique identifier of the document whose campaign is being opted out of.
Request body
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.
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.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
Returns200 OK confirming the opt-out was recorded.
Always
true on a successful opt-out.Example
Error cases
Start campaign errors
| Status | Error message | Cause |
|---|---|---|
400 | Invalid body. | A required field is missing or a field value exceeds its character limit. |
400 | At least one channel must be true. | sms, email, and call are all false. |
400 | RCM only when a loan exists and status is BEHIND. | The document has no loan, or its loan status is "CURRENT". |
401 | Missing Authorization Bearer token. | No Authorization header was sent. |
401 | Invalid or expired token. | The Bearer token is malformed or has expired. |
404 | Not found. | No document with the given id exists, or it belongs to a different account. |
Opt-out errors
| Status | Error message | Cause |
|---|---|---|
400 | Invalid body. | A required field is missing or a field value exceeds its character limit. |
401 | Missing Authorization Bearer token. | No Authorization header was sent. |
401 | Invalid or expired token. | The Bearer token is malformed or has expired. |
404 | Campaign not found or access denied. | The campaignId does not exist, does not belong to the specified document, or belongs to a different account. |
