# Task sync review and repair

Source: https://neondeerdata.com/docs/api/tasks/sync/

Review differences, choose the values to keep, link an existing Attio task, or retry synchronization.

## Review a task's sync

```http
GET /v1/task-management/{task_id}/sync

```

Reviews a task whose sync with Attio needs attention (its sync_state is conflict or attention; list tasks with needs_attention true to find them). It reads the task in Attio now, and says what happened (situation) and which call repairs it (next_step). For resolve, each conflict names a value and the versions there are to keep: the one saved in Neon Deer and the Attio task's; a source with no version of that value is null. Send the review's version and fingerprint with the repair.

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

MCP action: `get_task_sync_review`. Its arguments use the names below, except fields marked REST only. An HTTP header is passed using its argument name in MCP.

### Parameters

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

### Response

| HTTP status | Result                 |
| ----------- | ---------------------- |
| `200`       | What the review found. |

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`                                        | `"task_sync_review"`                                            | Yes                |                                                |
| `data.task_id`                                       | string (uuid)                                                   | Yes                |                                                |
| `data.version`                                       | string                                                          | Yes                |                                                |
| `data.fingerprint`                                   | string                                                          | Yes                |                                                |
| `data.situation`                                     | `"conflict"`, `"create_unconfirmed"`, `"retry"`                 | Yes                |                                                |
| `data.next_step`                                     | `"resolve"`, `"link"`, `"retry"`                                | Yes                |                                                |
| `data.native_task_id`                                | string (uuid) or null                                           | Yes                |                                                |
| `data.conflicts`                                     | array of object                                                 | Yes                |                                                |
| `data.conflicts[].value`                             | string                                                          | Yes                |                                                |
| `data.conflicts[].saved`                             | object or null                                                  | Yes                |                                                |
| `data.conflicts[].saved.value`                       | string or boolean or array of string or array of object or null | Yes                | Alternative 1.                                 |
| `data.conflicts[].saved.value[].object_id`           | string (uuid)                                                   | Yes                | Alternative 1\. Alternative 1\. Alternative 4. |
| `data.conflicts[].saved.value[].record_id`           | string (uuid)                                                   | Yes                | Alternative 1\. Alternative 1\. Alternative 4. |
| `data.conflicts[].attio`                             | object or null                                                  | Yes                |                                                |
| `data.conflicts[].attio.value`                       | string or boolean or array of string or array of object or null | Yes                | Alternative 1.                                 |
| `data.conflicts[].attio.value[].object_id`           | string (uuid)                                                   | Yes                | Alternative 1\. Alternative 1\. Alternative 4. |
| `data.conflicts[].attio.value[].record_id`           | string (uuid)                                                   | Yes                | Alternative 1\. Alternative 1\. Alternative 4. |
| `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, unknown_parameter.                                               |
| `401`       | One of: missing_credential, invalid_credential, credential_expired, credential_revoked.                        |
| `402`       | One of: payment_overdue.                                                                                       |
| `403`       | One of: scope_required, plan_required, not_available, resource_forbidden.                                      |
| `404`       | One of: not_found.                                                                                             |
| `409`       | One of: setup_required, version_conflict, recovery_not_available.                                              |
| `410`       | One of: resource_expired.                                                                                      |
| `413`       | One of: request_too_large.                                                                                     |
| `422`       | One of: attribute_type_locked, budget_exceeded, configuration_in_use, invalid_selection, status_name_reserved. |
| `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.

## Resolve a task's sync

```http
POST /v1/task-management/{task_id}/sync/resolve

