/api/task/v1/scheduled_callbacks
  • 16 Oct 2024
  • 2 Minutes to read
  • Dark
    Light
  • PDF

/api/task/v1/scheduled_callbacks

  • Dark
    Light
  • PDF

Article summary

Post
/api/task/v1/scheduled_callbacks

Enables agents to create a scheduled callback from a third-party application, such as a CRM, via the API. Agents are identified by their email in the agent field.

Header parameters
Authorization: Bearer token
stringRequired
Body parameters
Valid params
{
  "contact_number": "1234567890",
  "agent": "agent@email.com",
  "time_zone": "Asia/Almaty",
  "scheduled_time": "2024-01-01T10:00:00Z",
  "context_notes": "Customer was busy, asked to callback later",
  "cid_group": "CID group for Abc region",
  "related_call_id": "046296f8-ac21-4c02-a85d-92a6578dd2ea",
  "external_contact_id": "2",
  "external_system_id": "Abc CRM"
}
Invalid params
{
  "contact_number": "-a-(234)-321",
  "agent": "agent@emailcom",
  "time_zone": "It is not a time zone",
  "scheduled_time": "2020-01-01T12:34:56Z",
  "context_notes": "very important note, but includes more than 64 chars, because it's an example",
  "cid_group": "CID group for Abc region"
}
object
contact_number
string Required

Contact phone number for callback

Example1234567890
agent
string Required

Agent username(email) used for sign-in

Exampleagent@email.com
time_zone
string

Customer's IANA time zone. If not provided, Agent's time zone is set by default

ExampleAlmaty
scheduled_time
string (date-time) Required

Desired date and time, within 30 days, 08:00-22:00, 30-min intervals, 00 seconds in iso8601 format

Example2024-01-01T10:00:00Z
context_notes
string

Agent's context notes, with a maximum of 64 characters for adding relevant information

ExampleCustomer was busy, asked to callback later
cid_group
string

CID group label that will be applied to this callback. If not provided, the Default CID Group is set by default

ExampleCID group for Abc region
related_call_id
string (uuid)

The UUID of the call from which the callback was scheduled

Example046296f8-ac21-4c02-a85d-92a6578dd2ea
external_contact_id
string

Foreign Key to CRM record of contact

Example2
external_system_id
string

CRM name

ExampleAbc CRM
Responses
201

All parameters are valid and the Scheduled Callback was created

{
  "id": 1
}
object
id
integer
Example1
401

An invalid API key was passed or user not found

{
  "error": "The API key specified is invalid"
}
object
error
string
ExampleThe API key specified is invalid
403

No access to Scheduled Callback feature

Scheduled Callback feature disabled
{
  "error": "Scheduled Callbacks feature is disabled"
}
Agent does not have access to Scheduled Callback feature
{
  "error": "Agent does not have access"
}
object
error
string
ExampleForbidden
422

Body params are invalid

Params missing
{
  "errors": {
    "agent": [
      "agent is missing"
    ],
    "contact_number": [
      "phone number is missing"
    ],
    "scheduled_time": [
      "scheduled time is missing"
    ]
  }
}
Agent does not exist
{
  "errors": {
    "agent": [
      "test@email.com does not exist"
    ]
  }
}
CID Group does not exist
{
  "errors": {
    "cid_group": [
      "CID group for Abc region does not exist"
    ]
  }
}
Context is too long
{
  "errors": {
    "context_notes": [
      "is too long (maximum is 64 characters)"
    ]
  }
}
Time zone is incorrect
{
  "errors": {
    "time_zone": [
      "is not included in the list"
    ]
  }
}
Scheduled time incorrect format
{
  "errors": {
    "scheduled_time": [
      "incorrect format. Use YYYY-MM-DDThh:mm:ssTZD (iso8601)"
    ]
  }
}
Scheduled time incorrect time
{
  "errors": {
    "scheduled_time": [
      "should be in the future, but less than 30 days from now",
      "hours should be between 8 and 22 hours in the specified time zone",
      "minutes should be either 00 or 30",
      "seconds should be 00"
    ]
  }
}
Scheduled time incorrect minutes for the specific time zone (e.g. (UTC+05:45) Kathmandu)
{
  "errors": {
    "scheduled_time": [
      "minutes should be either 15 or 45"
    ]
  }
}
Expand All
object
errors
object
limit
Array of string
string
Examplemust be greater than 0
429

Too many requests


Was this article helpful?