---
title: "Update accounting intelligence settings"
method: PATCH
path: "/v2/accounting/intelligence"
---

# Update accounting intelligence settings

`PATCH /v2/accounting/intelligence`

## Request

- Base URL: `https://api.slash.com`
- URL: `https://api.slash.com/v2/accounting/intelligence`
- Auth: API key in header `X-API-Key`

Turn the accounting intelligence agent on or off, or choose which dimensions it codes. Changes apply to entries coded from now on.

## Request body

- AccountingIntelligenceSettingsUpdate: Change how the accounting intelligence agent auto-codes a connection. Provide `mode`, `enabledDimensionKeys`, or both; omitted fields keep their current value.
  - `connectionId` string: The connection to update. Optional when the legal entity has exactly one connection; required when it has several.
  - `mode` 'disabled' | 'all_fields' | 'selected_fields': `disabled` stops auto-coding, `all_fields` codes every supported dimension, `selected_fields` codes only `enabledDimensionKeys`.
  - `enabledDimensionKeys` string[]: The dimensions to auto-code when the resulting `mode` is `selected_fields`, where at least one key is required; each key must be in `supportedDimensionKeys`. With any other mode, send an empty list or exactly what `GET` reports for that mode (every supported key for `all_fields`, none for `disabled`), so the settings object can be sent back as read. The selection is kept only while the mode is `selected_fields`, so switching back to it needs the keys again.

## Response `200`

The settings as stored.

- AccountingIntelligenceSettings: How the accounting intelligence agent auto-codes a connection's entries. The agent reads a transaction's merchant, card and history, proposes a value for each enabled dimension and writes it as an `ai` mapping, so its work shows up in `GET /v2/accounting/mappings` and can be corrected there.
  - `connectionId` string, required
  - `mode` 'disabled' | 'all_fields' | 'selected_fields', required: `disabled` never auto-codes. `all_fields` auto-codes every dimension in `supportedDimensionKeys`. `selected_fields` auto-codes only the dimensions chosen in `enabledDimensionKeys`.
  - `enabledDimensionKeys` string[], required: The dimensions the agent codes under the current mode: empty when `disabled`, every supported key when `all_fields`, the chosen keys when `selected_fields`.
  - `supportedDimensionKeys` string[], required: The dimensions the agent can code on this platform.

## Other responses

- `400`: - `connection_id_required` — The legal entity has several accounting connections, so the request must say which one with `connectionId`. List them with `GET /v2/accounting/connections`. - `dimension_not_auto_codable` — The accounting intelligence agent can only code the dimensions in `supportedDimensionKeys`. - `enabled_dimension_keys_not_applicable` — `enabledDimensionKeys` picks the dimensions for `selected_fields`. With `all_fields` or `disabled`, leave it out, send it empty, or send back the list the settings already report. - `enabled_dimension_keys_required` — The selection is only kept while the mode is `selected_fields`, so switching to it needs the keys again. - `invalid_request (request shape)` — The body, query, or headers failed validation, or a required header is missing. `details` has one entry per failing location, keyed by JSON pointer or header name.
- `401`: - `unauthorized` — API key authentication is missing or invalid.
- `403`: - `forbidden` — The credential is not permitted to perform this action on the resource. When the resource is a field of the request, `details` names that `field` and the `id` it received. - `forbidden (legal entity)` — The credential is not permitted to act for the selected legal entity. - `not_available` — Public API v2 is not yet available. Use [Public API v1](https://docs.slash.com/introduction) in the meantime. - `user_api_key_required` — The API key is scoped to a legal entity rather than a user. Every v2 request needs a user API key, created under Settings → API keys in the Slash dashboard, together with the `x-legal-entity` header.
- `404`: - `not_found` — No resource matches the identifier. When the identifier is a field of the request, `details` names that `field` and the `id` it received.
- `429`: The request exceeded the applicable rate limit. The response body is plain text, not the error object; clients must not depend on its wording.
- `500`: - `internal` — Slash could not complete the request. Quote `referenceId` when contacting Slash support.

## Changes

- **2026-10-16** `8b5d371ffeea`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/slashfi/apis/slash-public-api/changes/v2/accounting/intelligence/patch.md)

---

[API](https://skmtc.dev/slashfi/apis/slash-public-api.md) - [All operations](https://skmtc.dev/slashfi/apis/slash-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/slashfi/apis/slash-public-api/revisions/eaed2d63c9e2?raw)
