spok-api-clilisted
Install: claude install-skill sieteunoseis/spok-api
# Spok API CLI
A CLI and library for Spok SmartSuite TCP API operations — on-call scheduling, paging, directory management, and more.
## Setup
The CLI must be available. Either:
```bash
# Option 1: Use npx (no install needed, works immediately)
npx spok-api --help
# Option 2: Install globally for faster repeated use
npm install -g spok-api
```
If using npx, prefix all commands with `npx`: `npx spok-api get listing 12766`
If installed globally, use directly: `spok-api get listing 12766`
### Configuration
Configure a Spok server:
```bash
spok-api config add <name> --host <hostname> --port <port> --ssl --insecure
```
Use `--insecure` for servers with self-signed or internal certificates. Use `--read-only` to block write operations.
```bash
spok-api config add prod --host spok.example.com --port 9722 --ssl --insecure --read-only
spok-api config add lab --host spok-lab.example.com --port 9722 --ssl --insecure
```
Switch between servers:
```bash
spok-api config use prod
spok-api config list
spok-api config show
```
Config stored at `~/.spok-api/config.json`. Supports [ss-cli](https://github.com/sieteunoseis/ss-cli) `<ss:ID:field>` placeholders for secure credential management.
## Field Reference
| Field | Name | What it is | Example |
|-------|------|-----------|---------|
| `lid` | Listing ID | Unique ID for a person record (primary key, auto-assigned on add) | `300001` |
| `mid` | Messaging ID | ID used for paging/on-call routing — a person can exist without one |