Topolo Docs Topolo Platform
Open workspace

Get the default Socialize voice preset

Read the saved default for one authorized workspace, including the explicit no-default result.

Outcome

Find the persisted default voice preset in the intended workspace. This read does not choose a built-in template or save a new default.

Action: app_topolo_socialize.brand_voice.presets.default.get.

GET /api/brand-voice/presets/default

Before you start

  1. 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.

  2. 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.

{}

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 handler calls getDefaultPreset with the resolved workspace id and returns {success:true,preset:recordOrNull}. The SQL predicate is workspace_id=? AND is_default=1. It does not fall back to BUILTIN_PRESETS, create a record, choose the first custom preset or alter any default flags.

No matching row produces HTTP200 with success:true and preset:null. This is a valid no-saved-default state, not an authentication refusal, a missing workspace or an empty template list.

The query has no ORDER BY or explicit multiple-default reconciliation. Do not claim deterministic selection if stored data incorrectly contains multiple defaults; preserve evidence and route the data invariant to the existing owner.

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.

The preset read itself does not update saved presets, generate copy/images, call a provider/model or change usage counters; the preceding original-principal workspace authorization may synchronize the app-local mirror.

Worked examples

No saved default

Synthetic source-derived and unrun. Assumes the actual authorized workspace has no matching stored default row; no Auth/database failure is being disguised as null.

Request:

{}

Complete response:

{
  "success": true,
  "preset": null
}

Treat preset:null as no saved default; do not substitute a template or create a record.

One complete stored default

Complete synthetic source-derived/unrun projection. Assumes a stored row with these values in the verified fixture workspace, valid JSON-backed fields and is_default=1. All identifiers are fictional and confer no access.

Request:

{}

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"
  }
}

Confirm brandId and default flag, preserve nested values and stored timestamps, and do not infer provider/model execution.

Refusals and invalid input

The local-preflight example {"brandId": "ws_example_not_a_real_grant"} 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.

400 / validation_error: This is a defensive handler guard for a directly supplied context lacking brand.id. In the normal dispatcher, getBrandForVoice first returns a resolved workspace id or throws: omitted selection resolves the verified default and a named-workspace refusal occurs earlier. Do not present this guard as their normal HTTP result. Undeclared action body fields fail local validation before transport; outer workspace refusal carriers are separate.

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 separately bound authorized workspace and inspect preset:null distinctly from a returned record. A null result does not authorize selecting or creating a default.

For a returned record, compare brandId to the intended workspace, inspect isDefault and id, and preserve stored styles/arrays/timestamps. Report any mismatch or duplicate-default evidence to the owner; never silently switch workspaces or choose a template.

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.

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.