Writing-guide catalog API
Use the app’s authenticated tRPC client with a selected Organization that has TypeOrb access. The catalog contains available published writing guides. Private guides and guides owned by a User, Member, Page, Team or Organization stay in their own scope, even when they carry catalog labels.
List available catalog guides
Call the contexts.listPublic query. It accepts the standard list filters, sorting and pagination and returns { rows, total }.
const catalog = await client.contexts.listPublic.query({ limit: 20 });
const choices = catalog.rows.map(({ id, title }) => ({ id, title }));
Filtering applies before pagination and counting. Disabled, archived and deleted guides are unavailable. A retained guide whose original ownership was lost during import also stays out of the catalog while it needs ownership review.
Import a selection
Call the contexts.forkFromCatalog mutation with the selected catalog IDs:
const imported = await client.contexts.forkFromCatalog.mutate({
contextIds: [selectedGuideId],
});
// imported.ids contains the new private writing-guide IDs.
The operation creates private copies for the signed-in User. The complete selection must still be available: if any guide is unavailable, the operation reports an error and creates no copies. Repeated IDs within a selection create one copy. Separate successful calls create separate copies.
A Fully managed Member can read the catalog but cannot import, edit, enhance or archive writing guides, generate Audiences or start profile-based writing setup. Organization managers retain their writing permissions. LinkedIn account connection remains available through the account connection flow.
After an unavailable-guide error, refresh the catalog and choose from its current results. A guide that needs ownership review cannot be moved into another Organization by using an older ID. Retained records stay stored while their ownership is reviewed.
For setup through an MCP client, see Writing guides through MCP.
Background guide generation
contexts.createAsync saves the new guide and queues its enhancement. Generation uses the text and samples saved with that request. Editing the guide while it runs prevents that request from overwriting your changes. A temporary queue outage can delay generation; refresh the saved guide before creating another one.
Onboarding Audience proposals also keep the selected Brand profile. Changing or removing that profile while generation runs stops the request; review the current profile before starting again.
A completed model step can be reused when the same background request resumes. If a model call’s outcome is uncertain, TypeOrb stops that request rather than automatically paying for it again. Review the saved guide and start a new generation explicitly if you still need one. Older unfinished requests that have no dispatch record also require a fresh generation.
Queued guide enhancement checks that the Organization still has the same eligible TypeOrb access period before each model call and before saving the result. A new access period does not resume work from an earlier period. After access changes, review the saved guide and explicitly start a fresh generation if needed. Older unfinished requests without this access record also require fresh generation.
Queued guide generation stops while workspace content is being deleted. Restoring Product access does not resume that work; start fresh generation once the workspace is available again.
Generate Audiences from a Persona
Call contexts.generateAudiencesFromPersona with the accessible Persona's ID.
Ordinary Members generate for their own guides; Organization owners and admins
retain their author-management permissions. The Persona, current Organization
ICP and generation request are saved before inference. Audiences save together;
a changed Persona, ICP, permission or access period prevents partial results.
Your intervening guide edits remain saved.
const request = { personaId, requestId: crypto.randomUUID() };
const result = await client.contexts.generateAudiencesFromPersona.mutate(request);
// result.count is the number of Audiences created.
Keep the same requestId when retrying that intended action. A completed model
step can finish saving without another inference, and a successful repeated
request creates no duplicates. The ID cannot be reused for a different Persona,
changed inputs, another Organization or a replacement approval/access period.
Omitting it starts a separate request on each call.
If the outcome of a provider request is uncertain, retrying the same ID does not send it again. Refresh your guide list and review the error before explicitly starting fresh with a new ID; a new request may incur additional generation usage. Restore current access before requesting fresh work after an access error.
Direct guide creation and regeneration
Model-assisted guide creation, enhancement and regeneration use the original Organization, author or Page, samples, guide revision and eligible TypeOrb access period. Changing permissions or access while generation runs stops the save. Editing the guide during generation preserves that edit instead of replacing it with the older result. The generated guide and summary save together.
After an error, refresh the guide and check its current text before deliberately
starting again. Direct generation does not accept the Audience operation's
requestId: a separate call starts separate work and may incur more usage.
An uncertain provider outcome is retained and is not automatically sent again.
When generation stops
These generation requests stop further model calls when the provider refuses payment or rate-limits the request. Review the existing result before deliberately starting fresh work; a new generation can incur additional usage.