Native Focus REST API
Overviewβ
Welcome, developer adventurer! Once you have enabled the Focus API in your account admin section, youβre ready to interact directly with the Focus REST API. These endpoints let you search, retrieve and sync data on people, subscribers, communications, groups and endpoints.
Authenticationβ
First things first, youβll need to authenticate and acquire your Bearer token.
Requestβ
- Type:
POST
- URL:
{{baseUrl}}/authWithAPIKey
- Content-Type:
application/json
- Body:
{
"apiKey": "YOUR-API-KEY-XYZ",
"username": "yourUsername",
"clientId": 0000000
}
Replace
"YOUR-API-KEY-XYZ"
,"yourUsername"
, and"clientId"
with your actual values.
Example Responseβ
{
"token": "YOUR.BEARER.TOKEN",
"refreshToken": "YOUR.REFRESH.TOKEN"
}
Now, put that token in your pocket (well, Authorization header) you will need it for the rest of your method calls!
Retention Group β Getβ
This endpoint lets you list retention groups.
- Type:
GET
- URL:
{{baseUrl}}/admin/retentionGroup
- Headers:
Authorization: Bearer YOUR.BEARER.TOKEN
- Body: Empty
Example Requestβ
curl -X GET "{{baseUrl}}/admin/retentionGroup" -H "Authorization: Bearer YOUR.BEARER.TOKEN"
Returns: List of retention groups and their properties.
Endpoint Searchβ
Find endpoints (e.g., phones, emails) that belong to people in your organization.
- Type:
POST
- URL:
{{baseUrl}}/client/people/endpoint/search
- Headers:
Authorization: Bearer YOUR.BEARER.TOKEN
- Body Example:
You can add
{
"type": "phone"
}"endpointSearch": "447897897897"
to search for a specific phone number.
Recording Searchβ
Search for recordings by many different criteria (IDs, free text, date ranges, and more).
- Type:
POST
- URL:
{{baseUrl}}/client/recording.search
- Headers:
Authorization: Bearer YOUR.BEARER.TOKEN
- Body Example:
See comments in the body for all possible filters.
{
"recordingIds": { "include": [1] }
}
Example Responseβ
{
"recordings": [
{
"interactionId": 123,
"startDatetimeUTC": "2025-06-20T10:30:00Z",
"endpoints": [
{ "endpoint": { "endpoint": "447896423595", "type": "phone" } }
]
// ... More fields
}
],
"total": 1,
"page": 1,
"pageSize": 100
}
User Searchβ
Find users in your account.
- Type:
POST
- URL:
{{baseUrl}}/client/user/search
- Headers:
Authorization: Bearer YOUR.BEARER.TOKEN
- Body Example:
{
"page": 1,
"pageSize": 1000
}
Example Responseβ
[
{
"id": 42,
"username": "alice@example.com",
"rolesAndRights": ["Admin"]
}
]
Get Commentsβ
If you want to fetch any comments for a specific communication:
- Type:
GET
- URL:
{{baseUrl}}/client/recording/comment?recordingId=123456
- Headers:
Authorization: Bearer YOUR.BEARER.TOKEN
- Query Params:
recordingId
(required): The recording's ID.bID
,cIdf
(optional): Additional filtering.
Comments may also have start and end offsets, tags, and more.
People Getβ
This endpoint fetches information on a list of people.
- Type:
POST
- URL:
{{baseUrl}}/client/people.get
- Headers:
Authorization: Bearer YOUR.BEARER.TOKEN
- Body Example:
Replace with the IDs of the people you want info about.
[1, 2, 3]
Example Responseβ
[
{
"id": 1,
"fullName": "Jane Smith",
"personType": "staff"
// ... More fields
}
]