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

# Save (/v1/connections/sync)

> Credentials tested and immutable connection revision saved

### Request body

`ConnectionInput`

**api\_key** `string` *required*

Tenant-scoped API key issued by StateSet Sync, never a platform admin key.

**environment** `string` *required*

**sync\_tenant\_id** `string` *required*

**webhook\_secret** `string` *required*

HMAC secret configured for this tenant on StateSet Sync.

### Response

No response body. Credentials tested and immutable connection revision saved.

### Status codes

| Code | Meaning |
| - | - |
| `200` | Credentials tested and immutable connection revision saved |
| `400` | Connection test rejected |
| `403` | Organization administrator required |

### Using this contract

Read the [source OpenAPI document](/spec/edi.json) for declared schemas and alternatives.
This page also includes documented corrections from the [spec overlays](https://github.com/stateset/docs/tree/main/spec/overlays).
Example IDs and values are illustrative; replace them with records from your workspace.

```bash cURL theme={null}
curl --silent --show-error --fail-with-body --request POST \
  --url 'https://api.edi.stateset.com/v1/connections/sync' \
  --header "Authorization: Bearer $EDI_API_TOKEN" \
  --header 'Content-Type: application/json' \
  --data '{
  "api_key": "YOUR_API_KEY",
  "environment": "string",
  "sync_tenant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "webhook_secret": "YOUR_API_KEY"
}'
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.