CLI — Restish¶
Restish is an OpenAPI-aware HTTP CLI. It reads Agora's OpenAPI contract and gives you typed, auto-completing commands — no SDK code required.
Best for
Quickly exploring the API, testing from a terminal, or scripting without a full SDK.
Install¶
Setup¶
From the SDK repo:
Or manually register the Agora API:
This downloads the OpenAPI contract and generates shell completions for all endpoints.
Authenticate¶
# Exchange your API key for a bearer token
TOKEN=$(restish agora login-with-api-key '{"api_key":"agora_live_REDACTED"}' \
--rsh-output-format json | jq -r '.body.access_token') # (1)!
export AGORA_ACCESS_TOKEN="$TOKEN"
- Requires
jq— install withbrew install jqorapt install jq.
Upload leads¶
restish agora upload-leads \
--header "Authorization: Bearer $AGORA_ACCESS_TOKEN" \
'{
"campaign_id": 1,
"leads": [
{"first_name": "Jane", "last_name": "Doe", "phone": "+15551234567"}
],
"compliance_acknowledged": true
}'
Use the development environment¶
# Register a dev profile pointing at core-dev
restish api configure agora-dev https://core-dev.agoraai.tech/openapi.json
# Then use --profile dev
restish --profile dev agora-dev upload-leads ...
Or with the SDK repo's Makefile profile:
Explore available operations¶
restish api show agora # list all operations
restish agora --help # auto-generated help from the OpenAPI contract
restish agora upload-leads --help
Shell completions¶
# bash
restish completion bash >> ~/.bashrc
# zsh
restish completion zsh >> ~/.zshrc
# fish
restish completion fish > ~/.config/fish/completions/restish.fish
After reloading your shell, Tab completion works on operation names and parameter flags.