Skip to main content
The is_time_legal_to_call tool checks if it is currently legal to call a phone number based on the recipient’s local time and state regulations. Use this for real-time call decisions.

When to Use

  • Before initiating an outbound call
  • Real-time compliance checking in dialers
  • Voice AI pre-call screening

Parameters

phoneNumbers
array
required
Array of objects containing phone numbers and proposed call times.
loginId
string
API key. Only required if not provided via the x-dncscrub-api-key HTTP header.

Response

success
boolean
Whether the API call succeeded.
results
array
Array of results, one per phone number.
errorCode
string
Machine-readable error code (when failed).
errorMessage
string
Human-readable error description (when failed).

Examples

{
  "phoneNumbers": [
    {
      "phoneNumber": "5039367187",
      "callProposedDateTimeInUTC": "2024-01-15T18:30:00Z"
    }
  ]
}

Usage Notes

  • Use current UTC time for real-time decisions
  • secondsRemaining tells you how long you have before the calling window closes
  • Different states have different calling hour restrictions
  • Some states have additional restrictions on Sundays and holidays
  • For planning future calls, use get_legal_call_times instead