Endpoint Reference

Updated 16 Nov 202611 min read

This is the per‑endpoint reference for the read‑only surface of the Native Focus REST API. Every call below requires a bearer token from POST /authWithApiKey — see Getting Started → Authentication.

All paths are relative to your tenant's {{baseUrl}} (see Base URLs). All authenticated calls require:

http
Authorization: Bearer YOUR.BEARER.TOKEN
Content-Type: application/json

Authentication#

Authenticate with API key {#authwithapikey}#

POST /authWithApiKey · Try it live

Exchange an API key for a short‑lived bearer JWT.

Body

json
{
  "clientId": 1234567,
  "apiKey": "YOUR-API-KEY-XYZ",
  "username": "YOUR-INTEGRATION-USERNAME"
}
FieldTypeRequiredNotes
clientIdintegeryesYour Focus account id.
apiKeystringyesAPI key generated in the admin portal.
usernamestringyesAuto‑generated integration username shown next to the API key in admin. The token inherits this user's roles & rights.

Response

json
{
  "token": "eyJhbGciOi...",
  "refreshToken": "eyJhbGciOi..."
}

When token expires, call this endpoint again with the same body to get a fresh one.


Recordings#

The "recording" resource represents a single communication — a phone call, Teams meeting, SMS message, etc. Most endpoints accept either the numeric interactionId (a.k.a. recordingId) or the source‑system thirdPartyId depending on what they do.

Search recordings {#recordingsearch}#

POST /client/recording.search · Try it live

Search and filter recordings. This is the workhorse endpoint for any integration that needs to find calls.

Required right: Recording.View

Body — every field is optional; combine them to narrow your result set.

FieldTypeNotes
recordingIds{ include?: number[], exclude?: number[] }Filter by internal ids.
thirdPartyIds{ include?: string[], exclude?: string[] }Filter by source ids.
attributes{ [key]: string | number | boolean }Exact‑match filter on the recording's attributes bag — including scenarioId, the Event ID shared by every recording in a conversation.
endpointIds{ include?, exclude? }Filter by endpoint (phone/email/Teams id) record.
personIds{ include?, exclude? }Filter by person record.
userIds{ include?, exclude? }Calls owned by these Focus users.
dateTimeRange{ from: ISO8601, to: ISO8601 }Most common filter; use a tight window when paging.
durationRangeInSeconds{ min?: number, max?: number }
timeRanges{ include?, exclude? }Time‑of‑day filters.
communicationsBetweenobjectFilter to interactions between two specific endpoint sets.
freeTextstringSearches transcript / metadata.
communicationTypes{ include?: string[], exclude?: string[] }e.g. phone, teams, sms.
direction"In" | "Out"
tagIds{ include?, exclude? }
isPrivateboolean
hasCommentsboolean
legalHoldIdintegerRestrict to a legal hold.
playlistIdintegerRestrict to a playlist.
startTimeDirection"ASC" | "DESC"Sort direction.
page, pageSizenumberPagination.

Example request

bash
curl -X POST "$BASE_URL/client/recording.search" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "dateTimeRange": { "from": "2026-05-12T00:00:00Z", "to": "2026-05-13T00:00:00Z" },
    "communicationTypes": { "include": ["phone", "teams"] },
    "direction": "In",
    "startTimeDirection": "DESC",
    "page": 1,
    "pageSize": 100
  }'

Example response (abridged)

json
{
  "recordings": [
    {
      "interactionId": 9876543,
      "thirdPartyId": "6414aa9f-ZZZAAABBB",
      "startDatetimeUTC": "2026-05-12T10:30:00.000Z",
      "endDatetimeUTC":   "2026-05-12T10:34:21.482Z",
      "durationInSeconds": 261.482,
      "type": "phone",
      "endpoints": [
        { "endpoint": { "id": 81, "type": "phone", "endpoint": "447896423595" } }
      ]
    }
  ],
  "total": 4321,
  "page": 1,
  "pageSize": 100
}

POST /client/recording.search · Try it live

An Event ID identifies every communication that belongs to the same conversation. A Microsoft Teams meeting recorded for four participants produces four separate recordings in Focus, all sharing one Event ID — so searching on it is how you retrieve a whole conversation rather than a single leg of it.

The same identifier appears under three names:

Where you see itName
Focus UI, and the ?eventId= deep linkEvent ID
Focus REST API, and the attributes bag on a recordingscenarioId
Microsoft TeamsCall Chain ID

They are the same value. The API uses scenarioId.

Required right: Recording.View

Example request

bash
curl -X POST "$BASE_URL/client/recording.search" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "attributes": { "scenarioId": "cc0da036-2f1e-4b7a-9d33-8a1c5e0f4b62" }
  }'

Example response (abridged)

