SparkTG

Get effective breaks (v2) Documentation

Get effective breaks (v2)

v2

Get effective breaks (v2)

Break statuses agents can use, optionally for one agent

API v2v21 Endpoint

Overview

List the break statuses agents can use in your service, for example to fill an agent's status dropdown in a CRM or CTI. "Effective" means the breaks agents can currently use: the default breaks your admin hasn't turned off, plus any custom breaks they have turned on. Breaks turned off for the whole service are not in the list. The list is always for the token's service. Pass agent-id to also see which breaks an admin has hidden for that agent. Not metered.

Available Endpoints

GET/api/v2/effective-breaks

Key Parameters

agent-id(Integer)

The agent's ID (the id returned by GET /api/v2/agents). When sent, breaks an admin has hidden for this agent come back with "disabled": true. Leave it out, or send it empty, to get the service list with no agent-specific flags. The agent must be active and belong to the token's service.

Usage Scenarios

Breaks for the whole service

No parameters. Use this when you don't have a specific agent in mind, for example to show break names in a report. Response shortened; a typical service has around a dozen breaks.

0 ParametersAvailable in Examples

Breaks for one agent

Pass agent-id. Here an admin has hidden Leave for agent 319, so it comes back with "disabled": true. The break is still in the list so you can show its name and colour; just don't let the agent pick it.

0 ParametersAvailable in Examples

Quick Example

Try this API with a simple cURL command

Basic API Call
curl 'https://telephonycloud.co.in/api/v2/effective-breaks' \
  -H 'Authorization: Bearer <YOUR_TOKEN>'
💡 Replace <YOUR_TOKEN> with your API token

Response Preview

Sample response from this API

Sample Response
[{"break_id":0,"label":"Available","icon":"available","color":"#5ccc56","is_system":true,"sort_order":1,"is_deleted":false,"category":"SYSTEM"},{"break_id":1,"label":"Meal","icon":"lunch","color":"#F4...
View complete response format in Response section