---
title: "Run a sync now"
method: POST
path: "/syncs/{id}/run"
tags: ["Syncs"]
---

# Run a sync now

`POST /syncs/{id}/run`

## Request

- Base URL: `https://api.parley.so/v1`
- URL: `https://api.parley.so/v1/syncs/{id}/run`
- Auth: HTTP bearer

Bring a synced folder up to date now instead of waiting for its next run. Returns the sync as soon as the run is queued. Returns 409 SYNC_NOT_RUNNABLE when the sync can't run, and details.reason says why.

## Path parameters

- `id` string, required: The sync ID.

## Response `200`

OK

- object
  - `id` string, required: The sync ID.
  - `location` union, required: Whose files these are: a project's, an account's, a contact's, or an intake's, or the organization's Library.
    - RecordRef: A reference to a project, account, or contact.
      - `type` 'project' | 'account' | 'contact', required: The kind of record: project, account, or contact.
      - `id` string, required: Its ID.
      - `name` string, required: The record's name. A contact's is its first and last name, or an email address when it has no name.
    - object: The intake's type, ID, and name.
      - `type` 'intake', required
      - `id` string, required: Its ID.
      - `name` string, required: The intake title.
    - object: The organization's shared Library.
      - `type` 'library', required
  - `folder` object, nullable, required: The folder's type, ID, and name.
    - `type` 'folder', required
    - `id` string, required: Its ID.
    - `name` string, required: The folder name.
  - `rootFolder` object, nullable, required: The folder's type, ID, and name.
    - `type` 'folder', required
    - `id` string, required: Its ID.
    - `name` string, required: The folder name.
  - `source` object, required
    - `provider` 'google_drive' | 'microsoft' | 'dropbox' | 'box' | 'clio' | 'egnyte', required: Where the synced folder lives: Google Drive, Microsoft (OneDrive or SharePoint), Dropbox, Box, Clio, or Egnyte.
    - `folderId` string, required: The synced folder's ID at the provider.
    - `driveId` string, nullable, required: For Microsoft, the ID of the drive the folder is in, which identifies the folder together with folderId. null for every other provider.
    - `name` string, nullable, required: The folder's name at the provider, or null when Parley hasn't read it.
  - `status` 'pending' | 'active' | 'interrupted' | 'failed', required: pending: created, and its first run hasn't finished. active: syncing. interrupted: a run hit a problem Parley is resolving on its own. failed: it stopped syncing; delete it and sync the folder again.
  - `reconnectRequired` boolean, required: true when the connection the sync reads through stopped working. The sync doesn't run until the person who owns that connection reconnects it.
  - `lastSyncedAt` string, date-time, nullable, required: When a run last finished, or null before the first.
  - `createdAt` string, date-time, required: When the sync was created.
  - `updatedAt` string, date-time, required: When the sync last changed, including its status.

## Other responses

- `400`: The request was invalid. VALIDATION_FAILED.
- `401`: Missing or invalid credentials. UNAUTHORIZED.
- `403`: You don't have permission. FORBIDDEN.
- `404`: Not found. NOT_FOUND.
- `409`: The request conflicts with the current state. SYNC_NOT_RUNNABLE.
- `429`: Too many requests, or a usage limit was reached. TOO_MANY_REQUESTS.

---

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