json
{
  "recordings": [
    {
      "interactionId": 4815162,
      "thirdPartyId": "REC-00123",
      "startDatetimeUTC": "2026-09-08T14:02:11Z",
      "durationInSeconds": 742,
      "attributes": {
        "scenarioId": "cc0da036-2f1e-4b7a-9d33-8a1c5e0f4b62",
        "platform": "teams"
      }
    }
  ],
  "total": 4,
  "page": 1,
  "pageSize": 50
}

attributes is omitted entirely when a recording has none — read it defensively.

Combining keys

Keys are ANDed, so a second attribute narrows the same search further — here, the Teams leg(s) of that conversation only:

bash
curl -X POST "$BASE_URL/client/recording.search" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "attributes": {
      "scenarioId": "cc0da036-2f1e-4b7a-9d33-8a1c5e0f4b62",
      "platform": "teams"
    }
  }'

How attribute matching behaves#

  • Exact match only — no partial or prefix matching.

  • Multiple keys are ANDed.

  • Types are preserved — numeric 3 does not match string "3".

  • One value per key — to search several Event IDs, issue one request each.

  • Ten keys maximum.

Arrays, objects and null return 400 rather than being quietly ignored, as does an eleventh key. An empty string is a real filter, so {"scenarioId": ""} matches nothing rather than everything.

Opening the same conversation in the UI#

Paste the Event ID into the Focus portal as a deep link to see the same set of recordings a user would:

text
https://uk.focus.subphonic.ai/communications?eventId=cc0da036-2f1e-4b7a-9d33-8a1c5e0f4b62

