# Sync seats against the directory

Applies the workspace's provisioning setting for one provider in a single sweep: invites everyone the directory holds who has no seat here (only when auto-invite is on - otherwise `note` says how many were found and skipped), and removes the seat of everyone the directory has suspended. Idempotent; running it twice invites nobody new. Reach for it after people join or leave the company.

Access class: `workspace:admin`.

## Endpoint

`POST /v1/workspace/directory/sync`

## Request body

Content type: `application/json`.

```json
{
  "body": {
    "provider": "string"
  },
  "params": {},
  "query": {
    "provider": "string"
  }
}
```

## Responses

### 201

the action's answer

Content type: `application/json`.

```json
{}
```

### default

a refusal: `{"error": "<what a person needs to read>"}`. 401 no credential, 402 the plan does not include this, 403 the seat does not, 404 the thing does not exist or is not yours to see.

Content type: `application/json`.

```json
{
  "error": "string"
}
```
