---
title: "Trigger initial sync"
---

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

Path: Sureshake API › reporter

`POST /v2/reporter/accounting-connections/initial-sync`

## Request body

_Required._

- `entityId` (`reporter-accounting-connections-trigger-initial-sync.entityId`; string, required)
  - format `uuid`
- `providerId` (`reporter-accounting-connections-trigger-initial-sync.providerId`; string, required)
  - minLength 1; maxLength 80; pattern `^[a-z0-9][a-z0-9_-]*$`

## Example request

```json
{
  "entityId": "156e622c-6cdf-4c27-9bc9-2f2db69919f5",
  "providerId": "string"
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url https://api.sureshake.com/v2/reporter/accounting-connections/initial-sync \
  --header 'Content-Type: application/json' \
  --data '
{
  "entityId": "156e622c-6cdf-4c27-9bc9-2f2db69919f5",
  "providerId": "string"
}
'
```

### TypeScript

```typescript
const url = 'https://api.sureshake.com/v2/reporter/accounting-connections/initial-sync';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({entityId: '156e622c-6cdf-4c27-9bc9-2f2db69919f5', providerId: 'string'})
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.sureshake.com/v2/reporter/accounting-connections/initial-sync"

payload = {
    "entityId": "156e622c-6cdf-4c27-9bc9-2f2db69919f5",
    "providerId": "string"
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

Default Response

#### Example

```json
{
  "data": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "entityId": "156e622c-6cdf-4c27-9bc9-2f2db69919f5",
    "providerId": "string",
    "onboardingSessionId": "fd7cc202-1af5-4ce8-b709-66e287ca51fb",
    "connectedAccountId": "ac03972a-5ca5-43c5-b96f-c519ac843b7a",
    "status": "not_started",
    "reportingCadence": "monthly",
    "requiredScopes": [],
    "grantedScopes": [],
    "hasCredentialRefs": true,
    "blocksReportReadiness": true,
    "readinessFactorKeys": [
      "accounting_connection"
    ],
    "readinessMilestones": [
      "accounting_authorization_started"
    ],
    "failureCode": "string",
    "failurePublicMessage": "string",
    "retryGuidance": "string",
    "selectedAt": "2019-08-24T14:15:22Z",
    "authorizationStartedAt": "2019-08-24T14:15:22Z",
    "connectedAt": "2019-08-24T14:15:22Z",
    "syncStartedAt": "2019-08-24T14:15:22Z",
    "syncedAt": "2019-08-24T14:15:22Z",
    "failedAt": "2019-08-24T14:15:22Z",
    "revokedAt": "2019-08-24T14:15:22Z",
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z"
  },
  "meta": {
    "timestamp": "2019-08-24T14:15:22Z"
  }
}
```

- `data` (`reporter-accounting-connections-trigger-initial-sync.response.200.data`; object, required)
  - `id` (`reporter-accounting-connections-trigger-initial-sync.response.200.data.id`; string, required)
    - format `uuid`
  - `entityId` (`reporter-accounting-connections-trigger-initial-sync.response.200.data.entityId`; string, required)
    - format `uuid`
  - `providerId` (`reporter-accounting-connections-trigger-initial-sync.response.200.data.providerId`; string, required)
    - minLength 1; maxLength 80; pattern `^[a-z0-9][a-z0-9_-]*$`
  - `onboardingSessionId` (`reporter-accounting-connections-trigger-initial-sync.response.200.data.onboardingSessionId`; string, required, nullable)
    - format `uuid`
  - `connectedAccountId` (`reporter-accounting-connections-trigger-initial-sync.response.200.data.connectedAccountId`; string, required, nullable)
    - format `uuid`
  - `status` (`reporter-accounting-connections-trigger-initial-sync.response.200.data.status`; string, required)
    - one of `"not_started"`, `"selected"`, `"authorizing"`, `"connected"`, `"syncing"`, `"synced"`, `"failed"`, `"revoked"`
  - `reportingCadence` (`reporter-accounting-connections-trigger-initial-sync.response.200.data.reportingCadence`; string, required, nullable)
    - one of `"monthly"`, `"quarterly"`, `"annual"`
  - `hasCredentialRefs` (`reporter-accounting-connections-trigger-initial-sync.response.200.data.hasCredentialRefs`; boolean, required)
  - `blocksReportReadiness` (`reporter-accounting-connections-trigger-initial-sync.response.200.data.blocksReportReadiness`; boolean, required)
  - `readinessFactorKeys` (`reporter-accounting-connections-trigger-initial-sync.response.200.data.readinessFactorKeys`; array<string>, required)
    - one of `"accounting_connection"`, `"initial_sync"`
  - `readinessMilestones` (`reporter-accounting-connections-trigger-initial-sync.response.200.data.readinessMilestones`; array<string>, required)
    - one of `"accounting_authorization_started"`, `"accounting_connected"`, `"initial_sync_started"`, `"initial_sync_completed"`
  - `failureCode` (`reporter-accounting-connections-trigger-initial-sync.response.200.data.failureCode`; string, required, nullable)
    - minLength 1; maxLength 120
  - `failurePublicMessage` (`reporter-accounting-connections-trigger-initial-sync.response.200.data.failurePublicMessage`; string, required, nullable)
    - minLength 1; maxLength 500
  - `retryGuidance` (`reporter-accounting-connections-trigger-initial-sync.response.200.data.retryGuidance`; string, required, nullable)
    - minLength 1; maxLength 500
  - `selectedAt` (`reporter-accounting-connections-trigger-initial-sync.response.200.data.selectedAt`; string, required, nullable)
    - format `date-time`
  - `authorizationStartedAt` (`reporter-accounting-connections-trigger-initial-sync.response.200.data.authorizationStartedAt`; string, required, nullable)
    - format `date-time`
  - `connectedAt` (`reporter-accounting-connections-trigger-initial-sync.response.200.data.connectedAt`; string, required, nullable)
    - format `date-time`
  - `syncStartedAt` (`reporter-accounting-connections-trigger-initial-sync.response.200.data.syncStartedAt`; string, required, nullable)
    - format `date-time`
  - `syncedAt` (`reporter-accounting-connections-trigger-initial-sync.response.200.data.syncedAt`; string, required, nullable)
    - format `date-time`
  - `failedAt` (`reporter-accounting-connections-trigger-initial-sync.response.200.data.failedAt`; string, required, nullable)
    - format `date-time`
  - `revokedAt` (`reporter-accounting-connections-trigger-initial-sync.response.200.data.revokedAt`; string, required, nullable)
    - format `date-time`
  - `createdAt` (`reporter-accounting-connections-trigger-initial-sync.response.200.data.createdAt`; string, required)
    - format `date-time`
  - `updatedAt` (`reporter-accounting-connections-trigger-initial-sync.response.200.data.updatedAt`; string, required)
    - format `date-time`
  - `requiredScopes` (`reporter-accounting-connections-trigger-initial-sync.response.200.data.requiredScopes`; array<string>, optional)
    - minLength 1; default `[]`
  - `grantedScopes` (`reporter-accounting-connections-trigger-initial-sync.response.200.data.grantedScopes`; array<string>, optional)
    - minLength 1; default `[]`
- `meta` (`reporter-accounting-connections-trigger-initial-sync.response.200.meta`; object, optional)
  - `timestamp` (`reporter-accounting-connections-trigger-initial-sync.response.200.meta.timestamp`; string, required)
    - format `date-time`

### 400

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`reporter-accounting-connections-trigger-initial-sync.response.400.error`; object, required)
  - `code` (`reporter-accounting-connections-trigger-initial-sync.response.400.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`reporter-accounting-connections-trigger-initial-sync.response.400.error.message`; string, required) — Human-readable error message
  - `details` (`reporter-accounting-connections-trigger-initial-sync.response.400.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`reporter-accounting-connections-trigger-initial-sync.response.400.error.traceId`; string, optional) — Unique ID for log correlation

### 401

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`reporter-accounting-connections-trigger-initial-sync.response.401.error`; object, required)
  - `code` (`reporter-accounting-connections-trigger-initial-sync.response.401.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`reporter-accounting-connections-trigger-initial-sync.response.401.error.message`; string, required) — Human-readable error message
  - `details` (`reporter-accounting-connections-trigger-initial-sync.response.401.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`reporter-accounting-connections-trigger-initial-sync.response.401.error.traceId`; string, optional) — Unique ID for log correlation

### 403

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`reporter-accounting-connections-trigger-initial-sync.response.403.error`; object, required)
  - `code` (`reporter-accounting-connections-trigger-initial-sync.response.403.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`reporter-accounting-connections-trigger-initial-sync.response.403.error.message`; string, required) — Human-readable error message
  - `details` (`reporter-accounting-connections-trigger-initial-sync.response.403.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`reporter-accounting-connections-trigger-initial-sync.response.403.error.traceId`; string, optional) — Unique ID for log correlation

### 409

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`reporter-accounting-connections-trigger-initial-sync.response.409.error`; object, required)
  - `code` (`reporter-accounting-connections-trigger-initial-sync.response.409.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`reporter-accounting-connections-trigger-initial-sync.response.409.error.message`; string, required) — Human-readable error message
  - `details` (`reporter-accounting-connections-trigger-initial-sync.response.409.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`reporter-accounting-connections-trigger-initial-sync.response.409.error.traceId`; string, optional) — Unique ID for log correlation

### 500

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`reporter-accounting-connections-trigger-initial-sync.response.500.error`; object, required)
  - `code` (`reporter-accounting-connections-trigger-initial-sync.response.500.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`reporter-accounting-connections-trigger-initial-sync.response.500.error.message`; string, required) — Human-readable error message
  - `details` (`reporter-accounting-connections-trigger-initial-sync.response.500.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`reporter-accounting-connections-trigger-initial-sync.response.500.error.traceId`; string, optional) — Unique ID for log correlation


Source: https://docs.sureshake.com/reference/reporter-accounting-connections-trigger-initial-sync/index.md
