HCC Docs

Supervision

The live floor: queues, reps, calls and queued calls

GET /v1/floor floor:read

Responses

  • 200

    The floor

    Fields
    • data Floor required

      The live floor of the key's environment: queues with today's service level, reps, calls and queued calls. The dashboard wallboard shows the same picture.

      Fields
      • environment "live" | "test" required
      • at string required
      • queues object[] required
      • reps object[] required
      • calls object[] required
      • queued object[] required
  • 400

    Invalid request

  • 401

    Missing or invalid API key

  • 404

    Not found

  • 429

    rate_limited, or another limit named by error.code

Monitor a rep's call: listen, whisper or barge

POST /v1/calls/{id}/monitor floor:write

Dials to into the call with the mode's flags. Only calls with a rep on them can be monitored (409 otherwise).

Path

  • id string required

Body

  • mode "listen" | "whisper" | "barge"

    listen (muted), whisper (only the rep hears) or barge Default "listen".

  • to string required

    The supervisor's phone (E.164), or client:<identity> for a softphone

Responses

  • 201

    The monitor session

    Fields
    • data MonitorSession required

      A supervisor's leg on a rep's call. The mode is the leg's participant flags: listen is muted, whisper coaches the rep, barge is heard by everyone.

      Fields
      • id string required
      • callId string required
      • supervisorId string | null required

        The supervising member; null when an API key started it

      • supervisorName string | null required
      • repId string required
      • participantId string required

        The supervisor's participant on the call

      • mode "listen" | "whisper" | "barge" required

        listen (muted), whisper (only the rep hears) or barge

      • to string required

        Where the monitor leg rings

      • muted boolean required
      • status "connecting" | "active" | "ended" required
      • endReason "ended" | "hangup" | "failed" | "rep_left" | "call_ended" | "took_over" | null required
      • createdAt string required
      • joinedAt string | null required
      • endedAt string | null required
      • changes object[] required
  • 400

    Invalid request

  • 401

    Missing or invalid API key

  • 404

    Not found

  • 409

    The call or session is not in a state to do this

  • 429

    rate_limited, or another limit named by error.code

Switch mode, or mute the supervisor

PATCH /v1/monitors/{id} floor:write

Path

  • id string required

Body

  • mode "listen" | "whisper" | "barge"

    listen (muted), whisper (only the rep hears) or barge

  • muted boolean

    The supervisor mutes themselves

Responses

  • 200

    The monitor session

    Fields
    • data MonitorSession required

      A supervisor's leg on a rep's call. The mode is the leg's participant flags: listen is muted, whisper coaches the rep, barge is heard by everyone.

      Fields
      • id string required
      • callId string required
      • supervisorId string | null required

        The supervising member; null when an API key started it

      • supervisorName string | null required
      • repId string required
      • participantId string required

        The supervisor's participant on the call

      • mode "listen" | "whisper" | "barge" required

        listen (muted), whisper (only the rep hears) or barge

      • to string required

        Where the monitor leg rings

      • muted boolean required
      • status "connecting" | "active" | "ended" required
      • endReason "ended" | "hangup" | "failed" | "rep_left" | "call_ended" | "took_over" | null required
      • createdAt string required
      • joinedAt string | null required
      • endedAt string | null required
      • changes object[] required
  • 400

    Invalid request

  • 401

    Missing or invalid API key

  • 404

    Not found

  • 409

    The call or session is not in a state to do this

  • 429

    rate_limited, or another limit named by error.code

End the monitor session: the supervisor's leg leaves

DELETE /v1/monitors/{id} floor:write

Path

  • id string required

Responses

  • 200

    The ended session

    Fields
    • data MonitorSession required

      A supervisor's leg on a rep's call. The mode is the leg's participant flags: listen is muted, whisper coaches the rep, barge is heard by everyone.

      Fields
      • id string required
      • callId string required
      • supervisorId string | null required

        The supervising member; null when an API key started it

      • supervisorName string | null required
      • repId string required
      • participantId string required

        The supervisor's participant on the call

      • mode "listen" | "whisper" | "barge" required

        listen (muted), whisper (only the rep hears) or barge

      • to string required

        Where the monitor leg rings

      • muted boolean required
      • status "connecting" | "active" | "ended" required
      • endReason "ended" | "hangup" | "failed" | "rep_left" | "call_ended" | "took_over" | null required
      • createdAt string required
      • joinedAt string | null required
      • endedAt string | null required
      • changes object[] required
  • 400

    Invalid request

  • 401

    Missing or invalid API key

  • 404

    Not found

  • 409

    The call or session is not in a state to do this

  • 429

    rate_limited, or another limit named by error.code

Take the call over from the rep

POST /v1/monitors/{id}/take-over floor:write

Barge first (409 otherwise). The rep leaves; the supervisor stays on the call.

Path

  • id string required

Responses

  • 200

    The session, ended with took_over

    Fields
    • data MonitorSession required

      A supervisor's leg on a rep's call. The mode is the leg's participant flags: listen is muted, whisper coaches the rep, barge is heard by everyone.

      Fields
      • id string required
      • callId string required
      • supervisorId string | null required

        The supervising member; null when an API key started it

      • supervisorName string | null required
      • repId string required
      • participantId string required

        The supervisor's participant on the call

      • mode "listen" | "whisper" | "barge" required

        listen (muted), whisper (only the rep hears) or barge

      • to string required

        Where the monitor leg rings

      • muted boolean required
      • status "connecting" | "active" | "ended" required
      • endReason "ended" | "hangup" | "failed" | "rep_left" | "call_ended" | "took_over" | null required
      • createdAt string required
      • joinedAt string | null required
      • endedAt string | null required
      • changes object[] required
  • 400

    Invalid request

  • 401

    Missing or invalid API key

  • 404

    Not found

  • 409

    The call or session is not in a state to do this

  • 429

    rate_limited, or another limit named by error.code

Move a queued call to another queue, or to a free rep

POST /v1/queue-calls/{id}/reassign floor:write

The id is the call id. The call keeps its place in line.

Path

  • id string required

Body

  • queue string

    Move it to this queue

  • repId string

    Or offer it to this rep, who must be free

  • priority integer

    0 to 100.

Responses

  • 200

    What moved

    Fields
    • data QueueCallReassigned required
      Fields
      • callId string required
      • transferId string required
      • fromQueue string | null required
      • toQueue string | null required
      • repId string | null required
  • 400

    Invalid request

  • 401

    Missing or invalid API key

  • 404

    Not found

  • 409

    The call or session is not in a state to do this

  • 429

    rate_limited, or another limit named by error.code