---
title: "getJourneyContextUsages"
method: POST
path: "/v1/workflows-definition/journey-context:usages"
---

# getJourneyContextUsages

`POST /v1/workflows-definition/journey-context:usages`

## Request

- Base URL: `https://workflows-definition.sls.epilot.io`
- URL: `https://workflows-definition.sls.epilot.io/v1/workflows-definition/journey-context:usages`
- Auth: HTTP bearer

Which of the given journey's context parameters are preset by tasks in this org's flow templates, matched structurally against each task's typed `journey.context_parameters[].key` field and gated on `journey_id` so a same-named parameter in another journey is never reported. `journey_submission` triggers are deliberately not reported: a trigger binds a journey, not a parameter. Internal, read-only; part of ER-5240.

## Request body

- JourneyContextUsagesReq: Request payload for getJourneyContextUsages.
  - `journey_id` string, required: Journey whose context parameters are being checked for usage.
  - `param_keys` string[], required: Context parameter keys to look for, as plain strings.
  - `param_ids` string[]: Accepted and ignored. This service stores context references by name only; the field keeps one request shape across every adapter in this feature.

## Response `200`

Success

- JourneyContextUsagesResp: Response payload for getJourneyContextUsages.
  - `usages` JourneyContextUsage[], required
    - `kind` 'workflow-task', required
    - `resource` object, required
      - `type` 'workflow_template', required
      - `id` string, required: Flow template id.
      - `name` string: Flow template name, when the template has one.
    - `location` object: Present only when the matching task carries an id and/or a name.
      - `task_id` string
      - `task_name` string
    - `matched_as` object, required
      - `dialect` 'name', required
      - `token` string, required: The bare parameter key, e.g. `origin` — never a `journey_context.origin`-style prefixed token. Unlike every sibling adapter, this service stores the reference structurally in a typed field (`tasks[].journey.context_parameters[].key`), so the prefixed path string never appears in the stored record; `dialect: name` already tells the caller how to interpret `token`.
      - `at` string, required: Debugging path into the flow template where the match was found, e.g. `tasks[0].journey.context_parameters[1].key`. Not stable across edits to the template.
    - `link_hint` object: Omitted when the underlying flow template has no id: a link built from an empty id could not resolve, so none is included. The usage row itself is still reported.
      - `route` 'workflows-hub-flow', required
      - `params` object, required
        - `template_id` string, required
  - `status` 'ok' | 'partial', required: `partial` means the usages list hit its cap and the scan stopped there, before every scannable flow template in the org was examined. `ok` means the scan reached the end of the scannable population and returned every match found there — it does NOT mean every flow template in the org was examined: the underlying query only returns `version = v3` records, so legacy v1/v2 templates never enter the scan, and any record that fails to normalize is silently skipped and logged rather than failing the whole lookup.
  - `scanned` integer, required: Count of flow templates examined. This is every scannable flow template in the org, not only templates bound to this journey: the underlying query has no server-side journey filter, so it counts the org's whole scannable flow-template population, up to wherever the scan stopped if `status` is `partial`. "Scannable" excludes legacy v1/v2 records (the query filters to `version = v3`) and any record that fails to normalize (skipped and logged rather than failing the lookup), so this can be lower than the org's true total flow-template count.

## Other responses

- `400`: journey_id is missing, param_keys is missing or empty, or the caller's organization could not be resolved.

## Changes

- **2026-09-22** `fc2ed7527fde`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/epilot/apis/workflows-definitions/changes/v1/workflows-definition/journey-context:usages/post.md)

---

[API](https://skmtc.dev/epilot/apis/workflows-definitions.md) - [All operations](https://skmtc.dev/epilot/apis/workflows-definitions/llms.txt) - [OpenAPI document](https://skmtc.dev/epilot/apis/workflows-definitions/revisions/486a5352f2a7?raw)
