Create scheduled callback

Books a callback for a chosen time, to one agent or to a queue. Send exactly one of user_id and queue_id.

To an agent. With user_id, this books an Agent callback. Requires the tasks.scheduled_callbacks.manage scope. With "Enable agent callback" off in System settings, the request answers 403.

To a queue. With queue_id, this books an API queue callback. Requires the tasks.api_queue_callbacks.manage scope. The queue must have its "API queue callback" section on, otherwise the request answers 422. "Enable agent callback" and the queue's "In-queue callback" section do not affect this booking. The queue strategy picks the agent at each try, and the Caller ID group comes from the "API queue callback" section. Tries follow the "Queue callbacks" group in System settings.

A booking to a queue does not take user_id, caller_id_group_id or a related_call destination: each gives 422.

Preferred agent. A booking to a queue may name a preferred agent in preferred_user_id. At each try the call goes to that agent while the agent is Available, before the queue strategy picks; otherwise the queue strategy picks at once. The preferred agent must be an agent of the Callcenter, a member of the queue and not an AI agent; "Enable agent callback" of that agent does not matter. Any other value does not reject the booking: it is booked without a preferred agent, and the response carries warnings.preferred_user_id with the reason. A booking to an agent does not take preferred_user_id: together with user_id it gives 422.

Duplicates. One phone number has at most one waiting Queue callback in each queue:

  • An API queue callback is already waiting: the booking gets 422.
  • An In-queue callback is waiting and rings at the same time as the booking or earlier: the booking gets 422.
  • An In-queue callback is waiting and rings later than the booking: that In-queue callback is cancelled and the booking is accepted.

A booking rejected as a duplicate answers {"errors":{"waiting_callback_id":123}}, with the ID of the waiting callback.

The Create scheduled callback endpoint books a callback for a chosen time, to one agent or to a queue. This is useful when you want to schedule callbacks from a third party system, such as a CRM.

Requirements: Base URL, Authentication, Error codes

Scope: tasks.scheduled_callbacks.manage to book an Agent callback, tasks.api_queue_callbacks.manage to book an API queue callback

What this does

Send exactly one of user_id and queue_id:

  • With user_id, Voiso books an Agent callback: a callback to that agent.
  • With queue_id, Voiso books an API queue callback: a callback to that queue. The queue strategy selects the agent at each attempt, unless the callback has an Available preferred agent.

If the request is accepted, the API returns a scheduled_callback object that includes the callback ID, its type and its current status.

When to use it

  • Schedule a callback for an agent from a CRM or ticketing tool
  • Book a callback to a queue, so that an agent of the queue calls the contact back
  • Give the callback to the agent who spoke with the contact before, when that agent is Available
  • Create a callback linked to a previous call

Prerequisites

Agent callback:

  • Enable agent callback must be on in System settings.
  • The agent must have permission to use agent callbacks.

API queue callback:

  • The API queue callback section of the queue must be on.
  • Enable agent callback and the In-queue callback section of the queue do not affect this booking.

Endpoint


POST /api/v4/tasks/scheduled_callbacks

Request body

Required fields

  • user_id or queue_id
    Send exactly one. user_id is the ID of the agent who handles an Agent callback. queue_id is the ID of the queue of an API queue callback.
  • scheduled_at
    Date and time of the callback (ISO 8601). A time with no offset is read as UTC. The time must be in the future, no more than 30 days ahead, and from 08:00 to 21:59 in the time zone of the callback. Seconds must be 00.
  • destination
    Where the callback should go. This is a typed object. See Destination types.

Optional fields

  • timezone
    IANA time zone of the callback, in which the 08:00 to 21:59 rule of scheduled_at is checked. When not set, an Agent callback uses the time zone of the agent, and an API queue callback uses the contact center Time zone.
  • move_to_calling_window
    When true, a scheduled_at outside 08:00 to 21:59 moves to the next 08:00. Without this field, such a time gives 422.
  • note
    Notes for the agent. Maximum length is 64 characters. Agent Panel and Agent Workspace show the note when the callback rings.
  • caller_id_group_id
    Caller ID group to use for an Agent callback. An API queue callback takes the Caller ID group of the API queue callback section of the queue, and does not take this field.
  • preferred_user_id
    ID of the preferred agent of an API queue callback. See Preferred agent. An Agent callback does not take this field.

Destination types

