---
title: "Run sync job next"
method: POST
path: "/api/v1/edit/syncjob/run_next"
tags: ["Sync jobs"]
---

# Run sync job next

`POST /api/v1/edit/syncjob/run_next`

## Request

- Base URL: `/` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/v1/edit/syncjob/run_next`
- Auth: API key in header `X-API-Key`

Admin only. Moves the given jobs to the front of the queue: `prio` is set above the current maximum and `last_run` is cleared, so the runner picks them next. Jobs that are currently running are rejected with `imapsync_job_running` (one message per job), the others are moved. The jobs are locked while they are moved, so a job the runner claims at the same time is reported as running instead of being counted.

## Request body

- object
  - `items` string[]: list of sync job ids
  - `attr` object: unused, send an empty object

## Response `200`

OK

- object
  - `log` unknown[]: contains request object (secrets are masked as "*")
    - unknown
  - `msg` unknown[]
    - unknown
  - `type` 'success' | 'danger' | 'error'

## Other responses

- `401`: Unauthorized

## Changes

- **2026-10-22** `cf82ac1f801a`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/mailcow/apis/mailcow-api/changes/api/v1/edit/syncjob/run_next/post.md)

---

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