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

# Trigger Sync

> Forces an edge cache refresh for an environment.

The edge cache is updated automatically on every flag config change. Use this endpoint to force a refresh if evaluations are serving stale data.

## Path parameters

<ParamField path="projectId" type="string" required />

<ParamField path="envId" type="string" required />

<RequestExample>
  ```bash theme={null}
  curl -X POST https://nest.feather.mupeni.dev/v1/projects/proj_01hx.../environments/env_01hx.../sync \
    -H "Authorization: Bearer <server_key>"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "environmentId": "env_01hx...",
    "flagCount": 12,
    "syncedAt": "2024-04-11T10:00:00.000Z"
  }
  ```

  ```json 207 theme={null}
  {
    "environmentId": "env_01hx...",
    "flagCount": 12,
    "syncedAt": "2024-04-11T10:00:00.000Z",
    "syncWarning": "Edge cache sync failed: service unavailable."
  }
  ```
</ResponseExample>