Get recording detail {#recording-detail-get}#

POST /client/recording.detail.get · Try it live

Fetch the full detail blob for one or more recordings (metadata, endpoints, owners, retention info, encryption metadata).

Required right: Recording.View

Body

json
{ "interactionIds": [9876543, 9876544] }

Returns an array of detail objects keyed on interactionId. Each entry carries the underlying metadata, audio waveForm summary and encryptionDetail blocks for the recording. Use this after recording.search when you need raw metadata that isn't included in the search projection.


Get transcription {#recording-transcription-get}#

POST /client/recording.transcription.get · Try it live

Fetch transcription segments for one or more recordings.

Required right: Recording.Transcription.View

Body

json
{ "interactionIds": [9876543] }

The response is an array of { interactionId, analysis } objects. The analysis field is the raw output written by the transcription engine for that interaction — typically a transcript containing time‑aligned segments plus a detected language. An empty or null analysis means transcription is disabled, hasn't run yet, or isn't available for that media type.


Get SMS message {#recording-sms-message-get}#

POST /client/recording.sms-message.get · Try it live

Fetch the message body for SMS interactions.

Required right: Recording.View

Body

json
{ "interactionIds": [9876543] }

Use this for type: "sms" interactions where the "audio" is actually a text payload. The response projects the SMS body and any underlying provider message ids out of the recording's metadata.


Download audio {#recording-playback}#

POST /client/recording.playBackByThirdPartyId · Try it live

Stream or download the audio (or video) for a recording. Returns a binary stream — pipe to a file.

This is both the playback and the download path — there is no separate download endpoint. The response body is the media itself, returned with Content-Disposition: attachment, so write it to a file rather than expecting a URL. Because the call is a POST carrying a bearer token it cannot be used as a shareable download link; to share a recording with another Focus user, use a Playlist.

Required right: Recording.Play

Body

FieldTypeRequiredNotes
thirdPartyIdstringyesSource‑system id taken from a recording.search result.
formatstringnoOutput format — see Formats below. Always set this explicitly.
streamThroughbooleannoStream as the file is decrypted instead of buffering.
commentstringconditionalRequired when the account has forced comments enabled.

Formats {#playback-formats}#

formatOutputChannels
mp3-monoMP31 (downmixed)
wav-monoWAV1 (downmixed)
wavWAV, pcm_s16leAs recorded
rawWAV container, codec copy — no transcodeAs recorded
mp4AAC 128 kbps in a fragmented MP4, audio only — no video trackAs recorded
mp3Default. Does not currently return MP3 — see the warning below2

The two mono formats perform a true downmix, not a channel drop. Compliance recordings are typically two‑channel with one party per channel; asking for mp3-mono or wav-mono mixes both parties into the single channel, so neither side of the conversation is lost. Pick a mono format when you want a smaller file or when the system consuming the audio expects one channel; pick wav or raw when you need the parties kept on separate channels, for example for diarisation or per‑party analysis.

raw is the fastest and the only lossless option, because the audio is copied rather than re‑encoded.

Example

Download a single‑channel MP3 with both parties mixed together:

bash
curl -X POST "$BASE_URL/client/recording.playBackByThirdPartyId" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "thirdPartyId": "abc-123-call-id", "format": "mp3-mono" }' \
  --output recording.mp3

Returns 404 if the thirdPartyId is unknown or not visible to the calling user.


Get recording audit log {#recording-audit}#

POST /client/recording/audit · Try it live

Read the access audit log for a single recording — every play, download or detail view, with user and timestamp.

Required right: Recording.Audit.View

Body

json
{ "recordingId": 9876543, "page": 1, "pageSize": 100 }

Use this to evidence who has accessed a particular interaction (e.g. for a regulator request). The response is an array of audit rows; each row describes one HTTP call against this recording.

See Assemble an evidence pack for a compliance request for the full flow — scoping, the access trail, and what belongs in the pack.


People & Endpoints#

A person is an individual tracked in your Focus tenant; an endpoint is one of their addressable identities (a phone number, email or Teams user id). Endpoints are owned by people, and recordings are linked to endpoints.

POST /client/people.search · Try it live

Search people with rich filters.

Required right: People.View

For a worked use of these filters, see Reconcile people and endpoints.

Body

FieldTypeNotes
freeTextstringFree‑text match across name / metadata.
personType"staff" | "external"
personIdsnumber[]Restrict to specific people.
thirdPartyIdsstring[]Restrict by source id.
emailsstring[]Restrict by email endpoint.
groupAssignmentarrayFilter by auto‑group rules.
retentionGroupIdnumber | nullFilter by retention group; null means "no group".
byoStorageAccountIdnumber | nullFilter by BYO storage account.
includeInteractionsbooleanIf true, include recent interaction stats per person.
onlyReturnNonAssociatedbooleanOnly people without an associated user.
isActiveboolean
page, pageSizenumber

Search people by name {#people-search-by-name}#

POST /client/people.searchByName · Try it live

Lightweight prefix search — useful for type‑ahead UIs.

Required right: People.View

Body

json
{ "prefix": "smi", "personType": "staff", "isActive": true, "page": 1, "pageSize": 25 }

personType is required; prefix is matched against full name.


Get people by id {#people-get}#

POST /client/people.get · Try it live

Fetch full person records by id.

Required right: People.View

Body — a JSON array of ids (numeric or string thirdPartyId):

json
[1, 2, 3]

Response (abridged)

json
[
  { "id": 1, "fullName": "Jane Smith", "personType": "staff" }
]

POST /client/people/endpoint/search · Try it live

Find endpoints (phone numbers, emails, Teams user ids) and the people that own them.

Required right: Endpoints.View

Body

FieldTypeNotes
type"phone" | "email" | "teamsUserId"
endpointSearchstringExact / partial match on the endpoint value.
freeTextstringFree‑text match.
isRecordedbooleanEndpoint has ever been recorded.
isCurrentlyRecordedbooleanRecording is currently active.
onlyReturnOwned / onlyReturnNonOwnedboolean
page, pageSizenumber

Example

bash
curl -X POST "$BASE_URL/client/people/endpoint/search" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "type": "phone", "endpointSearch": "447896" }'

Get endpoints by value {#endpoint-get}#

POST /client/people/endpoint/get · Try it live

Fetch endpoint records by exact value.

Required right: People.View

Body — an array of { type, endpoint } objects:

json
[
  { "type": "phone", "endpoint": "447896423595" },
  { "type": "email", "endpoint": "jane.smith@example.com" }
]

Returns the matching endpoint records including the owning person id and recording flags. The response is a plain JSON array — entries are returned in the order they're found, not necessarily the order requested.


Users#

POST /client/user/search · Try it live

Search Focus portal users.

Required right: Users.View

Body — all fields optional:

FieldTypeNotes
userIdintegerSingle‑user lookup.
usernamestringExact username match.
freeTextstringFree‑text match across user fields.
rolesAndRightsstring[]Filter to users with these rights.
isActive, isLockedboolean
onlyReturnNonAssociatedbooleanUsers with no person record.
searchOrderPropertyobjectSort options.
page, pageSizenumber

Example response

json
[
  { "id": 42, "username": "alice@example.com", "rolesAndRights": ["Admin"] }
]

Retention Groups#

List retention groups {#retention-group-list}#

GET /admin/retentionGroup · Try it live

List all retention groups configured on the account, including their default status and assigned people counts.

Required right: RetentionGroup.View

bash
curl -H "Authorization: Bearer $TOKEN" "$BASE_URL/admin/retentionGroup"

Comments#

Get comments on a recording {#recording-comment-list}#

GET /client/recording/comment · Try it live

List comments attached to a recording.

Required right: Recording.Comment.View

Query parameters

ParamRequiredNotes
recordingIdyesInternal recording id.
bIDnoOptional bookmark id filter.
cIdfnoOptional comment‑identifier filter.

Example

bash
curl -H "Authorization: Bearer $TOKEN" \
  "$BASE_URL/client/recording/comment?recordingId=9876543"

Comments may include start/end offsets within the recording, a tag and the inserting user.


Was this page helpful?