Speko Docs
API Reference

Callbacks

List, inspect, cancel, and dispatch scheduled callbacks created from call analysis.

GET
/v1/callbacks

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Query Parameters

status?string
Value in"scheduled" | "dispatching" | "dispatched" | "cancelled" | "failed"
source_session_id?string
limit?integer
Default25
Range1 <= value <= 100

Response Body

application/json

application/json

{
  "callbacks": [
    {
      "id": "string",
      "organization_id": "string",
      "source_session_id": "string",
      "created_session_id": "string",
      "agent_id": "string",
      "phone_number_id": "string",
      "to_number": "+12015551234",
      "from_number": "string",
      "scheduled_at": "2019-08-24T14:15:22Z",
      "status": "scheduled",
      "reason": "string",
      "instructions": "string",
      "summary": "string",
      "pipeline_config": {},
      "metadata": {},
      "failure_cause": "string",
      "attempted_at": "2019-08-24T14:15:22Z",
      "dispatched_at": "2019-08-24T14:15:22Z",
      "cancelled_at": "2019-08-24T14:15:22Z",
      "created_at": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z"
    }
  ]
}
{
  "error": "Unauthorized",
  "code": "UNAUTHORIZED"
}
GET
/v1/callbacks/{id}

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Resource id.

Response Body

application/json

application/json

{
  "id": "string",
  "organization_id": "string",
  "source_session_id": "string",
  "created_session_id": "string",
  "agent_id": "string",
  "phone_number_id": "string",
  "to_number": "+12015551234",
  "from_number": "string",
  "scheduled_at": "2019-08-24T14:15:22Z",
  "status": "scheduled",
  "reason": "string",
  "instructions": "string",
  "summary": "string",
  "pipeline_config": {},
  "metadata": {},
  "failure_cause": "string",
  "attempted_at": "2019-08-24T14:15:22Z",
  "dispatched_at": "2019-08-24T14:15:22Z",
  "cancelled_at": "2019-08-24T14:15:22Z",
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z"
}
{
  "error": "Unauthorized",
  "code": "UNAUTHORIZED"
}
POST
/v1/callbacks/{id}/cancel

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Resource id.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

{
  "id": "string",
  "organization_id": "string",
  "source_session_id": "string",
  "created_session_id": "string",
  "agent_id": "string",
  "phone_number_id": "string",
  "to_number": "+12015551234",
  "from_number": "string",
  "scheduled_at": "2019-08-24T14:15:22Z",
  "status": "scheduled",
  "reason": "string",
  "instructions": "string",
  "summary": "string",
  "pipeline_config": {},
  "metadata": {},
  "failure_cause": "string",
  "attempted_at": "2019-08-24T14:15:22Z",
  "dispatched_at": "2019-08-24T14:15:22Z",
  "cancelled_at": "2019-08-24T14:15:22Z",
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z"
}
{
  "error": "Unauthorized",
  "code": "UNAUTHORIZED"
}
POST
/v1/callbacks/{id}/dispatch

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Resource id.

Response Body

application/json

application/json

{
  "id": "string",
  "organization_id": "string",
  "source_session_id": "string",
  "created_session_id": "string",
  "agent_id": "string",
  "phone_number_id": "string",
  "to_number": "+12015551234",
  "from_number": "string",
  "scheduled_at": "2019-08-24T14:15:22Z",
  "status": "scheduled",
  "reason": "string",
  "instructions": "string",
  "summary": "string",
  "pipeline_config": {},
  "metadata": {},
  "failure_cause": "string",
  "attempted_at": "2019-08-24T14:15:22Z",
  "dispatched_at": "2019-08-24T14:15:22Z",
  "cancelled_at": "2019-08-24T14:15:22Z",
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z"
}
{
  "error": "Unauthorized",
  "code": "UNAUTHORIZED"
}