Please ensure Javascript is enabled for purposes of website accessibility
Register a Callback
  • 12 Jan 2024
  • 2 Minutes to read
  • Dark
    Light
  • PDF

Register a Callback

  • Dark
    Light
  • PDF

Article summary

Post
/api/widget/{widget_id}/request_callback
Body parameters
Expand All
object
widget_id
string

Unique Widget identifier that can be retrieved from the Widget API Endpoints modal window

contact_number
string

Telephone number to be dialed when the callback is launched

appointment_time
string

(Optional) UTC time to launch the callback, encoded as a Unix timestamp. The input time must be one of the values of scheduled_timeslots returned with the widget status. If omitted, an ASAP callback will be requested. If included, a scheduled callback will be requested.

user_data
object

(Optional) JSON object representing user data key-value pairs. Only keys that are allowed by the Widget’s User Data Set are submitted to Mindful Callback.

channel
string

(Optional) Specifies the origin of the callback request. For example, if the callback request was made during an interaction with a mobile app or chatbot, the values "mobile" or "chatbot" could be passed to differentiate the calls in analytics or reporting.

Responses
200

Requested - The submitted callback request has been accepted. Expect to receive a callback at the indicated time.

400

ContactRequired - The submitted callback request has been accepted. Expect to receive a callback at the indicated time.
InvalidContact - The submitted telephone number does not satisfy the validation rules configured by Callback.
InvalidTimeZone - An unsupported time zone offset was requested.
InvalidRequest - The body of the HTTP POST was malformed and could not be parsed.
InvalidParameters - The contents of the request body were incorrect.
RequestRefusedDueToOperationMode - The Widget is not currently in a state that supports the requested callback type.
DuplicateRequest - A callback request for the same phone number is currently being processed. Once the request has been processed (this may take up to 10 seconds), subsequent callback requests for this number may be made.
AppointmentTimeInThePast - The appointment time submitted in the callback request is in the past.
AppointmentTimeFull - The appointment time submitted in the callback request is no longer available.
AppointmentSlotNotFound - The appointment time submitted in the callback request is not valid.

401

Unauthorized - The request did not adhere to the Access Control Policies configured for the endpoint. Either the source IP address or API Access Token for the request was incorrect.

Expand All
object
data
Array of object (CallObjectRequest)
object
status
string

Status of the callback request

message
string

Provides the API Message configured to be returned by the Widget in response to a successful callback request

callback_request_id
string

Callback Request identifier. Can be used for your application’s logging. This item is only included in the response to a successfully requested ASAP or scheduled callback.

requested_at
number

The time the callback request was made (in UTC), encoded as a Unix Timestamp. This item is only included in the response to a successfully requested ASAP or scheduled callback.

appointment_time
string

The time in UTC that a scheduled callback will be launched. This value is encoded as a Unix Timestamp. This item is only included in the response to a successfully requested scheduled callback.

ewt
number

The ECBT for the call, in seconds. This item is only included in the response to a successfully requested ASAP callback.

404

WidgetNotFound - The Widget ID included in the callback request is unknown or the identified Widget is not enabled.

429

IPRequestLimit - The rate limit for callback requests from a given IP address has been reached.
ContactNumberRequestLimit - The rate limit for callback requests to a given phone number has been reached.

500

RequestTimeout - Scheduler could not process the request within 10 seconds.
InternalServerError - Scheduler encountered an error when processing the callback request.

503

ServiceUnavailable - Scheduler is experiencing an outage and cannot process callback requests.


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.