The destination object must include a type and the fields required by that type:

  • phone_number
    Use when you want to schedule a callback to a specific phone number.
  • related_call
    Use when you want to create the callback in relation to an existing call. Agent callback only: a booking to a queue with this type gives 422.
  • external_system
    Use when you want to store external system metadata for the callback.

Preferred agent

An API queue callback can name a preferred agent in preferred_user_id, for example the agent who spoke with the contact before.

  • At each attempt, if the preferred agent is Available, the callback rings that agent first. Otherwise, the queue strategy selects an agent at once.
  • If the preferred agent does not answer or declines the call, the queue strategy selects another agent in the same attempt.
  • The skills of the queue do not stop an Available preferred agent from getting the call.
  • The preferred agent must be an agent of the queue, and not an AI agent. The agent does not need permission to use agent callbacks.
  • If the agent cannot be the preferred agent, the callback is still booked, without a preferred agent. The response then includes warnings.preferred_user_id with the reason: agent not found, agent is not in the queue or AI agent cannot be a preferred agent.
  • If the preferred agent is removed from the queue or deleted after the booking, the queue strategy selects the agent.
  • The extra attempt in the failover queue of the Queue callbacks settings ignores the preferred agent.

To change or remove the preferred agent of a waiting callback, use Update scheduled callback.

Duplicates

One phone number has at most one waiting queue callback in each queue:

  • An API queue callback is already waiting: the booking gets 422.
  • An In-queue callback is waiting and rings at the same time as the booking or earlier: the booking gets 422.
  • An In-queue callback is waiting and rings later than the booking: that In-queue callback is cancelled and the booking is accepted.

A booking rejected as a duplicate returns the ID of the waiting callback:

{ "errors": { "waiting_callback_id": 123 } }

Examples

Book an Agent callback to a phone number

curl -X POST "https://{cluster_id}.voiso.com/api/v4/tasks/scheduled_callbacks" \
  -H "Authorization: Bearer <contact_center_api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "user_id": 1234,
    "scheduled_at": "2025-12-12T10:00:00Z",
    "destination": {
      "type": "phone_number",
      "phone_number": "18885658889"
    },
    "note": "Follow up call"
  }'

Book an Agent callback related to an existing call

curl -X POST "https://{cluster_id}.voiso.com/api/v4/tasks/scheduled_callbacks" \
  -H "Authorization: Bearer <contact_center_api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "user_id": 1234,
    "scheduled_at": "2025-12-12T10:00:00Z",
    "caller_id_group_id": 1,
    "destination": {
      "type": "related_call",
      "call_id": "54ae2354-2f6e-485a-bad5-dbdf1463ea2d"
    }
  }'

Book an API queue callback with a preferred agent

curl -X POST "https://{cluster_id}.voiso.com/api/v4/tasks/scheduled_callbacks" \
  -H "Authorization: Bearer <contact_center_api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "queue_id": 12,
    "preferred_user_id": 1234,
    "scheduled_at": "2025-12-12T10:00:00Z",
    "timezone": "Europe/Riga",
    "destination": {
      "type": "phone_number",
      "phone_number": "18885658889"
    },
    "note": "Asked about the invoice"
  }'

Book an API queue callback with external system metadata

curl -X POST "https://{cluster_id}.voiso.com/api/v4/tasks/scheduled_callbacks" \
  -H "Authorization: Bearer <contact_center_api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "queue_id": 12,
    "scheduled_at": "2025-12-12T10:00:00Z",
    "destination": {
      "type": "external_system",
      "system": "mycrm",
      "account_id": "ACC01"
    }
  }'

Response

If successful, the API returns 201 Created with the booked callback.

An API queue callback with a preferred agent:

{
  "scheduled_callback": {
    "id": 150,
    "type": "api_queue_callback",
    "phone_number": "18885658889",
    "scheduled_at": "2025-12-12T12:00:00.000000+02:00",
    "user": null,
    "preferred_user": {
      "id": 1234,
      "name": "Jane Doe",
      "email": "[email protected]"
    },
    "caller_id_group": null,
    "queue": {
      "id": 12,
      "name": "Technical Support"
    },
    "note": "Asked about the invoice",
    "related_call": null,
    "source": null,
    "status": "pending",
    "created_at": "2025-12-10T09:15:00.123456Z",
    "updated_at": "2025-12-10T09:15:00.123456Z"
  }
}

