# POST /api/v2/automations/{automation}/actions/inspect-step

Inspect one step of an automation flow

- MCP id: automations.actions.inspect-step
- Scope: api:write:automations
- Scope: api:write:project_automations
- Scope: api:write:customer_automations
- Permission: automations::update
- Needs the automations feature on your organisation
- Rate cost: 1 unit, write bucket. A write costs the same whatever `view` you ask for.
- Cache-Control: private, no-store

Tells what one step can hold and use where it sits in a flow, which saves nothing: the schema of its settings there (so a choice such as a field of the trigger's record is listed), the data it can use as ready-to-paste `{{ tags }}` as far as you may read them, the ways out of it, what it hands on, and its problems.

Send a `definition` with the step in it, even with empty settings, or leave it out for the current version; steps kept as they were come from the current version. Name the step in `node_key`, and records whose fields you want listed in `expand`. The declared permission is `automations::update`; for a project or customer automation, the `project_automations` or `customer_automations` permission of the same action applies instead.

## Parameters
- automation (integer, path): The Automation's numeric id. Accepts a soft-deleted record.
- view (string, optional): Which field set to render.
- X-Request-Id (header, optional): A correlation id of your own. It is recorded in our logs next to the server's request id but never returned: the response header always carries the server's id. A value that does not match the pattern is discarded silently, never rejected.
- If-Match (header, optional): The ETag a write is conditional on. A stale validator is 412 precondition-failed.
- Idempotency-Key (header, optional): A caller-chosen key that makes this POST safe to retry. Replaying it returns the original response with Idempotency-Replayed: true.

## Request body
- node_key (string, required): The key of the step to inspect.
- definition (object, optional): The flow the step sits in, as a save takes it. Leave it out to use the current version.
  - nodes (array of any ≤ 100, optional): Required when definition is present.
  - edges (array of object ≤ 300, optional)
- expand (array of string ≤ 10, optional): Data tags of records whose own data to list as well, such as `record.project_id`; ten at most.

Unknown keys are refused with `422` validation-failed, naming the key.

## Response 200
- node_key (string ≤ 36, required): The step.
- node_type (string ≤ 100, required): Its type.
- label (string ≤ 255, required): Its type's name.
- config_schema (object, required): The JSON Schema of the step's settings in this place of this flow, so choices that depend on the flow, such as the fields of the trigger's record, are listed.
- data (array of object, required): The data the step can use, as far as you may read it: the trigger's record, earlier steps' output, a loop's item, values set before it. Paste a `tag` into a setting.
- expanded (object, required): For each tag asked for in `expand`, the data under it, such as the fields of the project in `record.project_id`, each with the members of `data`.
- lanes (array of object, required): The ways out of the step with its settings as sent.
- outputs (array of object, required): What the step hands to later steps with its settings as sent.
- problems (array of object, required): This step's problems, as `check-flow` reports them.

## Errors
- 403 forbidden-by-policy | insufficient-permission | insufficient-token-scope: Forbidden.
- 409 idempotency-key-in-flight | idempotency-key-reused: Conflict.
- 412 precondition-failed: Precondition failed.
- 415 unsupported-media-type: Unsupported media type.
- 422 unprocessable-relationship | validation-failed: Unprocessable content.
- 400 idempotency-key-required | invalid-cursor | invalid-query-parameter | malformed-request | unsupported-parameter: Bad request.
- 401 token-expired | unauthenticated: Unauthenticated.
- 404 endpoint-not-found | resource-not-found: Not found.
- 406 not-acceptable: Not acceptable.
- 429 rate-limit-exceeded: Too many requests.
- 500 internal-error: Server error.
- 503 tenant-unavailable: Service unavailable.

## Example
```bash
curl -X POST \
  'https://<your-url>/api/v2/automations/1/actions/inspect-step' \
  -H 'Authorization: Bearer <token>' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: <key>' \
  -d '{
    "node_key": "0b6f5a8e-3c1d-4f2a-9e7b-1d2c3b4a5f60",
    "expand": [
      "record.project_id"
    ]
  }'
```
