# Runs and cancellation

Source: https://neondeerdata.com/docs/api/scheduled-runs/runs/

Read scheduled runs and cancel a run or the permitted runs for one record.

The APIs on this page require alpha access for your organization. App availability and API access are separate. [Check access and permissions](https://neondeerdata.com/docs/api/permissions/).

## List scheduled runs

```http
GET /v1/scheduled-runs

```

Lists scheduled runs, one page at a time: the runs this API key scheduled or was given, or every run of its workflows when its access covers all history. Filter with any of the parameters; status can be sent more than once to match any of them.

Requires `scheduled_runs:read`. The connection also needs access to the relevant tables, objects, or workflows.

MCP action: `list_scheduled_runs`. Its argument names match the fields below; an HTTP header is passed using its argument name in MCP.

### Parameters

| Name                | Send in | Required | Type or allowed values                                                                                  | Notes                                            |
| ------------------- | ------- | -------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------ |
| `limit`             | query   | No       | integer                                                                                                 |                                                  |
| `cursor`            | query   | No       | string                                                                                                  |                                                  |
| `target_id`         | query   | No       | string                                                                                                  |                                                  |
| `workflow_id`       | query   | No       | string                                                                                                  |                                                  |
| `entry_point_id`    | query   | No       | string                                                                                                  |                                                  |
| `object_type`       | query   | No       | string                                                                                                  |                                                  |
| `record_id`         | query   | No       | string                                                                                                  |                                                  |
| `batch_id`          | query   | No       | string                                                                                                  |                                                  |
| `integration_id`    | query   | No       | string                                                                                                  |                                                  |
| `status`            | query   | No       | array of `"pending"`, `"sending"`, `"sent"`, `"failed"`, `"canceled"`, `"skipped"`, `"needs_attention"` | Repeat this query parameter for multiple values. |
| `created_at_from`   | query   | No       | string (date-time)                                                                                      |                                                  |
| `created_at_before` | query   | No       | string (date-time)                                                                                      |                                                  |
| `fire_at_from`      | query   | No       | string (date-time)                                                                                      |                                                  |
| `fire_at_before`    | query   | No       | string (date-time)                                                                                      |                                                  |
| `ended_at_from`     | query   | No       | string (date-time)                                                                                      |                                                  |
| `ended_at_before`   | query   | No       | string (date-time)                                                                                      |                                                  |
| `sort`              | query   | No       | `"fire_at"`, `"-fire_at"`, `"-created_at"`, `"created_at"`                                              |                                                  |

### Response

| HTTP status | Result          |
| ----------- | --------------- |
| `200`       | A page of runs. |

Required fields are required within their containing object. Notes identify fields that apply only to a particular response alternative.

| Response field                                       | Type                                                                                                                                                                                                                                                                          | Required in object | Notes                                               |
| ---------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | --------------------------------------------------- |
| `data`                                               | array of ScheduledRun                                                                                                                                                                                                                                                         | Yes                |                                                     |
| `data[].object`                                      | `"scheduled_run"`                                                                                                                                                                                                                                                             | Yes                |                                                     |
| `data[].id`                                          | string                                                                                                                                                                                                                                                                        | Yes                |                                                     |
| `data[].version`                                     | string                                                                                                                                                                                                                                                                        | Yes                |                                                     |
| `data[].batch_id`                                    | string                                                                                                                                                                                                                                                                        | Yes                |                                                     |
| `data[].target_id`                                   | string                                                                                                                                                                                                                                                                        | Yes                |                                                     |
| `data[].object_type`                                 | string                                                                                                                                                                                                                                                                        | Yes                |                                                     |
| `data[].record_id`                                   | string                                                                                                                                                                                                                                                                        | Yes                |                                                     |
| `data[].status`                                      | `"pending"`, `"sending"`, `"sent"`, `"failed"`, `"canceled"`, `"skipped"`, `"needs_attention"`                                                                                                                                                                                | Yes                |                                                     |
| `data[].delivery_outcome`                            | `"not_sent"`, `"accepted"`, `"rejected"`, `"unknown"`                                                                                                                                                                                                                         | Yes                |                                                     |
| `data[].terminal`                                    | boolean                                                                                                                                                                                                                                                                       | Yes                |                                                     |
| `data[].reason`                                      | `"canceled_by_member"`, `"canceled_by_workflow"`, `"canceled_by_integration"`, `"disconnected"`, `"workflow_off"`, `"object_changed"`, `"inputs_changed"`, `"late"`, `"rejected"`, `"unreachable"`, `"unsafe_destination"`, `"target_changed"`, `"authority_revoked"` or null | Yes                |                                                     |
| `data[].attempts`                                    | integer                                                                                                                                                                                                                                                                       | Yes                |                                                     |
| `data[].next_attempt_at`                             | string (date-time) or null                                                                                                                                                                                                                                                    | Yes                |                                                     |
| `data[].fire_at`                                     | string (date-time)                                                                                                                                                                                                                                                            | Yes                |                                                     |
| `data[].timezone`                                    | string                                                                                                                                                                                                                                                                        | Yes                |                                                     |
| `data[].sent_at`                                     | string (date-time) or null                                                                                                                                                                                                                                                    | Yes                |                                                     |
| `data[].ended_at`                                    | string (date-time) or null                                                                                                                                                                                                                                                    | Yes                |                                                     |
| `data[].expires_at`                                  | string (date-time) or null                                                                                                                                                                                                                                                    | Yes                |                                                     |
| `data[].scheduled_by`                                | object                                                                                                                                                                                                                                                                        | Yes                |                                                     |
| `data[].scheduled_by.kind`                           | `"integration"`                                                                                                                                                                                                                                                               | Yes                | When data\[\].scheduled_by.kind is `"integration"`. |
| `data[].scheduled_by.integration_id`                 | string                                                                                                                                                                                                                                                                        | Yes                | When data\[\].scheduled_by.kind is `"integration"`. |
| `data[].scheduled_by.kind`                           | `"person"`                                                                                                                                                                                                                                                                    | Yes                | When data\[\].scheduled_by.kind is `"person"`.      |
| `data[].scheduled_by.workspace_member_id`            | string                                                                                                                                                                                                                                                                        | Yes                | When data\[\].scheduled_by.kind is `"person"`.      |
| `data[].scheduled_by.name`                           | string or null                                                                                                                                                                                                                                                                | Yes                | When data\[\].scheduled_by.kind is `"person"`.      |
| `data[].scheduled_by.kind`                           | `"workflow"`                                                                                                                                                                                                                                                                  | Yes                | When data\[\].scheduled_by.kind is `"workflow"`.    |
| `data[].created_at`                                  | string (date-time)                                                                                                                                                                                                                                                            | Yes                |                                                     |
| `pagination`                                         | object                                                                                                                                                                                                                                                                        | Yes                |                                                     |
| `pagination.next_cursor`                             | string or null                                                                                                                                                                                                                                                                | Yes                |                                                     |
| `references`                                         | array of object                                                                                                                                                                                                                                                               | Yes                |                                                     |
| `references[].provider`                              | `"attio"`                                                                                                                                                                                                                                                                     | Yes                |                                                     |
| `references[].workspace_id`                          | string or null                                                                                                                                                                                                                                                                | Yes                |                                                     |
| `references[].object_id`                             | string or null                                                                                                                                                                                                                                                                | Yes                |                                                     |
| `references[].object_slug`                           | string or null                                                                                                                                                                                                                                                                | Yes                |                                                     |
| `references[].records`                               | array of object                                                                                                                                                                                                                                                               | Yes                |                                                     |
| `references[].records[].record_id`                   | string                                                                                                                                                                                                                                                                        | Yes                |                                                     |
| `references[].records[].web_url`                     | string (uri) or null                                                                                                                                                                                                                                                          | Yes                |                                                     |
| `references[].records[].attributes`                  | array of object                                                                                                                                                                                                                                                               | Yes                |                                                     |
| `references[].records[].attributes[].attribute_id`   | string or null                                                                                                                                                                                                                                                                | Yes                |                                                     |
| `references[].records[].attributes[].attribute_slug` | string or null                                                                                                                                                                                                                                                                | Yes                |                                                     |
| `references[].records[].via`                         | array of object                                                                                                                                                                                                                                                               | Yes                |                                                     |
| `references[].records[].via[].source_object_id`      | string or null                                                                                                                                                                                                                                                                | Yes                |                                                     |
| `references[].records[].via[].source_object_slug`    | string or null                                                                                                                                                                                                                                                                | Yes                |                                                     |
| `references[].records[].via[].source_record_id`      | string                                                                                                                                                                                                                                                                        | Yes                |                                                     |
| `references[].records[].via[].attribute_id`          | string or null                                                                                                                                                                                                                                                                | Yes                |                                                     |
| `references[].records[].via[].attribute_slug`        | string or null                                                                                                                                                                                                                                                                | Yes                |                                                     |
| `references[].records[].via[].target_object_id`      | string or null                                                                                                                                                                                                                                                                | Yes                |                                                     |
| `references[].records[].via[].target_object_slug`    | string or null                                                                                                                                                                                                                                                                | Yes                |                                                     |
| `references[].records[].via[].target_record_id`      | string                                                                                                                                                                                                                                                                        | Yes                |                                                     |
| `references[].lookup_hint`                           | object                                                                                                                                                                                                                                                                        | Yes                |                                                     |
| `references[].lookup_hint.resource`                  | `"records"`                                                                                                                                                                                                                                                                   | Yes                |                                                     |
| `references[].lookup_hint.object`                    | string                                                                                                                                                                                                                                                                        | Yes                |                                                     |
| `references[].lookup_hint.record_ids`                | array of string                                                                                                                                                                                                                                                               | Yes                |                                                     |

### Errors

| HTTP status | Meaning                                                                                                                                                                        |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `400`       | One of: credential_in_url, invalid_parameter, invalid_request, unknown_parameter, invalid_cursor.                                                                              |
| `401`       | One of: missing_credential, invalid_credential, credential_expired, credential_revoked.                                                                                        |
| `402`       | One of: payment_overdue.                                                                                                                                                       |
| `403`       | One of: scope_required.                                                                                                                                                        |
| `404`       | One of: not_found.                                                                                                                                                             |
| `409`       | One of: authorization_policy_changed, batch_started, conflict, destination_unavailable, grant_changed, idempotency_conflict, setup_required, target_changed, version_conflict. |
| `410`       | One of: resource_expired.                                                                                                                                                      |
| `413`       | One of: request_too_large.                                                                                                                                                     |
| `422`       | One of: budget_exceeded, invalid_fire_time, invalid_selection, target_version_unavailable, unsupported_ownership.                                                              |
| `423`       | One of: organization_reopening.                                                                                                                                                |
| `428`       | One of: customer_agreement_required.                                                                                                                                           |
| `429`       | One of: rate_limited.                                                                                                                                                          |
| `503`       | One of: service_unavailable.                                                                                                                                                   |

See [errors and recovery](https://neondeerdata.com/docs/api/errors/) and [safe retries](https://neondeerdata.com/docs/api/requests/) before repeating a write.

## Get the version to cancel a record's pending runs

```http
GET /v1/scheduled-runs/records/cancel-control

```

Gets the version you need to cancel a record's pending runs. Name the record, and optionally one workflow, then send the version when you cancel the record's pending runs. Needs no extra scope.

Requires an active connection. Access to existing work is checked against the connection that started it.

MCP action: `get_scheduled_run_record_cancel_control`. Its argument names match the fields below; an HTTP header is passed using its argument name in MCP.

### Parameters

| Name          | Send in | Required | Type or allowed values | Notes |
| ------------- | ------- | -------- | ---------------------- | ----- |
| `object_type` | query   | Yes      | string                 |       |
| `record_id`   | query   | Yes      | string (uuid)          |       |
| `target_id`   | query   | No       | string                 |       |

### Response

| HTTP status | Result                                     |
| ----------- | ------------------------------------------ |
| `200`       | The version of that record's pending runs. |

Required fields are required within their containing object. Notes identify fields that apply only to a particular response alternative.

| Response field | Type                             | Required in object | Notes |
| -------------- | -------------------------------- | ------------------ | ----- |
| `data`         | object                           | Yes                |       |
| `data.object`  | `"scheduled_run_cancel_control"` | Yes                |       |
| `data.version` | string                           | Yes                |       |

### Errors

| HTTP status | Meaning                                                                                                                                                                        |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `400`       | One of: credential_in_url, invalid_parameter, invalid_request, unknown_parameter, invalid_cursor.                                                                              |
| `401`       | One of: missing_credential, invalid_credential, credential_expired, credential_revoked.                                                                                        |
| `402`       | One of: payment_overdue.                                                                                                                                                       |
| `403`       | One of: scope_required.                                                                                                                                                        |
| `404`       | One of: not_found.                                                                                                                                                             |
| `409`       | One of: authorization_policy_changed, batch_started, conflict, destination_unavailable, grant_changed, idempotency_conflict, setup_required, target_changed, version_conflict. |
| `410`       | One of: resource_expired.                                                                                                                                                      |
| `413`       | One of: request_too_large.                                                                                                                                                     |
| `422`       | One of: budget_exceeded, invalid_fire_time, invalid_selection, target_version_unavailable, unsupported_ownership.                                                              |
| `423`       | One of: organization_reopening.                                                                                                                                                |
| `428`       | One of: customer_agreement_required.                                                                                                                                           |
| `429`       | One of: rate_limited.                                                                                                                                                          |
| `503`       | One of: service_unavailable.                                                                                                                                                   |

See [errors and recovery](https://neondeerdata.com/docs/api/errors/) and [safe retries](https://neondeerdata.com/docs/api/requests/) before repeating a write.

## Cancel a record's pending runs

```http
POST /v1/scheduled-runs/records/cancel

```

Cancels a record's pending runs that this API key scheduled or was given. Send the version you got for canceling the record's pending runs; if the record's pending runs changed since you read it, the answer is version_conflict and nothing is canceled. Needs no extra scope.

Requires an active connection. Access to existing work is checked against the connection that started it.

MCP action: `cancel_scheduled_runs_for_record`. Its argument names match the fields below; an HTTP header is passed using its argument name in MCP.

### Parameters

| Name               | Send in                   | Required | Type or allowed values | Notes |
| ------------------ | ------------------------- | -------- | ---------------------- | ----- |
| `object_type`      | JSON body                 | Yes      | string                 |       |
| `record_id`        | JSON body                 | Yes      | string (uuid)          |       |
| `target_id`        | JSON body                 | No       | string                 |       |
| `expected_version` | JSON body                 | Yes      | string                 |       |
| `request_key`      | Header: `Idempotency-Key` | Yes      | string                 |       |

### Response

| HTTP status | Result                  |
| ----------- | ----------------------- |
| `200`       | The cancel is accepted. |

Required fields are required within their containing object. Notes identify fields that apply only to a particular response alternative.

| Response field                                                    | Type                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | Required in object | Notes                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `data`                                                            | OperationReceipt                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | Yes                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `data.id`                                                         | string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | Yes                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `data.object`                                                     | `"operation"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | Yes                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `data.version`                                                    | string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | Yes                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `data.resource_id`                                                | string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | Yes                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `data.resource_type`                                              | string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | Yes                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `data.status`                                                     | `"pending"`, `"succeeded"`, `"failed"`, `"canceled"`, `"needs_attention"`                                                                                                                                                                                                                                                                                                                                                                                                                                                            | Yes                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `data.terminal`                                                   | boolean                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | Yes                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `data.created_at`                                                 | string (date-time)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | Yes                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `data.ended_at`                                                   | string (date-time) or null                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | Yes                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `data.reason_code`                                                | string or null                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | Yes                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `data.replayed`                                                   | `true`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | No                 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `data.operation_type`                                             | `"scan_cancel"`, `"ai_assessment"`, `"ai_assessment_cancel"`, `"review_update"`, `"exclusion_create"`, `"exclusion_update"`, `"scheduled_batch_create"`, `"scheduled_batch_update"`, `"scheduled_batch_cancel"`, `"scheduled_run_cancel"`, `"scheduled_record_cancel"`, `"schedule_create"`, `"schedule_update"`, `"webhook_endpoint_create"`, `"webhook_endpoint_update"`, `"webhook_secret_rotate"`, `"endpoint_verification"`, `"webhook_replay"`, `"merge_rebuild"`, `"scheduled_batch_transfer"`, `"webhook_endpoint_transfer"` | Yes                | When data.operation_type is `"scan_cancel"`, `"ai_assessment"`, `"ai_assessment_cancel"`, `"review_update"`, `"exclusion_create"`, `"exclusion_update"`, `"scheduled_batch_create"`, `"scheduled_batch_update"`, `"scheduled_batch_cancel"`, `"scheduled_run_cancel"`, `"scheduled_record_cancel"`, `"schedule_create"`, `"schedule_update"`, `"webhook_endpoint_create"`, `"webhook_endpoint_update"`, `"webhook_secret_rotate"`, `"endpoint_verification"`, `"webhook_replay"`, `"merge_rebuild"`, `"scheduled_batch_transfer"`, `"webhook_endpoint_transfer"`. |
| `data.action_metadata`                                            | object                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | Yes                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `data.action_metadata.resource_version`                           | string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | Yes                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `data.action_metadata.allowed_actions`                            | array of string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | Yes                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `data.operation_type`                                             | `"merge_execute"`, `"merge_cancel"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | Yes                | When data.operation_type is `"merge_execute"`, `"merge_cancel"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `data.action_metadata.execute_not_before`                         | string (date-time)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | Yes                | When data.operation_type is `"merge_execute"`, `"merge_cancel"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `data.action_metadata.authorization_expires_at`                   | string (date-time)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | Yes                | When data.operation_type is `"merge_execute"`, `"merge_cancel"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `data.operation_type`                                             | `"plan_prepare"`, `"plan_revision_prepare"`, `"retry_plan_prepare"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | Yes                | When data.operation_type is `"plan_prepare"`, `"plan_revision_prepare"`, `"retry_plan_prepare"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `data.action_metadata.plan_revision`                              | string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | Yes                | When data.operation_type is `"plan_prepare"`, `"plan_revision_prepare"`, `"retry_plan_prepare"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `data.action_metadata.effects_digest`                             | string or null                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | Yes                | When data.operation_type is `"plan_prepare"`, `"plan_revision_prepare"`, `"retry_plan_prepare"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `data.action_metadata.preview_digest`                             | string or null                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | Yes                | When data.operation_type is `"plan_prepare"`, `"plan_revision_prepare"`, `"retry_plan_prepare"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `data.action_metadata.recovery_coverage_digest`                   | string or null                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | Yes                | When data.operation_type is `"plan_prepare"`, `"plan_revision_prepare"`, `"retry_plan_prepare"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `data.action_metadata.authorization_requirement`                  | object                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | Yes                | When data.operation_type is `"plan_prepare"`, `"plan_revision_prepare"`, `"retry_plan_prepare"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `data.action_metadata.authorization_requirement.scope`            | `"organization_baseline"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | Yes                | When data.operation_type is `"plan_prepare"`, `"plan_revision_prepare"`, `"retry_plan_prepare"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `data.action_metadata.authorization_requirement.mode`             | `"api_key_allowed"`, `"not_allowed"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | Yes                | When data.operation_type is `"plan_prepare"`, `"plan_revision_prepare"`, `"retry_plan_prepare"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `data.action_metadata.authorization_requirement.policy_version`   | string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | Yes                | When data.operation_type is `"plan_prepare"`, `"plan_revision_prepare"`, `"retry_plan_prepare"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `data.action_metadata.authorization_requirement.grant_evaluation` | `"at_execution"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | Yes                | When data.operation_type is `"plan_prepare"`, `"plan_revision_prepare"`, `"retry_plan_prepare"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `data.action_metadata.authorization_requirement.reason_code`      | string or null                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | Yes                | When data.operation_type is `"plan_prepare"`, `"plan_revision_prepare"`, `"retry_plan_prepare"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `data.action_metadata.authorization_state`                        | `"unauthorized"`, `"authorized"`, `"rejected"`, `"invalidated"`, `"expired"`                                                                                                                                                                                                                                                                                                                                                                                                                                                         | Yes                | When data.operation_type is `"plan_prepare"`, `"plan_revision_prepare"`, `"retry_plan_prepare"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `data.operation_type`                                             | `"review_bulk_update"`, `"exclusion_bulk_create"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Yes                | When data.operation_type is `"review_bulk_update"`, `"exclusion_bulk_create"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `data.action_metadata.results`                                    | array of object                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | Yes                | When data.operation_type is `"review_bulk_update"`, `"exclusion_bulk_create"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `data.action_metadata.results[].index`                            | integer                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | Yes                | When data.operation_type is `"review_bulk_update"`, `"exclusion_bulk_create"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `data.action_metadata.results[].outcome`                          | `"succeeded"`, `"failed"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | Yes                | When data.operation_type is `"review_bulk_update"`, `"exclusion_bulk_create"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `data.action_metadata.results[].resource_ref`                     | object                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | No                 | When data.operation_type is `"review_bulk_update"`, `"exclusion_bulk_create"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `data.action_metadata.results[].resource_ref.id`                  | string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | Yes                | When data.operation_type is `"review_bulk_update"`, `"exclusion_bulk_create"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `data.action_metadata.results[].resource_ref.version`             | string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | Yes                | When data.operation_type is `"review_bulk_update"`, `"exclusion_bulk_create"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `data.action_metadata.results[].error`                            | object                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | No                 | When data.operation_type is `"review_bulk_update"`, `"exclusion_bulk_create"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `data.action_metadata.results[].error.code`                       | string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | Yes                | When data.operation_type is `"review_bulk_update"`, `"exclusion_bulk_create"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `data.action_metadata.results[].error.message`                    | string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | Yes                | When data.operation_type is `"review_bulk_update"`, `"exclusion_bulk_create"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `data.action_metadata.results[].error.param`                      | string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | No                 | When data.operation_type is `"review_bulk_update"`, `"exclusion_bulk_create"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `data.operation_type`                                             | `"scan"`, `"scan_continue"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | Yes                | When data.operation_type is `"scan"`, `"scan_continue"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `data.action_metadata.ai_child`                                   | object                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | Yes                | When data.operation_type is `"scan"`, `"scan_continue"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `data.action_metadata.ai_child.state`                             | `"not_requested"`, `"pending_admission"`, `"admitted"`, `"skipped"`, `"failed"`                                                                                                                                                                                                                                                                                                                                                                                                                                                      | Yes                | When data.operation_type is `"scan"`, `"scan_continue"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `data.action_metadata.ai_child.reason_code`                       | string or null                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | Yes                | When data.operation_type is `"scan"`, `"scan_continue"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `data.action_metadata.ai_child.ai_run_id`                         | string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | No                 | When data.operation_type is `"scan"`, `"scan_continue"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `data.action_metadata.ai_child.ai_operation_id`                   | string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | No                 | When data.operation_type is `"scan"`, `"scan_continue"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `data.action_metadata.ai_child.operation_url`                     | string (uri)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | No                 | When data.operation_type is `"scan"`, `"scan_continue"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |

### Errors

| HTTP status | Meaning                                                                                                           |
| ----------- | ----------------------------------------------------------------------------------------------------------------- |
| `400`       | One of: credential_in_url, invalid_parameter, invalid_request, unknown_parameter.                                 |
| `401`       | One of: missing_credential, invalid_credential, credential_expired, credential_revoked.                           |
| `402`       | One of: payment_overdue.                                                                                          |
| `403`       | One of: scope_required.                                                                                           |
| `404`       | One of: not_found.                                                                                                |
| `409`       | One of: idempotency_conflict, version_conflict.                                                                   |
| `410`       | One of: resource_expired.                                                                                         |
| `413`       | One of: request_too_large.                                                                                        |
| `422`       | One of: budget_exceeded, invalid_fire_time, invalid_selection, target_version_unavailable, unsupported_ownership. |
| `423`       | One of: organization_reopening.                                                                                   |
| `428`       | One of: customer_agreement_required.                                                                              |
| `429`       | One of: rate_limited.                                                                                             |
| `503`       | One of: service_unavailable.                                                                                      |

See [errors and recovery](https://neondeerdata.com/docs/api/errors/) and [safe retries](https://neondeerdata.com/docs/api/requests/) before repeating a write.

## Get a scheduled run

```http
GET /v1/scheduled-runs/{run_id}

```

Gets one scheduled run by its ID.

Requires `scheduled_runs:read`. The connection also needs access to the relevant tables, objects, or workflows.

MCP action: `get_scheduled_run`. Its argument names match the fields below; an HTTP header is passed using its argument name in MCP.

### Parameters

| Name     | Send in | Required | Type or allowed values | Notes |
| -------- | ------- | -------- | ---------------------- | ----- |
| `run_id` | path    | Yes      | string                 |       |

### Response

| HTTP status | Result   |
| ----------- | -------- |
| `200`       | The run. |

Required fields are required within their containing object. Notes identify fields that apply only to a particular response alternative.

| Response field                          | Type                                                                                                                                                                                                                                                                          | Required in object | Notes                                           |
| --------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | ----------------------------------------------- |
| `data`                                  | ScheduledRun                                                                                                                                                                                                                                                                  | Yes                |                                                 |
| `data.object`                           | `"scheduled_run"`                                                                                                                                                                                                                                                             | Yes                |                                                 |
| `data.id`                               | string                                                                                                                                                                                                                                                                        | Yes                |                                                 |
| `data.version`                          | string                                                                                                                                                                                                                                                                        | Yes                |                                                 |
| `data.batch_id`                         | string                                                                                                                                                                                                                                                                        | Yes                |                                                 |
| `data.target_id`                        | string                                                                                                                                                                                                                                                                        | Yes                |                                                 |
| `data.object_type`                      | string                                                                                                                                                                                                                                                                        | Yes                |                                                 |
| `data.record_id`                        | string                                                                                                                                                                                                                                                                        | Yes                |                                                 |
| `data.status`                           | `"pending"`, `"sending"`, `"sent"`, `"failed"`, `"canceled"`, `"skipped"`, `"needs_attention"`                                                                                                                                                                                | Yes                |                                                 |
| `data.delivery_outcome`                 | `"not_sent"`, `"accepted"`, `"rejected"`, `"unknown"`                                                                                                                                                                                                                         | Yes                |                                                 |
| `data.terminal`                         | boolean                                                                                                                                                                                                                                                                       | Yes                |                                                 |
| `data.reason`                           | `"canceled_by_member"`, `"canceled_by_workflow"`, `"canceled_by_integration"`, `"disconnected"`, `"workflow_off"`, `"object_changed"`, `"inputs_changed"`, `"late"`, `"rejected"`, `"unreachable"`, `"unsafe_destination"`, `"target_changed"`, `"authority_revoked"` or null | Yes                |                                                 |
| `data.attempts`                         | integer                                                                                                                                                                                                                                                                       | Yes                |                                                 |
| `data.next_attempt_at`                  | string (date-time) or null                                                                                                                                                                                                                                                    | Yes                |                                                 |
| `data.fire_at`                          | string (date-time)                                                                                                                                                                                                                                                            | Yes                |                                                 |
| `data.timezone`                         | string                                                                                                                                                                                                                                                                        | Yes                |                                                 |
| `data.sent_at`                          | string (date-time) or null                                                                                                                                                                                                                                                    | Yes                |                                                 |
| `data.ended_at`                         | string (date-time) or null                                                                                                                                                                                                                                                    | Yes                |                                                 |
| `data.expires_at`                       | string (date-time) or null                                                                                                                                                                                                                                                    | Yes                |                                                 |
| `data.scheduled_by`                     | object                                                                                                                                                                                                                                                                        | Yes                |                                                 |
| `data.scheduled_by.kind`                | `"integration"`                                                                                                                                                                                                                                                               | Yes                | When data.scheduled_by.kind is `"integration"`. |
| `data.scheduled_by.integration_id`      | string                                                                                                                                                                                                                                                                        | Yes                | When data.scheduled_by.kind is `"integration"`. |
| `data.scheduled_by.kind`                | `"person"`                                                                                                                                                                                                                                                                    | Yes                | When data.scheduled_by.kind is `"person"`.      |
| `data.scheduled_by.workspace_member_id` | string                                                                                                                                                                                                                                                                        | Yes                | When data.scheduled_by.kind is `"person"`.      |
| `data.scheduled_by.name`                | string or null                                                                                                                                                                                                                                                                | Yes                | When data.scheduled_by.kind is `"person"`.      |
| `data.scheduled_by.kind`                | `"workflow"`                                                                                                                                                                                                                                                                  | Yes                | When data.scheduled_by.kind is `"workflow"`.    |
| `data.created_at`                       | string (date-time)                                                                                                                                                                                                                                                            | Yes                |                                                 |

### Errors

| HTTP status | Meaning                                                                                                                                                                        |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `400`       | One of: credential_in_url, invalid_parameter, unknown_parameter.                                                                                                               |
| `401`       | One of: missing_credential, invalid_credential, credential_expired, credential_revoked.                                                                                        |
| `402`       | One of: payment_overdue.                                                                                                                                                       |
| `403`       | One of: scope_required.                                                                                                                                                        |
| `404`       | One of: not_found.                                                                                                                                                             |
| `409`       | One of: authorization_policy_changed, batch_started, conflict, destination_unavailable, grant_changed, idempotency_conflict, setup_required, target_changed, version_conflict. |
| `410`       | One of: resource_expired.                                                                                                                                                      |
| `413`       | One of: request_too_large.                                                                                                                                                     |
| `422`       | One of: budget_exceeded, invalid_fire_time, invalid_selection, target_version_unavailable, unsupported_ownership.                                                              |
| `423`       | One of: organization_reopening.                                                                                                                                                |
| `428`       | One of: customer_agreement_required.                                                                                                                                           |
| `429`       | One of: rate_limited.                                                                                                                                                          |
| `503`       | One of: service_unavailable.                                                                                                                                                   |

See [errors and recovery](https://neondeerdata.com/docs/api/errors/) and [safe retries](https://neondeerdata.com/docs/api/requests/) before repeating a write.

## Cancel a run that has not started

```http
POST /v1/scheduled-runs/{run_id}/cancel

```

Cancels one run that has not started. Send the run's version as expected_version. Works only on a run this API key scheduled or was given, and needs no extra scope.

Requires an active connection. Access to existing work is checked against the connection that started it.

MCP action: `cancel_scheduled_run`. Its argument names match the fields below; an HTTP header is passed using its argument name in MCP.

### Parameters

| Name               | Send in                   | Required | Type or allowed values | Notes |
| ------------------ | ------------------------- | -------- | ---------------------- | ----- |
| `run_id`           | path                      | Yes      | string                 |       |
| `expected_version` | JSON body                 | Yes      | string                 |       |
| `request_key`      | Header: `Idempotency-Key` | Yes      | string                 |       |

### Response

| HTTP status | Result                  |
| ----------- | ----------------------- |
| `200`       | The cancel is accepted. |

Required fields are required within their containing object. Notes identify fields that apply only to a particular response alternative.

| Response field                                                    | Type                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | Required in object | Notes                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `data`                                                            | OperationReceipt                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | Yes                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `data.id`                                                         | string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | Yes                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `data.object`                                                     | `"operation"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | Yes                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `data.version`                                                    | string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | Yes                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `data.resource_id`                                                | string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | Yes                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `data.resource_type`                                              | string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | Yes                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `data.status`                                                     | `"pending"`, `"succeeded"`, `"failed"`, `"canceled"`, `"needs_attention"`                                                                                                                                                                                                                                                                                                                                                                                                                                                            | Yes                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `data.terminal`                                                   | boolean                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | Yes                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `data.created_at`                                                 | string (date-time)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | Yes                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `data.ended_at`                                                   | string (date-time) or null                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | Yes                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `data.reason_code`                                                | string or null                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | Yes                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `data.replayed`                                                   | `true`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | No                 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `data.operation_type`                                             | `"scan_cancel"`, `"ai_assessment"`, `"ai_assessment_cancel"`, `"review_update"`, `"exclusion_create"`, `"exclusion_update"`, `"scheduled_batch_create"`, `"scheduled_batch_update"`, `"scheduled_batch_cancel"`, `"scheduled_run_cancel"`, `"scheduled_record_cancel"`, `"schedule_create"`, `"schedule_update"`, `"webhook_endpoint_create"`, `"webhook_endpoint_update"`, `"webhook_secret_rotate"`, `"endpoint_verification"`, `"webhook_replay"`, `"merge_rebuild"`, `"scheduled_batch_transfer"`, `"webhook_endpoint_transfer"` | Yes                | When data.operation_type is `"scan_cancel"`, `"ai_assessment"`, `"ai_assessment_cancel"`, `"review_update"`, `"exclusion_create"`, `"exclusion_update"`, `"scheduled_batch_create"`, `"scheduled_batch_update"`, `"scheduled_batch_cancel"`, `"scheduled_run_cancel"`, `"scheduled_record_cancel"`, `"schedule_create"`, `"schedule_update"`, `"webhook_endpoint_create"`, `"webhook_endpoint_update"`, `"webhook_secret_rotate"`, `"endpoint_verification"`, `"webhook_replay"`, `"merge_rebuild"`, `"scheduled_batch_transfer"`, `"webhook_endpoint_transfer"`. |
| `data.action_metadata`                                            | object                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | Yes                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `data.action_metadata.resource_version`                           | string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | Yes                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `data.action_metadata.allowed_actions`                            | array of string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | Yes                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `data.operation_type`                                             | `"merge_execute"`, `"merge_cancel"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | Yes                | When data.operation_type is `"merge_execute"`, `"merge_cancel"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `data.action_metadata.execute_not_before`                         | string (date-time)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | Yes                | When data.operation_type is `"merge_execute"`, `"merge_cancel"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `data.action_metadata.authorization_expires_at`                   | string (date-time)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | Yes                | When data.operation_type is `"merge_execute"`, `"merge_cancel"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `data.operation_type`                                             | `"plan_prepare"`, `"plan_revision_prepare"`, `"retry_plan_prepare"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | Yes                | When data.operation_type is `"plan_prepare"`, `"plan_revision_prepare"`, `"retry_plan_prepare"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `data.action_metadata.plan_revision`                              | string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | Yes                | When data.operation_type is `"plan_prepare"`, `"plan_revision_prepare"`, `"retry_plan_prepare"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `data.action_metadata.effects_digest`                             | string or null                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | Yes                | When data.operation_type is `"plan_prepare"`, `"plan_revision_prepare"`, `"retry_plan_prepare"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `data.action_metadata.preview_digest`                             | string or null                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | Yes                | When data.operation_type is `"plan_prepare"`, `"plan_revision_prepare"`, `"retry_plan_prepare"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `data.action_metadata.recovery_coverage_digest`                   | string or null                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | Yes                | When data.operation_type is `"plan_prepare"`, `"plan_revision_prepare"`, `"retry_plan_prepare"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `data.action_metadata.authorization_requirement`                  | object                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | Yes                | When data.operation_type is `"plan_prepare"`, `"plan_revision_prepare"`, `"retry_plan_prepare"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `data.action_metadata.authorization_requirement.scope`            | `"organization_baseline"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | Yes                | When data.operation_type is `"plan_prepare"`, `"plan_revision_prepare"`, `"retry_plan_prepare"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `data.action_metadata.authorization_requirement.mode`             | `"api_key_allowed"`, `"not_allowed"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | Yes                | When data.operation_type is `"plan_prepare"`, `"plan_revision_prepare"`, `"retry_plan_prepare"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `data.action_metadata.authorization_requirement.policy_version`   | string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | Yes                | When data.operation_type is `"plan_prepare"`, `"plan_revision_prepare"`, `"retry_plan_prepare"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `data.action_metadata.authorization_requirement.grant_evaluation` | `"at_execution"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | Yes                | When data.operation_type is `"plan_prepare"`, `"plan_revision_prepare"`, `"retry_plan_prepare"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `data.action_metadata.authorization_requirement.reason_code`      | string or null                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | Yes                | When data.operation_type is `"plan_prepare"`, `"plan_revision_prepare"`, `"retry_plan_prepare"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `data.action_metadata.authorization_state`                        | `"unauthorized"`, `"authorized"`, `"rejected"`, `"invalidated"`, `"expired"`                                                                                                                                                                                                                                                                                                                                                                                                                                                         | Yes                | When data.operation_type is `"plan_prepare"`, `"plan_revision_prepare"`, `"retry_plan_prepare"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `data.operation_type`                                             | `"review_bulk_update"`, `"exclusion_bulk_create"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Yes                | When data.operation_type is `"review_bulk_update"`, `"exclusion_bulk_create"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `data.action_metadata.results`                                    | array of object                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | Yes                | When data.operation_type is `"review_bulk_update"`, `"exclusion_bulk_create"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `data.action_metadata.results[].index`                            | integer                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | Yes                | When data.operation_type is `"review_bulk_update"`, `"exclusion_bulk_create"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `data.action_metadata.results[].outcome`                          | `"succeeded"`, `"failed"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | Yes                | When data.operation_type is `"review_bulk_update"`, `"exclusion_bulk_create"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `data.action_metadata.results[].resource_ref`                     | object                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | No                 | When data.operation_type is `"review_bulk_update"`, `"exclusion_bulk_create"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `data.action_metadata.results[].resource_ref.id`                  | string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | Yes                | When data.operation_type is `"review_bulk_update"`, `"exclusion_bulk_create"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `data.action_metadata.results[].resource_ref.version`             | string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | Yes                | When data.operation_type is `"review_bulk_update"`, `"exclusion_bulk_create"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `data.action_metadata.results[].error`                            | object                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | No                 | When data.operation_type is `"review_bulk_update"`, `"exclusion_bulk_create"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `data.action_metadata.results[].error.code`                       | string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | Yes                | When data.operation_type is `"review_bulk_update"`, `"exclusion_bulk_create"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `data.action_metadata.results[].error.message`                    | string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | Yes                | When data.operation_type is `"review_bulk_update"`, `"exclusion_bulk_create"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `data.action_metadata.results[].error.param`                      | string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | No                 | When data.operation_type is `"review_bulk_update"`, `"exclusion_bulk_create"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `data.operation_type`                                             | `"scan"`, `"scan_continue"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | Yes                | When data.operation_type is `"scan"`, `"scan_continue"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `data.action_metadata.ai_child`                                   | object                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | Yes                | When data.operation_type is `"scan"`, `"scan_continue"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `data.action_metadata.ai_child.state`                             | `"not_requested"`, `"pending_admission"`, `"admitted"`, `"skipped"`, `"failed"`                                                                                                                                                                                                                                                                                                                                                                                                                                                      | Yes                | When data.operation_type is `"scan"`, `"scan_continue"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `data.action_metadata.ai_child.reason_code`                       | string or null                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | Yes                | When data.operation_type is `"scan"`, `"scan_continue"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `data.action_metadata.ai_child.ai_run_id`                         | string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | No                 | When data.operation_type is `"scan"`, `"scan_continue"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `data.action_metadata.ai_child.ai_operation_id`                   | string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | No                 | When data.operation_type is `"scan"`, `"scan_continue"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `data.action_metadata.ai_child.operation_url`                     | string (uri)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | No                 | When data.operation_type is `"scan"`, `"scan_continue"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |

### Errors

| HTTP status | Meaning                                                                                                           |
| ----------- | ----------------------------------------------------------------------------------------------------------------- |
| `400`       | One of: credential_in_url, invalid_parameter, invalid_request, unknown_parameter.                                 |
| `401`       | One of: missing_credential, invalid_credential, credential_expired, credential_revoked.                           |
| `402`       | One of: payment_overdue.                                                                                          |
| `403`       | One of: scope_required.                                                                                           |
| `404`       | One of: not_found.                                                                                                |
| `409`       | One of: idempotency_conflict, version_conflict.                                                                   |
| `410`       | One of: resource_expired.                                                                                         |
| `413`       | One of: request_too_large.                                                                                        |
| `422`       | One of: budget_exceeded, invalid_fire_time, invalid_selection, target_version_unavailable, unsupported_ownership. |
| `423`       | One of: organization_reopening.                                                                                   |
| `428`       | One of: customer_agreement_required.                                                                              |
| `429`       | One of: rate_limited.                                                                                             |
| `503`       | One of: service_unavailable.                                                                                      |

See [errors and recovery](https://neondeerdata.com/docs/api/errors/) and [safe retries](https://neondeerdata.com/docs/api/requests/) before repeating a write.

The [public OpenAPI document](https://neondeerdata.com/docs/api/meta/openapi/) lists generally available API families. Alpha operations may not appear in that document; their request and response fields are listed on this page. Use the [API Playground](https://neondeerdata.com/docs/api/testing/) to inspect a real response with your connection's access.
