---
title: "Resolve sync issues"
method: POST
path: "/v1/workspaces/{workspace_id}/issues/action"
tags: ["Sync issues"]
---

# Resolve sync issues

`POST /v1/workspaces/{workspace_id}/issues/action`

## Request

- Base URL: `https://api.stacksync.com`
- URL: `https://api.stacksync.com/v1/workspaces/{workspace_id}/issues/action`
- Auth: HTTP bearer

Retry, revert or ignore issues: the ones listed by id, or with `all_issues: true` every issue of a sync or of one of its tables. Retrying writes the change again; reverting restores the record from the destination app; ignoring closes the issue.

## Path parameters

- `workspace_id` integer, required

## Query parameters

- `region` 'besg' | 'usnv', required

## Request body

- union: The issues to act on: listed by id, or all the issues of a sync
  - ResolveListedSyncIssuesBody: Act on the issues listed by id
    - `ids` string[], required: The issues, every id must exist in the workspace
    - `action` 'retry' | 'ignore' | 'revert', required: `retry` writes the change again, `revert` restores the record from the destination app, `ignore` closes the issue
  - ResolveAllSyncIssuesBody: Act on every issue of a sync, or of one of its tables (`ids` must not be sent)
    - `all_issues` true, required: True
    - `base_id` string, uuid, required: The sync, in the region of the request
    - `table_id` string: Only the issues of this table pair (its `table_mapping_id`); every table when left out
    - `action` 'retry' | 'ignore' | 'revert', required: `retry` writes the change again, `revert` restores the record from the destination app, `ignore` closes the issue

## Response `200`

What the action did

- ResolvedSyncIssuesResponse: What the action did
  - `data` ResolvedSyncIssues, required: What the action did
    - `ids` string[], required: The issues acted on; empty for `all_issues`
    - `success_issue_count` integer, required: Issues resolved
    - `failed_issue_count` integer, required: Issues that could not be resolved
    - `error_list` object[], required: Why each failed issue failed

## Other responses

- `400`: The `region` is missing or not one of besg, usnv; the body is not valid JSON; `ids` is missing, empty or holds a non-UUID, `action` is not retry, ignore or revert, `all_issues` is sent with `ids` or without a UUID `base_id` (`Invalid Request Body`); an id names no issue of the workspace (`Invalid error ids.`, the message lists them); the issues of the sync could not be read (`Error retrieving issues`)
- `403`: Forbidden: invalid API key, API key of another workspace, insufficient scope, workspace unavailable, or a non-GET request without `Content-Type: application/json`
- `404`: The workspace has no sync with issues to act on (`issues not found`), or `base_id` of `all_issues` is not a sync of the workspace in this region (`Base not found`)

---

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