What preferences are
Preferences are one document per user. The API reads callbacks when it creates a job. ui and defaults are stored and returned for clients. Job creation does not read them.
/v3/preferencesGet preferences
/v3/preferencesReplace preferences
GET returns 200 and an empty document when you have never saved one. It is not a 404.
PUT replaces the document. Send ui, callbacks, and defaults together. A group you omit is cleared. The response is the same shape as GET, plus issues when a saved webhook can no longer be used.
Any authenticated key can read and write preferences. Saving a phase that names a URL or webhook requires the callbacks permission. A body with no destinations does not.
UI
ui is read by the app. These values do not change a request.
| Field | Values |
|---|---|
theme | light, dark, system |
density | compact, default, comfortable |
landing_page | dashboard, scans, search, cert, usage |
time_zone | UTC, America/Los_Angeles, America/New_York, Europe/London, Europe/Berlin, Asia/Tokyo, Australia/Sydney |
In the app, Settings then Preferences edits this document. The webhook list on that page is the same resource as Webhooks.
Default callbacks
callbacks.apply controls whether saved destinations are copied onto a new job.
| Value | Effect |
|---|---|
off, or empty | Copy nothing |
when_absent | Fill phases the request left empty |
A phase the request sets is kept. Saved defaults exist for scans, captures, surveys, and permutations. Each phase is a url or a callback_id, not both. Tasks do not use these defaults. See Callbacks.
GET adds issues when a saved callback_id is missing or inactive. Each issue has path (for example callbacks.scans.success), callback_id, and reason (not_found or inactive). Issues are computed on read and are not stored. That phase is skipped when a job is created. The job is still created.
An unknown or inactive webhook on the PUT body is 422. A phase that sets both url and callback_id is 422. An unknown theme, density, landing_page, time_zone, or apply is 422.
Scan defaults
defaults.scan is stored for clients. The scan form applies fingerprint and default_ports. The API does not copy these fields onto POST /scans.
| Field | Notes |
|---|---|
fingerprint | Boolean. Omit it to leave it unset. false is stored as false |
default_ports | Ports, ranges, or top_N lists. PUT checks each value. A top_N token is kept. A port already inside that list is dropped, and the rest are combined. top_10 plus 443 and 4445 is stored as top_10, 4445 when 443 is already in top_10. Several top_N values keep the largest. An unknown token is 422 |
curl -sS -X PUT "https://api.efflux.io/v3/preferences" \
-H "Authorization: Bearer $EFFLUX_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"ui": {
"theme": "dark",
"density": "compact",
"landing_page": "scans",
"time_zone": "America/Los_Angeles"
},
"callbacks": {
"apply": "when_absent",
"scans": {
"success": { "callback_id": "whook_abc123" },
"fail": { "callback_id": "whook_abc123" }
}
},
"defaults": {
"scan": { "fingerprint": false }
}
}'