An Agent callback:

{
  "scheduled_callback": {
    "id": 149,
    "type": "agent_callback",
    "phone_number": "18885658889",
    "scheduled_at": "2025-12-12T12:00:00.000000+02:00",
    "user": {
      "id": 1234,
      "name": "Jane Doe",
      "email": "[email protected]"
    },
    "preferred_user": null,
    "caller_id_group": {
      "id": 1,
      "name": "Default"
    },
    "queue": null,
    "note": "Follow up call",
    "related_call": null,
    "source": null,
    "status": "pending",
    "created_at": "2025-12-10T09:15:00.123456Z",
    "updated_at": "2025-12-10T09:15:00.123456Z"
  }
}

A booking accepted with a warning also includes warnings. Here the preferred agent was not saved, and the queue strategy selects the agent:

{
  "scheduled_callback": {
    "id": 151,
    "type": "api_queue_callback",
    "preferred_user": null,
    "status": "pending"
  },
  "warnings": {
    "preferred_user_id": ["agent is not in the queue"]
  }
}

The other fields of scheduled_callback are left out of this example.

Notes

  • The product calls a callback to one agent an Agent callback. Paths, scope names and operation names of this API keep the older name "scheduled callback".
  • scheduled_at is returned in ISO 8601 format, with the offset of the time zone of the callback.
  • To change or cancel a waiting callback, use Update scheduled callback or Cancel scheduled callback.

Troubleshooting

401 Unauthorized

What to check:

  • You are sending Authorization: Bearer <contact_center_api_key>.
  • Your Base URL includes the correct {cluster_id}.

403 Forbidden

Common causes:

  • Your API key does not have the scope of the booking: tasks.scheduled_callbacks.manage for an Agent callback, tasks.api_queue_callbacks.manage for an API queue callback.
  • Agent callback: Enable agent callback is off in System settings.

422 Unprocessable Entity

The request is well formed JSON, but one or more fields failed validation.

Common causes:

  • Both user_id and queue_id are sent, or neither.
  • user_id does not match an existing agent, or the agent does not have permission to use agent callbacks.
  • The API queue callback section of the queue is off.
  • A booking to a queue includes caller_id_group_id or a related_call destination.
  • preferred_user_id is sent with user_id, or is not an integer.
  • scheduled_at is missing, in the past, more than 30 days ahead, outside 08:00 to 21:59 without move_to_calling_window, or has seconds other than 00.
  • destination.type is missing or invalid, or the destination fields do not match it.
  • The phone number already has a waiting queue callback in the queue. See Duplicates.

An agent who cannot be the preferred agent does not give 422. See Preferred agent.

429 Too many requests

What to do:

  • Reduce request frequency and retry with backoff.
Body Params
integer
required

The unique identifier of the user who will handle an Agent callback. Send this or queue_id.

integer

The unique identifier of the queue of an API queue callback. Send this or user_id.

date-time
required

Date and time when the callback call is scheduled to be placed (ISO 8601). A time with no offset is read as UTC.

The time must be in the future and no more than 30 days ahead.
In the time zone of the callback (see timezone), the time must be from 08:00 to 21:59, unless move_to_calling_window moves it. Any minute is accepted.
Seconds must be 00.

integer | null

Identifier of the caller ID group to use for an Agent callback. A booking to a queue does not take it.

string | null

IANA time zone of the callback, in which the 08:00 to 21:59 rule of scheduled_at is checked. When not set, an Agent callback uses the time zone of the user, and an API queue callback uses the Callcenter "Time zone".

boolean | null
Defaults to false

Applies to both kinds of booking. When true, a scheduled_at outside 08:00 to 21:59 in the time zone of the callback moves to the next 08:00: 23:00 moves to 08:00 of the next day, 03:00 to 08:00 of the same day. The other rules of scheduled_at then apply to the moved time.

Without this field, such a time gives 422.

destination
required

Destination for the callback. A booking to a queue takes phone_number or external_system; related_call gives 422.

string | null

Notes associated with the callback request. Agent Panel and Agent Workspace show the note when an API queue callback rings.

integer | null

The unique identifier of the preferred agent of an API queue callback. A booking to an agent does not take it. An agent who cannot be the preferred agent does not reject the booking; see warnings in the response.

Responses

Language
Credentials
Bearer
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json