Customer Schedule Sync
Sync customer schedule by creating or updating customer and recreating their call schedule. This endpoint is idempotent.
Overview
This endpoint provides an idempotent way to sync a customer’s call schedule. It will:- Create or update the customer with the provided data
- Remove all pending tasks for the customer
- Create a new call schedule based on the task type
Authentication
Authentication viaX-API-Key header. See Authentication for details.
Request Body
The request accepts the same fields as the Create Customer endpoint, with all the same validations and requirements.Required Fields
id- External customer reference IDfirstName- Customer’s first namelastName- Customer’s last nameemail- Customer email addressbirthday- Customer birthday (YYYY-MM-DD format)ssnLastFour- Last 4 digits of SSNphoneNumber- Customer’s phone number (required) - Used for automated calling and SMS communicationstimezone- Customer’s timezone as an IANA timezone name (e.g., “America/New_York”, “America/Los_Angeles”, “America/Chicago”) (required) - Required for TCPA compliance to ensure calls are made during appropriate hours. Must be a valid IANA timezone identifier.taskType- Task type for customer’s call schedulestreetAddress1- Street address line 1city- City namestate- State code (e.g., “NY”, “CA”)zipCode- ZIP/postal code
Optional Fields
doNotCall- Whether to mark customer for Do Not Call (optional; if not provided, existing value is preserved)test- Mark customer as test customer (default: false)externalMetadata- Custom JSON object with additional customer datastreetAddress2- Street address line 2loanId- LMS loan ID for enrichmentsync- Whentrue, auto-fetch missing customer data from your company’s LMS (default:false). See the Create Customer endpoint for details.
Response Body
The API returns all customer fields that were provided in the request body, along with any computed fields and sync operation metadata. This includes:- Basic Information:
id,firstName,lastName,email,phoneNumber,timezone - Personal Information:
birthday,ssnLastFour - Address Information:
streetAddress1,streetAddress2,city,state,zipCode - Configuration:
taskType,doNotCall,isTest - Custom Data:
externalMetadata- The complete metadata object you provided - Sync Metadata:
schedule_created,tasks_created,existing_tasks_removed- Information about the sync operation performed
Sync Metadata Fields
In addition to all the customer fields, the response includes three metadata fields that describe the sync operation:-
schedule_created(boolean): Whether a new schedule was created during this sync operation. This will betrueif the customer has both a valid timezone and phone number, andfalseif either is missing. -
tasks_created(integer): The number of new tasks created as part of the schedule. -
existing_tasks_removed(integer): The number of pending tasks that were removed before creating the new schedule. This ensures a clean slate for the new schedule and prevents duplicate tasks.
Schedule Creation
The response will indicate whether the schedule was successfully created via theschedule_created field.
Do Not Call Validation
If an existing customer is already marked as Do Not Call, the endpoint will return a 400 error unless you explicitly setdoNotCall: false in the request.
Behavior:
- If
doNotCallis not provided (omitted from request) and the customer has Do Not Call status → Error (prevents accidental schedule creation) - If
doNotCall: trueand the customer has Do Not Call status → Error (attempting to maintain Do Not Call while creating schedule) - If
doNotCall: falseand the customer has Do Not Call status → Success (explicitly removing Do Not Call and creating schedule) - If
doNotCallis not provided and the customer does NOT have Do Not Call status → Success (preserves existing state)
Idempotency
This endpoint is designed to be idempotent:- If a customer with the given
idexists, it will be updated - All pending tasks are removed before creating the new schedule
- Calling the endpoint multiple times with the same data produces the same result
- Safe for retries in case of network failures or integration workflows
Use Cases
This endpoint is useful for:- Re-syncing customer data from external systems
- Resetting call schedules after customer information changes
- Bulk customer updates where you want to ensure consistent state
- Integration workflows that need guaranteed idempotency
Authorizations
Body
Customer data to sync
Unique identifier for the customer. This is your customer reference and should match your internal system's ID.
Type of tasks to create for the customer's automated call schedule. Valid values depend on company configuration. This field is required.
"collections"
The first name of the customer
The last name of the customer
Customer email address
Customer birthday in YYYY-MM-DD format
"1985-06-15"
Last 4 digits of SSN
"1234"
Timezone of the customer (IANA timezone name, e.g., 'America/New_York', 'America/Los_Angeles')
Phone number of the customer
Street address line 1
"123 Main St"
Street address line 2 (optional)
"Apt 4B"
City
"San Francisco"
State code
"CA"
ZIP/postal code
"94102"
Do not call the customer
Indicates if this is a test customer
Mark customer as test customer
Additional custom metadata about the customer (e.g. employer information, pay schedule, additional contact details)
Array of loan IDs to import. If provided, only these loans are imported. If omitted, all loans are imported.
[123, 456, 789]When true, auto-fetch missing customer data from your integrated lending system. Defaults to false.
Loan reference ID for enrichment. Distinct from loanIds which filters loan imports.
Response
Customer schedule synced successfully
Customer ID (reference_id)
Customer's first name
Customer's last name
Whether a new schedule was created during this sync operation
true
Number of new tasks created as part of the schedule
1
Number of pending tasks that were removed before creating the new schedule
3
Customer email address
Customer birthday in YYYY-MM-DD format
Last 4 digits of SSN
Timezone of the customer (IANA timezone name, e.g., 'America/New_York', 'America/Los_Angeles')
Phone number of the customer
Street address line 1
Street address line 2 (optional)
City name
State code (e.g., NY, CA)
ZIP/postal code
Do not call the customer
Indicates if this is a test customer
Type of tasks created for the customer's automated call schedule
Additional custom metadata about the customer