Skip to main content
POST
/
v1.5
/
GeoScrub
/
IsTimeLegalToCall
Returns a boolean true or false if a phone number call is permitted on a provided datetime. If the call is permitted, also provides number of seconds remaining in legal calling window.
curl --request POST \
  --url https://dataapi.dncscrub.com/v1.5/GeoScrub/IsTimeLegalToCall \
  --header 'Content-Type: application/json' \
  --data '
{
  "IsTimeLegalToCall": [
    {
      "PhoneNumber": "<string>",
      "CallProposedDateTimeInUTC": "2023-11-07T05:31:56Z",
      "DNCProjId": "<string>"
    }
  ]
}
'
[
  {
    "Response": [
      {
        "PhoneNumber": "<string>",
        "IsCallPermitted": true,
        "SecondsInCallWindow": 123
      }
    ]
  }
]

Request Parameters

ParameterTypeRequiredDescription
PhoneNumberstringYesThe phone number to check
CallProposedDateTimeInUTCdatetimeNoThe proposed call time in UTC. Defaults to current UTC time if not provided or null.
DNCProjIdstringNoDNCScrub project ID for custom calling hours. If provided, must be a valid project accessible by your account.
The CallProposedDateTimeInUTC parameter is optional. If omitted or set to null, the API will use the current UTC time, making it easy to check if a call is legal right now without having to calculate the current time yourself.

Headers

loginId
string

LoginId (aka APIKey)

Body

Response

Success

Response
object[] | null