Create coaching catalogue directory
create_catalogue_directory[Coaching catalogue] Create a directory (page) in the coaching portal catalogue. A directory nests other directories (tags_sub), lists coaching sessions whose own tags match its tags_interview_set_filter, and can carry a fully custom Markdown page (content_md) with [sessions], [directory:…], [session:…] and [plan-progress] directives. Coaching-platform feature.
Creates a directory (page) in the coaching portal catalogue. A directory nests other directories through tags_sub, lists coaching sessions through tags_interview_set_filter, and can replace the default grid with a custom Markdown page through content_md. The id you choose is the catalogue URL segment and cannot be changed afterwards.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Directory id — also the catalogue URL segment (/catalogue/<id>) and the value other directories reference in their `tags_sub`. Lowercase letters, digits and single - or _ separators. Convention is to end language-specific directories with the language code, e.g. `sales-coaching-en`. | |
| name | Yes | Display name of the directory, shown as the page title and on its card. | |
| status | No | Lifecycle status of the catalogue directory. Options — `draft`: Not published — the directory exists but is not served to visitors. | `active`: Published and served in the catalogue. | `archived`: Retired — kept for reference but no longer served.. | |
| tags_sub | No | Ids of the directories nested under this one, in display order. Replaces the whole list — send the full set, not just the additions. A referenced directory only appears if it exists and is visible to the viewer. | |
| coach_plan | No | Coaching-plan stage this item belongs to, used by the coaching-plan progress view. Omit/null to leave it out of any plan. Options — `demo`: Demo session. | `screening`: Screening-interview practice. | `2nd`: Second-interview practice. | `3rd`: Third-interview practice. | `closing`: Closing / salary-negotiation practice. | `job-specific`: Job-specific coaching. | `other`: Anything that does not fit the other buckets.. | |
| content_md | No | Markdown for a custom directory page. When set (even as an empty string) the markdown replaces the default grid and decides the layout itself; null renders the plain grid of sub-directories and sessions. Alongside normal Markdown you can place these directives, each ALONE on its own line: `[plan-progress]` (the learner's coaching-plan progress), `[directory:<tag-id>]` (a card for one sub-directory), `[session:<interview-id>]` (a card for one session), `[sessions]` (every session in this directory), `[sessions:<term>]` (sessions matching a term), `[sessions:filter=<term>,limit=<n>]` (a filtered, capped list). A directive on a line with other text is rendered as ordinary text. Chips, callouts, cards, columns and buttons are available here too — full vocabulary: https://developer.jobmojito.com/cookbooks/format-content-with-markdown | |
| parent_tag | No | Id of an existing directory to nest this new one under: the new id is appended to that directory's `tags_sub`. Omit to create a top-level directory (reachable via a direct link, or by adding it to another directory later). | |
| visibility | No | Who can see the catalogue directory. Options — `public`: Shared across every merchant. Platform admins only — a merchant caller is rejected by row-level security. | `merchant_public`: Listed in the merchant's own catalogue — the normal choice. | `merchant_invite`: Owned by the merchant but not listed; reachable only for invited users. | `merchant_unlisted`: Owned by the merchant but not listed; reachable only via a direct link.. | |
| description | No | Short description shown on the directory card. | |
| merchant_id | No | Merchant that owns the directory. Admin / sub-merchant callers only; otherwise taken from your token. | |
| cover_image_url | No | Cover image URL shown on the directory card. | |
| mojito_language_code | No | Language of the directory (one of the platform-languages.json codes). The catalogue groups directories by language; defaults to `en` when omitted. | |
| tags_interview_set_filter | No | Tag filter selecting which coaching sessions this directory lists: a session appears when its own `tags` contain EVERY tag here (an AND, not an OR). Only `active` coaching/persona sessions with visibility `public` or `merchant_public` are listed. Set the matching tags on the session with the create-interview / job-interview-update `tags` field. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Id of the created directory. | |
| parent_tag | Yes | The directory this one was nested under, when `parent_tag` was supplied. | |
| merchant_id | Yes | Owning merchant id. Null for a platform-wide (`public`) directory. | |
| catalogue_url | Yes | Public URL of the directory page, when the merchant has a coaching-portal domain configured. Null otherwise. |