---
title: "Post Sync States"
method: POST
path: "/api/linkedin-poc/sync-states"
tags: ["LinkedInPoC"]
---

# Post Sync States

`POST /api/linkedin-poc/sync-states`

Poll every transport for lead states and update connection_state in the DB.

For each lead whose connection was accepted or lost since the last sync,
the ``outreach_linkedin_sent`` row is updated.  Returns the full list of
state transitions seen, plus a convenience ``accepted_count`` of rows
that changed to 'accepted'.

## Cookies

- `ex_access` string, nullable
- `ex_org` string, nullable

## Response `200`

Successful Response

- SyncStatesResponse
  - `results` SyncStatesResultRow[], required
    - `provider_lead_ref` string, required
    - `account_ref` string, required
    - `connection_state` string, required
    - `changed` boolean, required
  - `accepted_count` integer, required

## Other responses

- `422` — Validation Error

---

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