---
title: "Trigger Account Sweep"
method: POST
path: "/v2/ap-portals/accounts/{account_id}/sweep"
tags: ["ap-portals"]
---

# Trigger Account Sweep

`POST /v2/ap-portals/accounts/{account_id}/sweep`

## Request

- Base URL: `https://api.stuut.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.stuut.ai/v2/ap-portals/accounts/{account_id}/sweep`
- Auth: HTTP bearer

Sync now

Trigger an on-demand sweep for an AP-portal login. Enqueues the durable sweep workflow
(deduplicated per account) and returns immediately. Omit the body for a list-only sweep;
use DETAIL for full enrichment.

## Path parameters

- `account_id` string, required

## Request body

- TriggerSweepRequest: Options for an on-demand sweep.
  - `mode` 'list' | 'detail': The document traversal performed by a sweep.
  - `lookback_days` integer, nullable: How many days back the list search should reach, for providers with a windowed list view (Taulia, Ariba). Omit to let Taulia use its incremental refresh window and other providers use their defaults.

## Response `202`

Successful Response

- TriggerSweepResponse: Acknowledges an enqueued on-demand sweep; the work runs asynchronously.
  - `work_id` string, required
  - `status` 'pending' | 'running' | 'failed' | 'done', required: Status of a ap portal work queue entry

## Other responses

- `422`: Validation Error

---

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