---
title: "Queue a bounded inbox sync"
description: "PubNio API inbox.sync.start: queue a bounded inbox sync. Request fields, examples in five clients, errors, and idempotency."
---

> Documentation Index
> Fetch the complete documentation index at: https://pubnio.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Queue a bounded inbox sync

Queue a bounded inbox sync with [`POST /api/v1/inbox/sync`](https://pubnio.com/api/v1/docs#tag/inbox/POST/api/v1/inbox/sync). Requires an API key with the `read` scope or a signed-in workspace member.

## Request

Moves an inbox cursor due now and returns 202 with a shared sync run ID. No provider call happens during the request.

| Body field    | Type | Required |
| ------------- | ---- | -------- |
| `workspaceId` | UUID | Yes      |
| `accountId`   | UUID | No       |

## Response

- HTTP 202: `InboxSyncAccepted` with `syncRunId`, `status`.
  - `status`: `queued`, `running`, `succeeded`, `partial`, `failed`, `cancelled`

The [OpenAPI document](https://pubnio.com/api/v1/openapi) has each field's type.

## Examples

### TypeScript

```ts
const accepted = await workspace.inbox.startSync(accountId);
```

### Python

```python
accepted = workspace.inbox.start_sync(account_id=account_id)
```

### cURL

```sh
curl -X POST "https://pubnio.com/api/v1/inbox/sync" \
  -H "Authorization: Bearer $PUBNIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"workspaceId":"'"$WORKSPACE_ID"'","accountId":"'"$ACCOUNT_ID"'"}'
```

### CLI

```sh
pnio inbox sync start --workspace-id "$WORKSPACE_ID" --account-id "$ACCOUNT_ID"
```

### MCP execute

```js
async () => {
  const accountId = "<accountId>";
  const response = await codemode.request({
    method: "POST",
    path: "/api/v1/inbox/sync",
    body: { workspaceId: codemode.workspaceId, accountId: accountId },
  });
  return response.data;
};
```

## Errors

It declares no problem of its own.

It declares the problems [every Inbox operation](https://pubnio.com/docs/reference/#inbox) and [most operations](https://pubnio.com/docs/reference/#shared-problems) declare.

## Idempotency

No key, so a retried `POST` is not deduplicated. Read the current state before you retry.

## Limits

- Field lengths and ranges are in the [OpenAPI document](https://pubnio.com/api/v1/openapi).

## Related

- [Inbox operations](https://pubnio.com/docs/reference/#inbox)

Source: https://pubnio.com/docs/reference/inbox-sync-start/index.mdx
