What it does.
The API offers three routes on http://127.0.0.1:8125:
GET /v1/health— shows that Call State is running, with its version. No sign-in needed.GET /v1/status— returns your current call status: whether you are in a meeting, your microphone, camera, hand, sharing and chat state, and whether the controls are available.POST /v1/commands— sends one control command, such as mute or raise hand. It is accepted with202and{"result":"forwarded"}. The status updates once Teams shows the change.
Commands go through the same path as a click in Call State. The API never sets the status itself: it only shows what Call State senses in Teams.
Try it.
- Sign in to Call State. The API works while you are signed in. Free accounts sign in again every 24 hours.
- Turn it on. Open Settings and tick Local REST API (port 8125).
- Read your status. In a terminal on the same computer, run
curl http://127.0.0.1:8125/v1/status. - Send a command. Run
curl -X POST http://127.0.0.1:8125/v1/commands -H "Content-Type: application/json" -d '{"action":"toggle-mute"}'during a call.
The commands.
The action names are the same as in the command-line tool, so a script can use either one. Send an action as action. A reaction also needs a reaction name.
| Action | What it does |
|---|---|
mute, unmute, toggle-mute | Turn the microphone off, on, or switch it. |
camera-on, camera-off, toggle-camera | Turn the camera on, off, or switch it. |
hand-up, hand-down, toggle-hand | Raise or lower your hand, or switch it. |
stop-sharing | Stop your screen sharing. |
leave | Leave the meeting. |
answer-call | Accepts a ringing call on this computer. Outside a meeting only, and never sent to another computer. |
reaction with applause, laugh, like, love or surprised | Send a meeting reaction. |
Other commands reach only the meeting that is active on your account. Answering a call works on this computer only.
Same computer or your network.
By default the API listens on 127.0.0.1, so only programs on this computer can reach it. To let another device on your network use it, Alt+click the checkbox in Settings (Option on macOS). The API then listens on all network interfaces.
The Teams Emulation for compatible legacy tools on port 8124 uses the same rule. Both settings are separate, so you can open one without the other. See the compatibility guide.
What protects it.
- Web pages are refused. A web page opened in your browser cannot call the API: requests that come from a page are turned away.
- Only your computer, by default. On the default setting, requests must name
127.0.0.1orlocalhost. - No separate password. The API trusts the user who runs it, as the CLI does. Any program running as you on this computer can use it, so only install tools you trust.
- No meeting access. The API reads button states in Teams, as the rest of Call State does. It never reads audio, video, chat messages or files.
Plans and availability.
The REST API is included in Free and in Paid. Free needs a sign-in every 24 hours, and the API is available only while you are signed in. Paid removes that daily sign-in. Accounts are deleted after 30 days without use on the Free plan.
Your own setup
Start with a status read.
Install Call State, turn on the Local REST API and read your status in a real call.