```

Repairs a task's sync when the review's next_step is resolve. Send one source (saved or attio) for each value the review lists as choices, keyed by the value's name, with the review's version as expected_version and its fingerprint; send empty choices when it lists none. The task is then sent to Attio again; poll the returned operation to follow it. The versions not chosen are not kept, so this can't be undone. Works only for an API key given Better tasks access in Settings, Integrations & MCP.

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

MCP action: `resolve_task_sync`. Its arguments use the names below, except fields marked REST only. An HTTP header is passed using its argument name in MCP.

### Parameters

| Name               | Send in                   | Required | Type or allowed values | Notes                                   |
| ------------------ | ------------------------- | -------- | ---------------------- | --------------------------------------- |
| `task_id`          | path                      | Yes      | string                 |                                         |
| `expected_version` | JSON body                 | Yes      | string                 |                                         |
| `fingerprint`      | JSON body                 | Yes      | string                 |                                         |
| `choices`          | JSON body                 | Yes      | object                 |                                         |
| `choices.{key}`    | Within the JSON value     | No       | `"saved"`, `"attio"`   | Value for each key in this object.      |
| `confirmed`        | JSON body                 | No       | `true`                 | No longer needed. Accepted and ignored. |
| `request_key`      | Header: `Idempotency-Key` | Yes      | string                 |                                         |

### Response

| HTTP status | Result                                                 |
| ----------- | ------------------------------------------------------ |
| `202`       | The chosen values are saved and on their way to Attio. |

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"`, `"task_create"`, `"task_update"`, `"task_archive"`, `"task_comment_create"`, `"merge_rebuild"`, `"scheduled_batch_transfer"`, `"webhook_endpoint_transfer"`, `"task_import"` | 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"`, `"task_create"`, `"task_update"`, `"task_archive"`, `"task_comment_create"`, `"merge_rebuild"`, `"scheduled_batch_transfer"`, `"webhook_endpoint_transfer"`, `"task_import"`. |
| `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"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `data.operation_type`                                             | `"brevo_list_add"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | Yes                | When data.operation_type is `"brevo_list_add"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `data.action_metadata.list_id`                                    | integer                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | Yes                | When data.operation_type is `"brevo_list_add"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `data.action_metadata.records`                                    | array of object                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Yes                | When data.operation_type is `"brevo_list_add"`. When data.operation_type is `"brevo_email_send"`. When data.operation_type is value. When data.operation_type is value. When data.operation_type is value.                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `data.action_metadata.records[].record_id`                        | string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | Yes                | When data.operation_type is `"brevo_list_add"`. When data.operation_type is `"brevo_email_send"`. When data.operation_type is value. When data.operation_type is value. When data.operation_type is value.                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `data.action_metadata.records[].outcome`                          | `"pending"`, `"added"`, `"skipped"`, `"unconfirmed"`, `"failed"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | Yes                | When data.operation_type is `"brevo_list_add"`. When data.operation_type is value.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `data.action_metadata.records[].reason`                           | `"restricted"`, `"identity_hold"`, `"monitoring_not_current"`, `"no_email"`, `"no_contact"`, `"excluded"`, `"changed"`, `"confirming"`, `"record_not_found"` or null                                                                                                                                                                                                                                                                                                                                                                                                                                                               | Yes                | When data.operation_type is `"brevo_list_add"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `data.action_metadata.records[].addresses`                        | array of object                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Yes                | When data.operation_type is `"brevo_list_add"`. When data.operation_type is `"brevo_email_send"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `data.action_metadata.records[].addresses[].source`               | `"profile"` or object                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | Yes                | When data.operation_type is `"brevo_list_add"`. When data.operation_type is `"brevo_email_send"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `data.action_metadata.records[].addresses[].source.attribute`     | `"email_addresses"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | Yes                | When data.operation_type is `"brevo_list_add"`. When data.operation_type is `"brevo_email_send"`. Alternative 2.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `data.action_metadata.records[].addresses[].source.position`      | integer                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | Yes                | When data.operation_type is `"brevo_list_add"`. When data.operation_type is `"brevo_email_send"`. Alternative 2.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `data.action_metadata.records[].addresses[].outcome`              | `"used"`, `"skipped"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | Yes                | When data.operation_type is `"brevo_list_add"`. When data.operation_type is `"brevo_email_send"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `data.action_metadata.records[].addresses[].reason`               | `"restricted"` or null                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | Yes                | When data.operation_type is `"brevo_list_add"`. When data.operation_type is `"brevo_email_send"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `data.operation_type`                                             | `"brevo_email_send"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | Yes                | When data.operation_type is `"brevo_email_send"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `data.action_metadata.template_id`                                | integer                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | Yes                | When data.operation_type is `"brevo_email_send"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `data.action_metadata.records[].outcome`                          | `"pending"`, `"sent"`, `"skipped"`, `"unconfirmed"`, `"failed"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Yes                | When data.operation_type is `"brevo_email_send"`. When data.operation_type is value.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `data.action_metadata.records[].reason`                           | `"restricted"`, `"identity_hold"`, `"monitoring_not_current"`, `"no_email"`, `"excluded"`, `"recently_sent"`, `"changed"`, `"confirming"`, `"record_not_found"` or null                                                                                                                                                                                                                                                                                                                                                                                                                                                            | Yes                | When data.operation_type is `"brevo_email_send"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `data.operation_type`                                             | value                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | Yes                | When data.operation_type is value. When data.operation_type is value. When data.operation_type is value. When data.operation_type is value.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `data.action_metadata.list_id`                                    | string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | Yes                | When data.operation_type is value. When data.operation_type is value.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `data.action_metadata.records[].reason`                           | `"restricted"`, `"identity_hold"`, `"monitoring_not_current"`, `"no_contact"`, `"excluded"`, `"changed"`, `"record_not_found"` or null                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | Yes                | When data.operation_type is value.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `data.action_metadata.records[].outcome`                          | `"pending"`, `"removed"`, `"skipped"`, `"unconfirmed"`, `"failed"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | Yes                | When data.operation_type is value.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `data.action_metadata.records[].reason`                           | `"not_in_list"`, `"identity_hold"`, `"no_contact"`, `"changed"`, `"record_not_found"` or null                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | Yes                | When data.operation_type is value.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `data.action_metadata.outcome`                                    | `"pending"`, `"unsubscribed"`, `"unconfirmed"`, `"failed"`, `"skipped"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | Yes                | When data.operation_type is value.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `data.action_metadata.reason`                                     | `"no_contact"`, `"changed"` or null                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | Yes                | When data.operation_type is value.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `data.action_metadata.metric`                                     | string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | Yes                | When data.operation_type is value.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `data.action_metadata.properties`                                 | object                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | Yes                | When data.operation_type is value.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `data.action_metadata.properties.{key}`                           | string or number or boolean or null                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | No                 | When data.operation_type is value. Value for each key in this object.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `data.action_metadata.records[].reason`                           | `"restricted"`, `"identity_hold"`, `"monitoring_not_current"`, `"no_contact"`, `"excluded"`, `"recently_sent"`, `"changed"`, `"record_not_found"` or null                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | Yes                | When data.operation_type is value.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |

Accepted work can continue after the request returns. Follow its returned status or operation until it finishes; accepting work does not mean every item succeeded. See [operation status](https://neondeerdata.com/docs/api/operations/).

### 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, plan_required, not_available, resource_forbidden.               |
| `404`       | One of: not_found.                                                                      |
| `409`       | One of: idempotency_conflict, setup_required, version_conflict, recovery_not_available. |
| `410`       | One of: resource_expired.                                                               |
| `413`       | One of: request_too_large.                                                              |
| `422`       | One of: invalid_selection.                                                              |
| `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.

