Outcome
Read a known saved voice-preset record with its persisted voice and author settings. This endpoint does not synthesize a record from the in-memory built-in template list.
Action: app_topolo_socialize.brand_voice.presets.get.
GET /api/brand-voice/presets/{id}
Before you start
-
Verify the original credential, production environment, organization and actual granted Socialize workspace. The published permission is app_topolo_socialize.posts:read. Bind the canonical workspace separately; never substitute a preset id or forge identity headers.
-
The route calls getBrandForVoice, which delegates to resolveBrandId. A refused named workspace does not silently become a default. Original API-key bindings further narrow grants; authorization may synchronize the local brand mirror even though the action is declared read-only.
Discover the record and request
Use the actual granted workspace and, where required, the saved preset id discovered from the current credential-visible preset list. Keep resource binding separate from action input. Built-in template ids are not workspace ids and are not proof that a saved record exists.
{
"id": "voice_fixture_saved"
}
The illustrated identifiers are synthetic, unrun and authorize no operation. Validate/plan the exact current input before a read; never paste a fixture id into a live operation.
Effects and response semantics
The routed id is passed to repository.getPresetById, whose SELECT filters id alone and maps the row before the handler checks ownership. An absent row returns404/not_found. Do not claim the record is filtered by workspace in SQL or that all inaccessible ids produce the same not-found result.
After the row is read/mapped, a non-builtin preset whose brandId differs from the resolved workspace is refused403/forbidden. A stored isBuiltin:true row bypasses this additional brand-equality test; this does not bypass the original caller’s route permission or workspace resolution.
Shipped builtin_* constants are not consulted by getPresetById. A template id from the built-in list is not guaranteed to exist as a persisted row; discover the saved/copy record’s actual id. The static /builtin and /default routes are handled before this dynamic-id route; reserved segment names are not arbitrary preset ids.
The repository maps stored rows into a full preset. Workspace ownership is returned as brandId; JSON-backed style, vocabulary and author-context fields are parsed to objects/arrays, with empty arrays or null for their source-defined absent values. Integer is_builtin/is_default are true only when equal to1. createdBy/createdAt/updatedAt are stored values, not proof of current Auth membership or live provider/model activity. Malformed JSON in a populated JSON-backed field can fail mapping before a response; no partial-record success or silent repair is implemented.
Successful output is {success:true,preset:record}, not a bare record, data, brand or items. There is no null success for a missing id on this endpoint. No saved preset mutation, default selection, provider/model call or post generation occurs in this read; workspace authorization may synchronize the local mirror.
Worked examples
Read one complete saved preset
Complete source-derived synthetic/unrun projection. Assumes an existing non-builtin row in the verified fixture workspace, valid JSON-backed fields and the shown stored values. No live id or permission was tested.
Request:
{
"id": "voice_fixture_saved"
}
Complete response:
{
"success": true,
"preset": {
"id": "voice_fixture_saved",
"brandId": "ws_fixture_brand",
"name": "Fixture saved voice",
"description": "A synthetic stored record for this unrun example.",
"persona": null,
"pointOfView": "first",
"targetAudience": null,
"audiencePainPoints": [],
"audienceSophistication": "general",
"toneFormality": 3,
"toneBoldness": 3,
"toneWarmth": 3,
"toneHumor": 2,
"sentenceStyle": null,
"emojiUsage": "minimal",
"punctuationStyle": null,
"doList": [],
"dontList": [],
"bannedPhrases": [],
"preferredVocabulary": [],
"spellingLocale": "US",
"hashtagMin": 0,
"hashtagMax": 5,
"hashtagThemes": [],
"authorBackground": null,
"authorCredentials": null,
"authorExpertiseAreas": [],
"authorCurrentFocus": null,
"techStack": [],
"industryExperience": [],
"expertiseLevel": null,
"writingSamples": [],
"communicationQuirks": [],
"topicsTheyAvoid": [],
"strongOpinions": [],
"contrarianTakes": [],
"isBuiltin": false,
"isDefault": true,
"createdBy": "usr_fixture_author",
"createdAt": "2026-10-01 12:00:00",
"updatedAt": "2026-10-02 09:00:00"
}
}
Check preset.id and non-builtin brandId against discovered identity/scope. A stored default flag does not mean this read set it.
Refusals and invalid input
The local-preflight example {} is invalid against this action’s strict input schema. It is not a simulated HTTP result or a live access probe. Correct the actual field error before transport and keep workspace context separate.
404 / not_found: Reconcile the actual saved id through authorized preset discovery. Do not assume every builtin_* template is a persisted row or invent another id.
403 / forbidden: A returned non-builtin row does not belong to the selected workspace. Stop and use original-principal grant discovery; do not switch to an administrator or guess another workspace.
The precise localized message text is not reproduced here. Outer Auth/workspace refusals and uncaught mapping/database errors can use a different carrier; preserve the actual status, code and request id. No response capture or live refusal test is claimed.
Verify and recover
Confirm the original selected workspace before the read and compare a non-builtin returned brandId to it. Preserve the actual saved id, isBuiltin/isDefault and parsed settings. Do not treat a built-in template id or a role label as proof of ownership.
Distinguish404/not_found,403/forbidden and any outer workspace/auth/dependency refusal from a successful preset. No uniform-404 secrecy guarantee is stated; a parsing/database failure is not evidence that the id is absent.
These examples are unrun source projections, not production captures. Compare actual service/version evidence separately; sourceRevision is not a serving deployment claim.
No preset rollback is defined for possible authorization-side mirror synchronization. The read does not approve a saved-preset mutation. Preserve original scope/input and actual request/refusal evidence; resolve the specific access, storage or malformed-JSON cause with the existing owner before another authorized read. Do not overwrite/delete a preset to make a read succeed.
Related actions
Discover app_topolo_socialize.brand_voice.presets.list for current saved-preset discovery and app_topolo_socialize.brand_voice.presets.builtin.list for the separate shipped template list. Any copy, edit or set-default operation requires separate authority, current contract review and verification.
Change log
- 2026-10-21: Added exact source-qualified request, stored-record mapping, workspace/refusal semantics and complete synthetic/unrun worked responses. No application imports/tests, business/model/provider execution or serving deployment association was certified.