---
title: "getJourneyContextUsages"
method: POST
path: "/v1/automation/journey-context:usages"
tags: ["flows"]
---

# getJourneyContextUsages

`POST /v1/automation/journey-context:usages`

## Request

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

Where the given journey's context parameters are referenced in this org's automation flow action configs. Read-only; part of the cross-service usage aggregation in ER-5240.

## Request body

- JourneyContextUsagesReq
  - `journey_id` string, uuid, required
  - `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.

## Response `200`

Success

- JourneyContextUsagesResp
  - `usages` JourneyContextUsage[], required
    - `kind` 'automation', required
    - `resource` object, required
      - `type` 'automation_flow', required
      - `id` string, required
      - `name` string
    - `location` object
      - `action_id` string
      - `action_type` string
      - `action_index` integer
    - `matched_as` object, required
      - `dialect` 'name', required
      - `token` string, required
      - `at` string, required
    - `link_hint` object, required
      - `route` 'automation-flow', required
      - `params` object, required
  - `status` 'ok' | 'partial', required: partial means the row cap (MAX_USAGES) was reached mid-scan and the scan was aborted: entire flows after the one that tripped the cap may have gone unscanned, not just that some rows were dropped from the one flow being scanned when it tripped.
  - `scanned` integer, required: Number of flows actually entered by the scan, including the one flow the scan was aborted part-way through when the row cap tripped. Not a total: when status is partial, flows after the aborted one were never visited and are not counted here.

## Other responses

- `400`: Missing journey_id or param_keys
- `401`: Organization could not be established from the verified security context

## Changes

- **2026-10-27** `829714e88eac`: 1 info
  - added the optional property `usages/items/location/action_index` to the response with the `200` status
- **2026-09-22** `3de55ab0d5c4`: 1 info
  - endpoint added

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

---

[API](https://skmtc.dev/epilot/apis/automation-api.md) - [All operations](https://skmtc.dev/epilot/apis/automation-api/llms.txt) - [OpenAPI document](https://skmtc.dev/epilot/apis/automation-api/revisions/829714e88eac?raw)