## Link a task to its Attio task

```http
POST /v1/task-management/{task_id}/sync/link

```

Links a task to the Attio task that belongs to it, when the review's next_step is link: Attio didn't confirm creating it. Send the Attio task's id as native_task_id and the review's version as expected_version. The task takes the Attio task's name, due date, assignees, completion and related records, and is then sent to Attio again; poll the returned operation to follow it. What it replaces is not kept, so this can't be undone. Works only for an API key given Better tasks access in Settings, Integrations & MCP.

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

MCP action: `link_task_to_attio_task`. Its arguments use the names below, except fields marked REST only. An HTTP header is passed using its argument name in MCP.

### Parameters

| Name               | Send in                   | Required | Type or allowed values | Notes                                   |
| ------------------ | ------------------------- | -------- | ---------------------- | --------------------------------------- |
| `task_id`          | path                      | Yes      | string                 |                                         |
| `expected_version` | JSON body                 | Yes      | string                 |                                         |
| `native_task_id`   | JSON body                 | Yes      | string (uuid)          |                                         |
| `confirmed`        | JSON body                 | No       | `true`                 | No longer needed. Accepted and ignored. |
| `request_key`      | Header: `Idempotency-Key` | Yes      | string                 |                                         |

### Response

| HTTP status | Result                                      |
| ----------- | ------------------------------------------- |
| `202`       | The task is linked and on its way to Attio. |

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"`, `"task_create"`, `"task_update"`, `"task_archive"`, `"task_comment_create"`, `"merge_rebuild"`, `"scheduled_batch_transfer"`, `"webhook_endpoint_transfer"`, `"task_import"` | 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"`, `"task_create"`, `"task_update"`, `"task_archive"`, `"task_comment_create"`, `"merge_rebuild"`, `"scheduled_batch_transfer"`, `"webhook_endpoint_transfer"`, `"task_import"`. |
| `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"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `data.operation_type`                                             | `"brevo_list_add"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | Yes                | When data.operation_type is `"brevo_list_add"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `data.action_metadata.list_id`                                    | integer                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | Yes                | When data.operation_type is `"brevo_list_add"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `data.action_metadata.records`                                    | array of object                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Yes                | When data.operation_type is `"brevo_list_add"`. When data.operation_type is `"brevo_email_send"`. When data.operation_type is value. When data.operation_type is value. When data.operation_type is value.                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `data.action_metadata.records[].record_id`                        | string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | Yes                | When data.operation_type is `"brevo_list_add"`. When data.operation_type is `"brevo_email_send"`. When data.operation_type is value. When data.operation_type is value. When data.operation_type is value.                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `data.action_metadata.records[].outcome`                          | `"pending"`, `"added"`, `"skipped"`, `"unconfirmed"`, `"failed"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | Yes                | When data.operation_type is `"brevo_list_add"`. When data.operation_type is value.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `data.action_metadata.records[].reason`                           | `"restricted"`, `"identity_hold"`, `"monitoring_not_current"`, `"no_email"`, `"no_contact"`, `"excluded"`, `"changed"`, `"confirming"`, `"record_not_found"` or null                                                                                                                                                                                                                                                                                                                                                                                                                                                               | Yes                | When data.operation_type is `"brevo_list_add"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `data.action_metadata.records[].addresses`                        | array of object                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Yes                | When data.operation_type is `"brevo_list_add"`. When data.operation_type is `"brevo_email_send"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `data.action_metadata.records[].addresses[].source`               | `"profile"` or object                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | Yes                | When data.operation_type is `"brevo_list_add"`. When data.operation_type is `"brevo_email_send"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `data.action_metadata.records[].addresses[].source.attribute`     | `"email_addresses"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | Yes                | When data.operation_type is `"brevo_list_add"`. When data.operation_type is `"brevo_email_send"`. Alternative 2.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `data.action_metadata.records[].addresses[].source.position`      | integer                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | Yes                | When data.operation_type is `"brevo_list_add"`. When data.operation_type is `"brevo_email_send"`. Alternative 2.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `data.action_metadata.records[].addresses[].outcome`              | `"used"`, `"skipped"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | Yes                | When data.operation_type is `"brevo_list_add"`. When data.operation_type is `"brevo_email_send"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `data.action_metadata.records[].addresses[].reason`               | `"restricted"` or null                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | Yes                | When data.operation_type is `"brevo_list_add"`. When data.operation_type is `"brevo_email_send"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `data.operation_type`                                             | `"brevo_email_send"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | Yes                | When data.operation_type is `"brevo_email_send"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `data.action_metadata.template_id`                                | integer                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | Yes                | When data.operation_type is `"brevo_email_send"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `data.action_metadata.records[].outcome`                          | `"pending"`, `"sent"`, `"skipped"`, `"unconfirmed"`, `"failed"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Yes                | When data.operation_type is `"brevo_email_send"`. When data.operation_type is value.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `data.action_metadata.records[].reason`                           | `"restricted"`, `"identity_hold"`, `"monitoring_not_current"`, `"no_email"`, `"excluded"`, `"recently_sent"`, `"changed"`, `"confirming"`, `"record_not_found"` or null                                                                                                                                                                                                                                                                                                                                                                                                                                                            | Yes                | When data.operation_type is `"brevo_email_send"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `data.operation_type`                                             | value                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | Yes                | When data.operation_type is value. When data.operation_type is value. When data.operation_type is value. When data.operation_type is value.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `data.action_metadata.list_id`                                    | string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | Yes                | When data.operation_type is value. When data.operation_type is value.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `data.action_metadata.records[].reason`                           | `"restricted"`, `"identity_hold"`, `"monitoring_not_current"`, `"no_contact"`, `"excluded"`, `"changed"`, `"record_not_found"` or null                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | Yes                | When data.operation_type is value.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `data.action_metadata.records[].outcome`                          | `"pending"`, `"removed"`, `"skipped"`, `"unconfirmed"`, `"failed"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | Yes                | When data.operation_type is value.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `data.action_metadata.records[].reason`                           | `"not_in_list"`, `"identity_hold"`, `"no_contact"`, `"changed"`, `"record_not_found"` or null                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | Yes                | When data.operation_type is value.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `data.action_metadata.outcome`                                    | `"pending"`, `"unsubscribed"`, `"unconfirmed"`, `"failed"`, `"skipped"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | Yes                | When data.operation_type is value.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `data.action_metadata.reason`                                     | `"no_contact"`, `"changed"` or null                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | Yes                | When data.operation_type is value.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `data.action_metadata.metric`                                     | string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | Yes                | When data.operation_type is value.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `data.action_metadata.properties`                                 | object                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | Yes                | When data.operation_type is value.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `data.action_metadata.properties.{key}`                           | string or number or boolean or null                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | No                 | When data.operation_type is value. Value for each key in this object.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `data.action_metadata.records[].reason`                           | `"restricted"`, `"identity_hold"`, `"monitoring_not_current"`, `"no_contact"`, `"excluded"`, `"recently_sent"`, `"changed"`, `"record_not_found"` or null                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | Yes                | When data.operation_type is value.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |

