### GET /billing/usage-summary Source: https://docs.collectwise.co/api-reference/endpoint/Billing-Usage-Summary Retrieves a complete billing breakdown with usage counts and costs across all communication channels for a specified date range. ```APIDOC ## GET /billing/usage-summary ### Description Returns a complete billing breakdown with usage counts and costs across all channels for a given date range. ### Method GET ### Endpoint /billing/usage-summary ### Parameters #### Query Parameters - **start_date** (string) - Required - Start of date range. Accepts YYYY-MM-DD or a full ISO 8601 UTC timestamp. - **end_date** (string) - Required - End of date range. Accepts YYYY-MM-DD or a full ISO 8601 UTC timestamp. ### Response #### Success Response (200) - **object** (string) - Object type identifier - **organization** (string) - Your organization name - **period** (object) - Start and end dates of the queried range - **sms** (object) - SMS usage counts and costs - **mms** (object) - MMS usage counts and costs - **email** (object) - Email usage counts and costs - **rvm** (object) - Ringless Voicemail usage details including drops and duration costs #### Response Example { "object": "billing.usage_summary", "organization": "Example Corp", "period": { "start_date": "2025-02-01", "end_date": "2025-02-28" }, "sms": { "count": 100, "cost": 5.0, "unit_cost": 0.05, "unit": "segments" } } ``` -------------------------------- ### Example Debtor Object Source: https://docs.collectwise.co/api-reference/Debtor-Object This JSON object represents a typical debtor in the CollectWise system, showcasing all available properties. ```json { "debtorId": "123456", "debtorName": "John Doe", "totalUnpaidDebt": 5000.00, "delinquencyDate": "2023-01-15", "phoneNumber": "+1234567890", "email": "johndoe@example.com", "productOrService": "Credit Card", "creditorName": "ABC Bank", "creditorEmail": "billing@abcbank.com", "accountNumber": "ACC123456", "address": "123 Main St", "city": "Anytown", "state": "CA", "zipCode": "12345", "county": "Los Angeles County", "lastPayDate": "2022-12-01", "interestDue": 250.00, "principalDue": 4750.00, "amountPaid": 1000.00, "callbackNumber": "+18768828825" } ``` -------------------------------- ### GET /debtorStatuses Source: https://docs.collectwise.co/api-reference/endpoint/Get-Multiple-Debtor-Statuses Retrieve the current status of all debtors in the system. ```APIDOC ## GET /debtorStatuses ### Description Retrieve the current status of all debtors. ### Method GET ### Endpoint /debtorStatuses ### Response #### Success Response (200) - **debtorStatuses** (array) - List of debtor status objects - **totalCount** (integer) - Total number of debtor statuses retrieved #### Response Example { "debtorStatuses": [ { "debtorId": "string", "status": "Potential" } ], "totalCount": 1 } ``` -------------------------------- ### Example Response for Debtors Status Source: https://docs.collectwise.co/api-reference/endpoint/Debtors-Status This JSON object illustrates the structure of the response when querying for debtor statuses and recent SMS messages within a workflow. It includes details like workflow ID, debtor ID, pause status, next execution date, stage information, SMS counts, and a list of recent SMS messages. ```json { "windowHours": 24, "limit": 20, "debtors": [ { "debtorId": "24555f289-899c-4b3b-ba4a-b71a3664c671", "workflowId": "111c3300-bcd5-4c0b-a8ad-535b3abbdeb0", "paused": false, "nextExecutionDate": "2025-09-09T15:17:00.000Z", "nextStageId": "5eec7688-6721-4c52-8f8d-4d301d796b3b", "nextStageName": "SMS 2", "smsCounts": { "Delivered": 1 }, "recentSms": [ { "id": "msg_...", "phone_number": "+15552150663", "debtor_id": "24555f289-899c-4b3b-ba4a-b71a3664c671", "content": "templateId:48 message:Hello {debtorName}...", "created_at": "2025-09-08T20:11:03.676Z", "status": "Delivered" } ] } ] } ``` -------------------------------- ### Workflow Status JSON Response Source: https://docs.collectwise.co/api-reference/endpoint/Workflow-Status Example JSON structure returned by the workflow status endpoint. ```json { "workflow": { "id": "197c3300-bcd5-4c0b-a8ad-535b3abbdeb0", "name": "3-day SMS Workflow" }, "totals": { "enrolled": 205, "paused": 5, "eligibleNow": 0, "queued": 200, "noNextStage": 5 }, "stages": [ { "stageName": "SMS 2", "count": 200 } ], "windowHours": 24, "smsSummary": { "Delivered": 200 }, "recentSms": [ { "id": "msg_...", "phone_number": "+15555998608", "debtor_id": "9115e0de-01e2-416a-8b0c-4d46d9b6c032", "content": "templateId:48 message:Hello {debtorName}...", "created_at": "2025-09-08T20:16:01.608Z", "status": "Delivered" } ] } ``` -------------------------------- ### GET /debtorStatus/{debtorId} Source: https://docs.collectwise.co/api-reference/endpoint/Get-Debtor-Status Retrieve the current status of a specific debtor by their unique identifier. ```APIDOC ## GET /debtorStatus/{debtorId} ### Description Retrieve the current status of a specific debtor. ### Method GET ### Endpoint /debtorStatus/{debtorId} ### Parameters #### Path Parameters - **debtorId** (string) - Required - Unique identifier of the debtor ### Response #### Success Response (200) - **debtorId** (string) - Unique identifier of the debtor - **status** (string) - Current status of the debtor (Potential, Subscription, Partial, Paid, Deleted, Paid Creditor Directly, Deceased, Filed Bankruptcy) #### Response Example { "debtorId": "12345", "status": "Paid" } ``` -------------------------------- ### Get Call Recording Source: https://docs.collectwise.co/api-reference/endpoint/Get-Call-Recordings Retrieve call recording with optional transcript and analysis data. ```APIDOC ## GET /call/{callId}/recording ### Description Retrieve call recording with optional transcript and analysis data. ### Method GET ### Endpoint /call/{callId}/recording ### Parameters #### Path Parameters - **callId** (string) - Required - The unique identifier for the call #### Query Parameters - **format** (string) - Optional - Recording format. Enum: standard, multichannel, scrubbed, scrubbed_multichannel. Default: standard - **include_transcript** (boolean) - Optional - Include call transcript. Default: false - **include_analysis** (boolean) - Optional - Include call analysis. Default: false ### Request Example ```json { "example": "request body" } ``` ### Response #### Success Response (200) - **recording_url** (string) - URL to the audio recording file - **transcript** (string) - Full conversation transcript (if requested) - **analysis** (object) - Call analysis data (if requested) - **in_voicemail** (boolean) - Whether the call went to voicemail - **call_summary** (string) - AI-generated summary of the call - **user_sentiment** (string) - Detected user sentiment (Positive/Negative/Neutral) - **custom_analysis_data** (object) - Additional analysis data - **call_successful** (boolean) - Whether the call was successful #### Response Example ```json { "recording_url": "https://collectwiseapi.com/recordings/call_123.mp3", "transcript": "Hello, this is a test call.", "analysis": { "in_voicemail": false, "call_summary": "A test call was made.", "user_sentiment": "Neutral", "custom_analysis_data": {}, "call_successful": true } } ``` ``` -------------------------------- ### GET /debtor/{debtorId} Source: https://docs.collectwise.co/api-reference/endpoint/Get-Debtor Retrieve a specific debtor's information using their unique identifier. ```APIDOC ## GET /debtor/{debtorId} ### Description Retrieve a specific debtor's information. ### Method GET ### Endpoint /debtor/{debtorId} ### Parameters #### Path Parameters - **debtorId** (string) - Required - Unique identifier of the debtor to retrieve ### Responses #### Success Response (200) - **debtorId** (string) - Unique identifier of the debtor - **debtorName** (string) - Full name of the debtor - **totalUnpaidDebt** (number) - Total amount of unpaid debt - **delinquencyDate** (string) - Date when the debt became delinquent - **phoneNumber** (string) - Contact phone number of the debtor - **email** (string) - Email address of the debtor - **callbackNumber** (string) - Callback phone number - **productOrService** (string) - Name of the product or service delivered to the debtor - **creditorName** (string) - Name of the creditor - **creditorEmail** (string) - Creditor email if provided - **lastUpdated** (string) - Timestamp of the last update to this record - **accountNumber** (string) - Account number associated with the debt - **address** (string) - Street address of the debtor - **city** (string) - City of the debtor - **state** (string) - State of the debtor - **zipCode** (string) - ZIP code of the debtor - **county** (string) - County of the debtor - **ssn** (string) - Social Security Number of the debtor - **lastPayDate** (string) - Date of the last payment made by the debtor - **chargeOffDate** (string) - Date when the debt was charged off, if applicable - **interestDue** (number) - Amount of interest due on the debt - **principalDue** (number) - Amount of principal due on the debt - **otherFees** (number) - Other fees associated with the debt - **amountPaid** (number) - Total amount paid by the debtor so far - **customWorkflowID** (string) - Custom workflow identifier for the debtor - **enrollment** (object) - Present only when customWorkflowID is provided - **customization** (string) - Custom instructions for AI collection workflow #### Error Response (404) - **code** (string) - Error code - **message** (string) - Error message ``` -------------------------------- ### Example Payment Received Webhook Payload Source: https://docs.collectwise.co/api-reference/Payment-Received This JSON payload is sent to your configured endpoint when a payment is received for a debtor. It includes event details, debtor ID, and comprehensive payment information. ```json { "event": "payment_received", "debtorId": "123456", "payment": { "amount": 150.00, "totalDebtAmount": 600.00, "currency": "USD", "paymentDate": "2024-10-31", "paymentType": "subscription-payment" } } ``` -------------------------------- ### GET /status/workflow/{workflowId} Source: https://docs.collectwise.co/api-reference/endpoint/Workflow-Status Retrieves a detailed status overview for a specific workflow, including totals, stage breakdowns, and recent SMS messages. ```APIDOC ## GET /status/workflow/{workflowId} ### Description Provides workflow meta, totals, stage breakdown, window hours, SMS summary, and recent SMS for a workflow. ### Method GET ### Endpoint /status/workflow/{workflowId} ### Parameters #### Path Parameters - **workflowId** (string) - Required - Unique identifier of the workflow #### Query Parameters - **hours** (integer) - Optional - Lookback window in hours. Defaults to 24; clamped to [1, 8760]. - **date** (string) - Optional - Specific UTC day in YYYY-MM-DD format; when provided, supersedes the hours window. ### Response #### Success Response (200) - **workflow** (object) - Workflow metadata - **totals** (object) - Enrollment and queue totals - **stages** (array) - Breakdown of counts per stage - **windowHours** (integer) - The lookback window used - **smsSummary** (object) - Summary of SMS delivery status - **recentSms** (array) - List of recent SMS messages #### Response Example { "workflow": { "id": "197c3300-bcd5-4c0b-a8ad-535b3abbdeb0", "name": "3-day SMS Workflow" }, "totals": { "enrolled": 205, "paused": 5, "eligibleNow": 0, "queued": 200, "noNextStage": 5 }, "stages": [ { "stageName": "SMS 2", "count": 200 } ], "windowHours": 24, "smsSummary": { "Delivered": 200 }, "recentSms": [ { "id": "msg_...", "phone_number": "+15555998608", "debtor_id": "9115e0de-01e2-416a-8b0c-4d46d9b6c032", "content": "templateId:48 message:Hello {debtorName}...", "created_at": "2025-09-08T20:16:01.608Z", "status": "Delivered" } ] } ``` -------------------------------- ### Communications Webhook Payloads Source: https://docs.collectwise.co/api-reference/Communications-Webhook Example JSON payloads for SMS and phone call events. Note that phone call events do not include a direction attribute. ```json { "event": "communication", "debtorId": "123456", "communication": { "type": "sms", "direction": "outbound", "timestamp": "2024-10-31T14:30:00Z" }, "totalCommunications": { "sms": 15, "email": 8, "phone": 3 } } ``` ```json { "event": "communication", "debtorId": "123456", "communication": { "type": "phone", "timestamp": "2024-10-31T15:45:00Z" }, "totalCommunications": { "sms": 15, "email": 8, "phone": 3 } } ``` -------------------------------- ### POST /rpc-call Source: https://docs.collectwise.co/api-reference/endpoint/RPC-Call Initiates an RPC (Right Party Contact) call to verify debtor identity. ```APIDOC ## POST /rpc-call ### Description Initiates an RPC (Right Party Contact) call to verify debtor identity. ### Method POST ### Endpoint /rpc-call ``` -------------------------------- ### Query Billing Usage with Timezone Alignment Source: https://docs.collectwise.co/api-reference/endpoint/Billing-Usage-Summary Use full ISO timestamps to define exact UTC boundaries for timezone-specific queries. ```text start_date=2025-02-01T05:00:00Z end_date=2025-03-01T04:59:59Z ``` -------------------------------- ### Billing Usage Summary Source: https://docs.collectwise.co/api-reference/endpoint/Billing-Usage-Summary Retrieves a comprehensive billing breakdown, including usage counts and associated costs for all channels within a given date range. ```APIDOC ## GET /billing/usage ### Description Fetches a complete billing breakdown with usage counts and costs across all channels for a given date range. ### Method GET ### Endpoint /billing/usage ### Parameters #### Query Parameters - **start_date** (string) - Required - The start date for the billing summary. Accepts 'YYYY-MM-DD' or 'YYYY-MM-DDTHH:mm:ssZ'. Defaults to midnight UTC if only date is provided. - **end_date** (string) - Required - The end date for the billing summary. Accepts 'YYYY-MM-DD' or 'YYYY-MM-DDTHH:mm:ssZ'. Defaults to 23:59:59 UTC if only date is provided. ### Request Example ``` GET /billing/usage?start_date=2025-02-01&end_date=2025-02-28 ``` ### Response #### Success Response (200) - **usage_summary** (object) - Contains detailed usage and cost information. - **channels** (array) - List of channels with their usage details. - **channel_name** (string) - The name of the channel. - **usage_count** (integer) - The total usage count for the channel. - **total_cost** (number) - The total cost for the channel in USD. - **rvm** (object) - Specific details for RVM pricing. - **total_cost** (number) - The total cost for RVM, including per-drop and per-hour fees. #### Response Example ```json { "usage_summary": { "channels": [ { "channel_name": "SMS", "usage_count": 15000, "total_cost": 75.00 }, { "channel_name": "Voice", "usage_count": 500, "total_cost": 125.50 } ], "rvm": { "total_cost": 200.50 } } } ``` ``` -------------------------------- ### POST /debtor Source: https://docs.collectwise.co/api-reference/endpoint/Create-Debtor Creates a new debtor record in the system to initiate debt collection workflows. ```APIDOC ## POST /debtor ### Description Creates a new debtor record in the CollectWise system. ### Method POST ### Endpoint /debtor ### Parameters #### Request Body - **debtorName** (string) - Required - Full name of the debtor - **totalUnpaidDebt** (number) - Required - Total amount of unpaid debt - **delinquencyDate** (string) - Required - Date when the debt became delinquent - **phoneNumber** (string) - Required - Contact phone number of the debtor - **email** (string) - Required - Email address of the debtor - **productOrService** (string) - Required - Name of the product or service delivered to the debtor - **creditorName** (string) - Required - Name of the creditor - **callbackNumber** (string) - Optional - Callback phone number - **creditorEmail** (string) - Optional - Email address of the creditor - **accountNumber** (string) - Optional - Account number associated with the debt - **address** (string) - Optional - Street address of the debtor - **city** (string) - Optional - City of the debtor - **state** (string) - Optional - State of the debtor - **zipCode** (string) - Optional - ZIP code of the debtor - **county** (string) - Optional - County of the debtor - **ssn** (string) - Optional - Social Security Number of the debtor - **lastPayDate** (string) - Optional - Date of the last payment made by the debtor - **chargeOffDate** (string) - Optional - Date when the debt was charged off - **interestDue** (number) - Optional - Amount of interest due on the debt - **principalDue** (number) - Optional - Amount of principal due on the debt - **otherFees** (number) - Optional - Other fees associated with the debt - **amountPaid** (number) - Optional - Total amount paid by the debtor so far - **customWorkflowID** (string) - Optional - Custom workflow identifier - **agentName** (string) - Optional - Name of the agent to attribute workflow enrollment to - **customization** (string) - Optional - Custom instructions for AI collection workflow ### Request Example { "debtorName": "John Doe", "totalUnpaidDebt": 1500.00, "delinquencyDate": "2023-01-01", "phoneNumber": "555-0101", "email": "john@example.com", "productOrService": "Consulting Services", "creditorName": "Acme Corp" } ### Response #### Success Response (200) - **debtorId** (string) - Unique identifier of the debtor - **debtorName** (string) - Full name of the debtor - **totalUnpaidDebt** (number) - Total amount of unpaid debt - **delinquencyDate** (string) - Date when the debt became delinquent - **phoneNumber** (string) - Contact phone number of the debtor - **email** (string) - Email address of the debtor - **callbackNumber** (string) - Callback phone number - **productOrService** (string) - Name of the product or service delivered to the debtor ``` -------------------------------- ### API Key Authentication Source: https://docs.collectwise.co/api-reference/endpoint/Get-Debtor Information on how to authenticate API requests using an API key. ```APIDOC ## API Key Authentication ### Description API requests must be authenticated using an API key provided in the request header. ### Security Schemes #### API Key - **Type**: apiKey - **Location**: header - **Name**: collectwise_key ``` -------------------------------- ### GET /tcn/call-outcome/{tcn-cid} Source: https://docs.collectwise.co/api-reference/endpoint/Get-TCN-Call-Outcome Retrieves the call outcome for a specific TCN call ID, supporting SIP integration with CollectWise AI agents. ```APIDOC ## GET /tcn/call-outcome/{tcn-cid} ### Description Retrieves the call outcome for a specific TCN call ID. This endpoint is designed to support TCN's SIP integration where calls are routed to CollectWise AI agents. ### Method GET ### Endpoint /tcn/call-outcome/{tcn-cid} ### Parameters #### Path Parameters - **tcn-cid** (string) - Required - The TCN call identifier ### Response #### Success Response (200) - **action** (string) - The action to be taken based on the call outcome (end, judge_transfer, garnishment_transfer, general_transfer) - **tcn_cid** (string) - The TCN call identifier - **timestamp** (string) - Timestamp when the call outcome was determined - **language** (string) - The language used during the call #### Response Example { "action": "general_transfer", "tcn_cid": "12345", "timestamp": "2024-01-15T10:30:00.000Z", "language": "english" } ``` -------------------------------- ### POST /debtors Source: https://docs.collectwise.co/api-reference/endpoint/Bulk-Create-Debtors Creates multiple debtor records in bulk by accepting an array of debtor information objects. ```APIDOC ## POST /debtors ### Description Creates multiple debtor records in bulk. ### Method POST ### Endpoint /debtors ### Request Body - **Array of NewDebtor** (array) - Required - Array of debtor information to add. ### Response #### Success Response (200) - **createdDebtors** (array) - List of successfully created debtor objects containing debtorId. - **failedDebtors** (array) - List of objects containing index and error details for failed records. #### Response Example { "createdDebtors": [ { "debtorId": "uuid-123" } ], "failedDebtors": [] } ``` -------------------------------- ### POST /debtors Source: https://docs.collectwise.co/api-reference/endpoint/Create-Debtor Endpoint to create a new debtor record in the system. ```APIDOC ## POST /debtors ### Description Creates a new debtor record. ### Method POST ### Endpoint /debtors ``` -------------------------------- ### Define OpenAPI Specification for Debtor Retrieval Source: https://docs.collectwise.co/api-reference/endpoint/Get-Debtor This YAML configuration defines the CollectWise API structure, including server details, security requirements, and the schema for retrieving debtor information. ```yaml openapi: 3.0.1 info: title: CollectWise API description: >- An API for managing debtors, tracking statuses, and automating debt collection processes license: name: MIT version: 1.0.0 servers: - url: https://collectwiseapi.com security: - apiKey: [] paths: /debtor/{debtorId}: get: summary: Get a debtor description: Retrieve a specific debtor's information parameters: - name: debtorId in: path required: true description: Unique identifier of the debtor to retrieve schema: type: string responses: '200': description: Debtor found content: application/json: schema: $ref: '#/components/schemas/DebtorResponse' '404': description: Debtor not found content: application/json: schema: $ref: '#/components/schemas/Error' components: schemas: DebtorResponse: type: object properties: debtorId: type: string description: Unique identifier of the debtor debtorName: type: string description: Full name of the debtor totalUnpaidDebt: type: number format: float description: Total amount of unpaid debt delinquencyDate: type: string format: date description: Date when the debt became delinquent phoneNumber: type: string description: Contact phone number of the debtor email: type: string format: email description: Email address of the debtor callbackNumber: type: string description: Callback phone number productOrService: type: string description: Name of the product or service delivered to the debtor creditorName: type: string description: Name of the creditor creditorEmail: type: string format: email description: Creditor email if provided lastUpdated: type: string format: date-time description: Timestamp of the last update to this record accountNumber: type: string description: Account number associated with the debt address: type: string description: Street address of the debtor city: type: string description: City of the debtor state: type: string description: State of the debtor zipCode: type: string description: ZIP code of the debtor county: type: string description: County of the debtor ssn: type: string description: Social Security Number of the debtor lastPayDate: type: string format: date description: Date of the last payment made by the debtor chargeOffDate: type: string format: date description: Date when the debt was charged off, if applicable interestDue: type: number format: float description: Amount of interest due on the debt principalDue: type: number format: float description: Amount of principal due on the debt otherFees: type: number format: float description: Other fees associated with the debt amountPaid: type: number format: float description: Total amount paid by the debtor so far customWorkflowID: type: string description: Custom workflow identifier for the debtor enrollment: type: object description: Present only when customWorkflowID is provided properties: attempted: type: boolean success: type: boolean message: type: string workflowId: type: string agentName: type: string description: >- Agent name passed in the request. This is echoed back; if not provided, the service falls back internally to merchantName/email, but only the raw agentName is returned here. customization: type: string description: >- Custom instructions for AI collection workflow (e.g., tone, channel preferences, frequency). If not provided, the system will generate an optimal collection flow. required: - debtorId - debtorName - totalUnpaidDebt - delinquencyDate - creditorName - lastUpdated Error: type: object required: - code - message properties: ``` -------------------------------- ### GET /tcn/call-outcome/{call_id} Source: https://docs.collectwise.co/api-reference/endpoint/Get-TCN-Call-Outcome Retrieves the call outcome for a specific TCN call ID. This endpoint is designed to support TCN's SIP integration where calls are routed to CollectWise AI agents. ```APIDOC ## GET /tcn/call-outcome/{call_id} ### Description Retrieves the call outcome for a specific TCN call ID. This endpoint is designed to support TCN's SIP integration where calls are routed to CollectWise AI agents. ### Method GET ### Endpoint /tcn/call-outcome/{call_id} ### Parameters #### Path Parameters - **call_id** (string) - Required - The unique identifier for the TCN call. #### Request Headers - **collectwise_key** (string) - Required - A valid CollectWise API key for authentication. ### Response #### Success Response (200) - **action** (string) - The outcome of the call. Possible values: "end", "judge_transfer", "garnishment_transfer", "general_transfer". - **language** (string) - The language used during the call. May be null. #### Error Response (404) - Call is still in progress or outcome not yet available. Continue polling. ### Request Example ```bash curl -X GET \ "https://api.collectwiseapi.com/tcn/call-outcome/12345" \ -H "collectwise_key: your-api-key-here" ``` ### Response Example (200 OK) ```json { "action": "general_transfer", "language": "english" } ``` ``` -------------------------------- ### Billing Usage Summary Source: https://docs.collectwise.co/api-reference/endpoint/Billing-Usage-Summary Details the structure of a billing usage summary, including costs for SMS, MMS, email, RVM, and calls. ```APIDOC ## Billing Usage Summary Object ### Description Represents a summary of billing usage for a specific period, detailing costs across various communication channels. ### Properties - **sms** (object) - Summary of SMS usage. - **count** (number) - Total number of SMS messages sent. - **cost** (number) - Total cost of SMS messages. - **unit_cost** (number) - Cost per SMS unit. - **unit** (string) - Unit type, e.g., 'segments'. - **mms** (object) - Summary of MMS usage. - **count** (number) - Total number of MMS messages sent. - **cost** (number) - Total cost of MMS messages. - **unit_cost** (number) - Cost per MMS unit. - **unit** (string) - Unit type, e.g., 'segments'. - **email** (object) - Summary of email usage. - **count** (number) - Total number of emails sent. - **cost** (number) - Total cost of emails. - **unit_cost** (number) - Cost per email unit. - **unit** (string) - Unit type, e.g., 'messages'. - **rvm** (object) - Summary of RVM (Rich Voice Message) usage. - **drops** (number) - Total number of RVM drops. - **drop_cost** (number) - Total cost of RVM drops. - **drop_unit_cost** (number) - Cost per RVM drop unit. - **duration_seconds** (number) - Total duration of RVM in seconds. - **duration_hours** (number) - Total duration of RVM in hours. - **duration_cost** (number) - Total cost of RVM duration. - **duration_unit_cost_per_hour** (number) - Cost per hour of RVM duration. - **total_cost** (number) - Total cost for RVM. - **calls_outbound** (object) - Summary of outbound call usage. - **minutes** (number) - Total outbound call minutes. - **cost** (number) - Total cost of outbound calls. - **unit_cost** (number) - Cost per minute for outbound calls. - **unit** (string) - Unit type, e.g., 'minutes'. - **calls_inbound** (object) - Summary of inbound call usage. - **minutes** (number) - Total inbound call minutes. - **cost** (number) - Total cost of inbound calls. - **unit** (string) - Unit type, e.g., 'minutes'. - **total_cost** (number) - Total cost across all channels in USD. - **currency** (string) - Currency code, e.g., 'usd'. ### Example ```json { "organization": "Acme Collections", "period": { "start_date": "2025-02-01", "end_date": "2025-02-28" }, "sms": { "count": 185040, "cost": 5551.2, "unit_cost": 0.03, "unit": "segments" }, "mms": { "count": 4000, "cost": 120, "unit_cost": 0.03, "unit": "segments" }, "email": { "count": 15000, "cost": 0, "unit_cost": 0, "unit": "messages" }, "rvm": { "drops": 50000, "drop_cost": 700, "drop_unit_cost": 0.014, "duration_seconds": 150000, "duration_hours": 41.67, "duration_cost": 137.5, "duration_unit_cost_per_hour": 3.3, "total_cost": 837.5 }, "calls_outbound": { "minutes": 10000, "cost": 1080, "unit_cost": 0.108, "unit": "minutes" }, "calls_inbound": { "minutes": 5100, "cost": 1190, "unit": "minutes" }, "total_cost": 8778.7, "currency": "usd" } ``` ``` -------------------------------- ### Resume Debtor Workflow Source: https://docs.collectwise.co/api-reference/endpoint/Resume-Workflow Resumes the active workflow for a specified debtor, re-enabling outbound steps. ```APIDOC ## PATCH /workflow/{debtorId}/resume ### Description Resumes the active workflow for the specified debtor, re-enabling outbound steps. ### Method PATCH ### Endpoint /workflow/{debtorId}/resume ### Parameters #### Path Parameters - **debtorId** (string) - Required - Unique identifier of the debtor ### Request Example ```json { "example": "No request body needed for this operation" } ``` ### Response #### Success Response (200) - **message** (string) - Indicates that the debtor's workflow was resumed successfully. - **paused** (boolean) - False, indicating the workflow is no longer paused. #### Response Example ```json { "message": "Debtor's workflow resumed", "paused": false } ``` #### Error Responses - **400** - Debtor ID is required. - **401** - Invalid or missing API key. - **404** - Debtor not found or not enrolled. - **500** - Failed to resume workflow. ``` -------------------------------- ### POST /rpcCall Source: https://docs.collectwise.co/api-reference/endpoint/RPC-Call Initiates an RPC (Right Party Contact) call to verify debtor identity. This endpoint is used to make outbound calls to debtors for verification purposes. ```APIDOC ## POST /rpcCall ### Description Initiates an RPC (Right Party Contact) call to verify debtor identity. ### Method POST ### Endpoint /rpcCall ### Parameters #### Request Body - **toNumber** (string) - Required - Phone number to call in E.164 format (e.g., +18768828822) - **creditorName** (string) - Required - Name of the creditor - **debtorName** (string) - Required - Name of the debtor - **dob** (string) - Required - Debtor's date of birth (YYYY-MM-DD). Either dob or last4SSN must be provided - **last4SSN** (string) - Required - Last 4 digits of debtor's SSN. Either dob or last4SSN must be provided - **voicemailMessage** (string) - Optional - Message to leave if the call goes to voicemail - **callbackNumber** (string) - Required - Phone number in E.164 format that missed calls will be routed to upon callbacks - **agencyName** (string) - Optional - Optional name of the collection agency - **agentName** (string) - Optional - Optional name of the agent making the call, defaults to Nancy - **successNumber** (string) - Optional - Optional phone number in E.164 format to route the call to upon successful RPC - **customMessage** (string) - Optional - Optional message to be played after introduction but before RPC verification - **instantTransferToggle** (boolean) - Optional - When true, transfers the call to successNumber immediately after name verification, bypassing DOB/SSN verification (default: false) ### Request Example ```json { "toNumber": "+18768828822", "creditorName": "ABC Bank", "debtorName": "John Doe", "dob": "1980-01-01", "voicemailMessage": "Hello, this is an important message regarding your account...", "agencyName": "Midwest Collections", "agentName": "Nancy", "successNumber": "+18768828824", "callbackNumber": "+18768828825", "customMessage": "This call is regarding an important financial matter that requires your immediate attention.", "instantTransferToggle": false } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message indicating the RPC call was initiated. - **callId** (string) - Unique identifier for the initiated call. #### Response Example ```json { "message": "RPC call initiated successfully", "callId": "a1b2c3d4-e5f6-7890-1234-567890abcdef" } ``` #### Error Response (400, 500) - **code** (integer) - Error code. - **message** (string) - Description of the error. ``` -------------------------------- ### Retrieve Call Recording OpenAPI Specification Source: https://docs.collectwise.co/api-reference/endpoint/Get-Call-Recordings Defines the endpoint for fetching call recordings with optional transcript and analysis parameters. Requires an API key provided in the header. ```yaml openapi: 3.0.1 info: title: CollectWise API description: >- An API for managing debtors, tracking statuses, and automating debt collection processes license: name: MIT version: 1.0.0 servers: - url: https://collectwiseapi.com security: - apiKey: [] paths: /call/{callId}/recording: get: summary: Get Call Recording description: Retrieve call recording with optional transcript and analysis data parameters: - name: callId in: path required: true description: The unique identifier for the call schema: type: string - name: format in: query required: false description: Recording format schema: type: string enum: - standard - multichannel - scrubbed - scrubbed_multichannel default: standard - name: include_transcript in: query required: false description: Include call transcript schema: type: boolean default: false - name: include_analysis in: query required: false description: Include call analysis schema: type: boolean default: false responses: '200': description: Call recording retrieved successfully content: application/json: schema: $ref: '#/components/schemas/CallRecording' '400': description: Bad Request - Invalid parameters content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden - Invalid API key content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found - Call ID not found content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' components: schemas: CallRecording: type: object properties: recording_url: type: string description: URL to the audio recording file transcript: type: string description: Full conversation transcript (if requested) analysis: type: object description: Call analysis data (if requested) properties: in_voicemail: type: boolean description: Whether the call went to voicemail call_summary: type: string description: AI-generated summary of the call user_sentiment: type: string description: Detected user sentiment (Positive/Negative/Neutral) custom_analysis_data: type: object description: Additional analysis data call_successful: type: boolean description: Whether the call was successful required: - recording_url Error: type: object required: - code - message properties: code: type: integer format: int32 description: Error code message: type: string description: Error message example: code: 400 message: 'Invalid input: debtorName is required' securitySchemes: apiKey: type: apiKey in: header name: collectwise_key ``` -------------------------------- ### Error Handling Source: https://docs.collectwise.co/api-reference/endpoint/Bulk-Create-Debtors Standard error response format returned by the API when a request fails. ```APIDOC ## Error Response ### Description Standardized error object returned when the API encounters an issue processing a request. ### Response #### Error Response - **code** (integer) - Required - Error code - **message** (string) - Required - Error message #### Response Example { "code": 400, "message": "Invalid input: debtorName is required" } ``` -------------------------------- ### API Security Source: https://docs.collectwise.co/api-reference/endpoint/Create-Debtor Details on how to authenticate with the CollectWise API using an API key. ```APIDOC ## API Security ### Description Authentication with the CollectWise API is handled via an API key provided in the request header. ### Security Scheme - **Type**: API Key - **In**: Header - **Name**: `collectwise_key` ``` -------------------------------- ### API Security Scheme Source: https://docs.collectwise.co/api-reference/endpoint/Update-Debtor Details the API key authentication method used for securing requests. ```APIDOC ## API Security Scheme ### Description Requests to the Collectwise API must be authenticated using an API key provided in the request header. ### Scheme Details - **Type**: API Key - **Location**: Header - **Name**: `collectwise_key` ```