ReferenceHTTP API
intercom
The intercom router: 7 methods of the intercom capability, with tier, scope, input and output.
Capability intercom · scope device · mode singleton · source packages/types/src/capabilities/intercom.cap.ts:65.
Every method is called at /trpc/intercom.<method> — queries with GET, mutations with POST. See How to call and Authorization. Device methods take deviceId in their input.
| Method | Kind | Tier | Token scope | Viewer |
|---|---|---|---|---|
getStatus | query | protected | view | yes |
startSession | mutation | protected | create | yes |
handleAnswer | mutation | protected | create | yes |
stopSession | mutation | protected | create | yes |
startTalkSession | mutation | protected | create | yes |
pushTalkAudio | mutation | protected | create | yes |
endTalkSession | mutation | protected | create | yes |
intercom.getStatus
- Kind: query —
GET /trpc/intercom.getStatus(added by the framework) - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilityintercom, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=intercom.getStatuson your hub
Input
{ deviceId: number }Output
IntercomStatusSchemaShapes: IntercomStatusSchema
intercom.startSession
- Kind: mutation —
POST /trpc/intercom.startSession - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilityintercom, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=intercom.startSessionon your hub
Input
{ deviceId: number }Output
{ sessionId: string; sdpOffer: string }intercom.handleAnswer
- Kind: mutation —
POST /trpc/intercom.handleAnswer - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilityintercom, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=intercom.handleAnsweron your hub
Input
{ deviceId: number; sessionId: string; sdpAnswer: string }Output
voidintercom.stopSession
- Kind: mutation —
POST /trpc/intercom.stopSession - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilityintercom, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=intercom.stopSessionon your hub
Input
{ deviceId: number; sessionId: string }Output
voidintercom.startTalkSession
- Kind: mutation —
POST /trpc/intercom.startTalkSession - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilityintercom, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=intercom.startTalkSessionon your hub
Input
{ deviceId: number }Output
{ sessionId: string }intercom.pushTalkAudio
- Kind: mutation —
POST /trpc/intercom.pushTalkAudio - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilityintercom, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=intercom.pushTalkAudioon your hub
Input
{ deviceId: number; audioBase64: string; codec?: "opus" | "s16le" | "g711ulaw" | "g711alaw"; sampleRate?: number; channels?: number; sequenceNumber: number }Output
{ accepted: boolean }intercom.endTalkSession
- Kind: mutation —
POST /trpc/intercom.endTalkSession - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilityintercom, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=intercom.endTalkSessionon your hub
Input
{ deviceId: number }Output
void