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

# Update sync job

`POST /api/v1/edit/syncjob`

You can update one or more sync jobs per request. You can also send just attributes you want to change.

## Request body

- object
  - `attr` object
    - `active` boolean — Is sync job active
    - `automap` boolean — Try to automap folders ("Sent items", "Sent" => "Sent" etc.)
    - `custom_params` string — Custom parameters passed to imapsync command
    - `delete1` boolean — Delete from source when completed
    - `delete2` boolean — Delete messages on destination that are not on source
    - `delete2duplicates` boolean — Delete duplicates on destination
    - `enc1` 'TLS' | 'SSL' | 'PLAIN' — Encryption
    - `exclude` string — Exclude objects (regex)
    - `host1` string — Hostname
    - `maxage` number — Maximum age of messages in days that will be polled from remote (0 = ignore age)
    - `maxbytespersecond` number — Max. bytes per second (0 = unlimited)
    - `mins_interval` number — Interval (min)
    - `password1` string — Password
    - `port1` string — Port
    - `skipcrossduplicates` boolean — Skip duplicate messages across folders (first come, first serve)
    - `subfolder2` string — Sync into subfolder on destination (empty = do not use subfolder)
    - `subscribeall` boolean — Subscribe all folders
    - `timeout1` number — Timeout for connection to remote host
    - `timeout2` number — Timeout for connection to local host
    - `user1` string — Username
  - `items` object — contains list of aliases you want update

## Response `200`

OK

- object
  - `log` unknown[] — contains request object
    - unknown
  - `msg` unknown[]
    - unknown
  - `type` 'success' | 'danger' | 'error'

## Other responses

- `401` — Unauthorized

---

[API](https://skmtc.dev/mailcow/apis/mailcow-api.md) · [All operations](https://skmtc.dev/mailcow/apis/mailcow-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/mailcow/mailcow-api/revisions/ae01d1d7886a/schema)