Accepted work can continue after the request returns. Follow its returned status or operation until it finishes; accepting work does not mean every item succeeded. See [operation status](https://neondeerdata.com/docs/api/operations/).

### 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, plan_required, not_available, resource_forbidden.               |
| `404`       | One of: not_found.                                                                      |
| `409`       | One of: idempotency_conflict, setup_required, version_conflict, recovery_not_available. |
| `410`       | One of: resource_expired.                                                               |
| `413`       | One of: request_too_large.                                                              |
| `422`       | One of: invalid_selection.                                                              |
| `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.

## Retry a task's sync

```http
POST /v1/task-management/{task_id}/sync/retry

```

Sends a task to Attio again without changing it, when the review's next_step is retry, for example after the connection or the activity was fixed in Attio. Send the task's version as expected_version. Read the task afterwards to see whether it synced. A task whose sync doesn't need attention is refused and nothing is sent. Works only for an API key given Better tasks access in Settings, Integrations & MCP.

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

MCP action: `retry_task_sync`. Its arguments use the names below, except fields marked REST only. An HTTP header is passed using its argument name in MCP.

### Parameters

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

### Response

| HTTP status | Result                                 |
| ----------- | -------------------------------------- |
| `200`       | The task is on its way to Attio again. |

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"`, `"task_create"`, `"task_update"`, `"task_archive"`, `"task_comment_create"`, `"merge_rebuild"`, `"scheduled_batch_transfer"`, `"webhook_endpoint_transfer"`, `"task_import"` | 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"`, `"task_create"`, `"task_update"`, `"task_archive"`, `"task_comment_create"`, `"merge_rebuild"`, `"scheduled_batch_transfer"`, `"webhook_endpoint_transfer"`, `"task_import"`. |
| `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"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `data.operation_type`                                             | `"brevo_list_add"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | Yes                | When data.operation_type is `"brevo_list_add"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `data.action_metadata.list_id`                                    | integer                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | Yes                | When data.operation_type is `"brevo_list_add"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `data.action_metadata.records`                                    | array of object                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Yes                | When data.operation_type is `"brevo_list_add"`. When data.operation_type is `"brevo_email_send"`. When data.operation_type is value. When data.operation_type is value. When data.operation_type is value.                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `data.action_metadata.records[].record_id`                        | string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | Yes                | When data.operation_type is `"brevo_list_add"`. When data.operation_type is `"brevo_email_send"`. When data.operation_type is value. When data.operation_type is value. When data.operation_type is value.                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `data.action_metadata.records[].outcome`                          | `"pending"`, `"added"`, `"skipped"`, `"unconfirmed"`, `"failed"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | Yes                | When data.operation_type is `"brevo_list_add"`. When data.operation_type is value.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `data.action_metadata.records[].reason`                           | `"restricted"`, `"identity_hold"`, `"monitoring_not_current"`, `"no_email"`, `"no_contact"`, `"excluded"`, `"changed"`, `"confirming"`, `"record_not_found"` or null                                                                                                                                                                                                                                                                                                                                                                                                                                                               | Yes                | When data.operation_type is `"brevo_list_add"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `data.action_metadata.records[].addresses`                        | array of object                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Yes                | When data.operation_type is `"brevo_list_add"`. When data.operation_type is `"brevo_email_send"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `data.action_metadata.records[].addresses[].source`               | `"profile"` or object                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | Yes                | When data.operation_type is `"brevo_list_add"`. When data.operation_type is `"brevo_email_send"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `data.action_metadata.records[].addresses[].source.attribute`     | `"email_addresses"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | Yes                | When data.operation_type is `"brevo_list_add"`. When data.operation_type is `"brevo_email_send"`. Alternative 2.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `data.action_metadata.records[].addresses[].source.position`      | integer                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | Yes                | When data.operation_type is `"brevo_list_add"`. When data.operation_type is `"brevo_email_send"`. Alternative 2.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `data.action_metadata.records[].addresses[].outcome`              | `"used"`, `"skipped"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | Yes                | When data.operation_type is `"brevo_list_add"`. When data.operation_type is `"brevo_email_send"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `data.action_metadata.records[].addresses[].reason`               | `"restricted"` or null                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | Yes                | When data.operation_type is `"brevo_list_add"`. When data.operation_type is `"brevo_email_send"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `data.operation_type`                                             | `"brevo_email_send"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | Yes                | When data.operation_type is `"brevo_email_send"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `data.action_metadata.template_id`                                | integer                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | Yes                | When data.operation_type is `"brevo_email_send"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `data.action_metadata.records[].outcome`                          | `"pending"`, `"sent"`, `"skipped"`, `"unconfirmed"`, `"failed"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Yes                | When data.operation_type is `"brevo_email_send"`. When data.operation_type is value.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `data.action_metadata.records[].reason`                           | `"restricted"`, `"identity_hold"`, `"monitoring_not_current"`, `"no_email"`, `"excluded"`, `"recently_sent"`, `"changed"`, `"confirming"`, `"record_not_found"` or null                                                                                                                                                                                                                                                                                                                                                                                                                                                            | Yes                | When data.operation_type is `"brevo_email_send"`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `data.operation_type`                                             | value                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | Yes                | When data.operation_type is value. When data.operation_type is value. When data.operation_type is value. When data.operation_type is value.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `data.action_metadata.list_id`                                    | string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | Yes                | When data.operation_type is value. When data.operation_type is value.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `data.action_metadata.records[].reason`                           | `"restricted"`, `"identity_hold"`, `"monitoring_not_current"`, `"no_contact"`, `"excluded"`, `"changed"`, `"record_not_found"` or null                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | Yes                | When data.operation_type is value.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `data.action_metadata.records[].outcome`                          | `"pending"`, `"removed"`, `"skipped"`, `"unconfirmed"`, `"failed"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | Yes                | When data.operation_type is value.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `data.action_metadata.records[].reason`                           | `"not_in_list"`, `"identity_hold"`, `"no_contact"`, `"changed"`, `"record_not_found"` or null                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | Yes                | When data.operation_type is value.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `data.action_metadata.outcome`                                    | `"pending"`, `"unsubscribed"`, `"unconfirmed"`, `"failed"`, `"skipped"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | Yes                | When data.operation_type is value.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `data.action_metadata.reason`                                     | `"no_contact"`, `"changed"` or null                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | Yes                | When data.operation_type is value.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `data.action_metadata.metric`                                     | string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | Yes                | When data.operation_type is value.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `data.action_metadata.properties`                                 | object                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | Yes                | When data.operation_type is value.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `data.action_metadata.properties.{key}`                           | string or number or boolean or null                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | No                 | When data.operation_type is value. Value for each key in this object.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `data.action_metadata.records[].reason`                           | `"restricted"`, `"identity_hold"`, `"monitoring_not_current"`, `"no_contact"`, `"excluded"`, `"recently_sent"`, `"changed"`, `"record_not_found"` or null                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | Yes                | When data.operation_type is value.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |

### 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, plan_required, not_available, resource_forbidden.               |
| `404`       | One of: not_found.                                                                      |
| `409`       | One of: idempotency_conflict, setup_required, version_conflict, recovery_not_available. |
| `410`       | One of: resource_expired.                                                               |
| `413`       | One of: request_too_large.                                                              |
| `422`       | One of: invalid_selection.                                                              |
| `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.
