settings/v1
The settings an app's own superusers change for its extensions (PITR's S3 bucket, Bulk Mail's sending limits), behind
one API: list them, read one, save one, test one without saving. Each extension keeps its settings its own way and
registers a section; the provider serves them all. Settings an operator sets for a whole host stay in
pocketone.yaml.
A wire contract (settings.go).
Use
| Operation | HTTP | Token scope |
|---|---|---|
| List | GET /api/_c/settings/v1 |
settings:read |
| Get | GET /api/_c/settings/v1/get?extension=pitr |
settings:read |
| Save | POST /api/_c/settings/v1/save with {"extension": "pitr", "values": {...}} |
settings |
| Test | POST /api/_c/settings/v1/test with {"extension": "pitr", "values": {...}} |
settings |
Each extension's values are its own shape (see its README). Secrets come back empty with a flag that they're set;
saving an empty secret keeps the saved one. Test answers {"ok": false, "message": ...} when the settings don't
work. Only superusers may call any of them.
Provide
An extension with settings registers a section in its Register:
settingsv1.Add(app, mySection{}) // Info, Get, Save; Test too if the settings can be checked
and declares WorksWith: extkit.IDs("settings/v1").
Give the section's Info Fields (key, label, type text, secret, bool, number, select, url or
readonly, help) and the dashboard renders its form, Save and Test with no JS of your own. Group puts it on another
extension's page ("billing": the Billing page, with each payment processor's section); without one it shows under
Settings → Extensions. A section without fields brings its own UI.
A provider of the API (ext/settings by default) implements settingsv1.Settings over
settingsv1.Sections(app).
Commands and APIs
Every operation is a REST endpoint, a pocketone command and an MCP tool, all generated from the contract and behind the same token scope check and hooks. See Remote CLI, or the full CLI, Extension APIs and MCP references.
list
Names the extensions whose settings this app's admins can change.
| REST | GET /api/_c/settings/v1 |
| CLI | pocketone remote settings list |
| MCP | settings_list |
| Token scope | settings:read |
get
Returns one extension's settings. Secrets come back empty, with a flag saying they're set.
| REST | GET /api/_c/settings/v1/get |
| CLI | pocketone remote settings get --extension <value> |
| MCP | settings_get |
| Token scope | settings:read |
| Input field | Flag | Type |
|---|---|---|
extension |
--extension |
string |
save
Replaces one extension's settings and applies them. A secret left empty keeps its saved value. Settings a host sets are read-only here.
| REST | POST /api/_c/settings/v1/save |
| CLI | pocketone remote settings save --extension <value> --values <json> |
| MCP | settings_save |
| Token scope | settings |
| Input field | Flag | Type |
|---|---|---|
extension |
--extension |
string |
values |
--values |
json |
test
Checks one extension's settings without saving them (a test write to a bucket, a test message).
| REST | POST /api/_c/settings/v1/test |
| CLI | pocketone remote settings test --extension <value> --values <json> |
| MCP | settings_test |
| Token scope | settings |
| Input field | Flag | Type |
|---|---|---|
extension |
--extension |
string |
values |
--values |
json |
Extensions
| Extension | |
|---|---|
| settings | provides (default) |
| billing | works with |
| bulkmail | works with |
| creem | works with |
| llm | works with |
| mailrelay | works with |
| paddle | works with |
| pitr | works with |
| stripe | works with |
| vacuum | works with |
License
MIT
Questions and comments
Comments are a GitHub Discussions thread; sign in with GitHub to post.