---
title: "Create a directory connection"
method: POST
path: "/api/v1/dsync"
tags: ["Directory Sync"]
---

# Create a directory connection

`POST /api/v1/dsync`

## Request body

- object
  - `tenant` string, required — Tenant
  - `product` string, required — Product
  - `name` string — Name
  - `webhook_url` string — Webhook URL
  - `webhook_secret` string — Webhook secret
  - `type` string — Directory provider. (Supported values are azure-scim-v2, onelogin-scim-v2, okta-scim-v2, jumpcloud-scim-v2, generic-scim-v2, google)

## Response `200`

Success

- Directory
  - `id` string — Directory ID
  - `name` string — name
  - `tenant` string — Tenant
  - `product` string — Product
  - `type` string — Directory provider
  - `deactivated` boolean — Status
  - `log_webhook_events` boolean — If true, webhook requests will be logged
  - `scim` object
    - `path` string — SCIM path
    - `endpoint` string — SCIM url
    - `secret` string — SCIM secret
  - `webhook` object
    - `endpoint` string — Webhook url
    - `secret` string — Webhook secret

## Changes

- **2025-03-20** `beea10f3e7fb` — 1 breaking
  - removed the media type `application/x-www-form-urlencoded` from the request body
- **2025-02-05** `f02a45abeffc` — 1 breaking, 1 info
  - added required request body
  - added the media type `application/json` for the response with the status `200`
- **2024-12-22** `d49c203898c2` — 2 breaking
  - removed the request body
  - removed the media type `application/json` for the response with the status `200`

[Change history](https://skmtc.dev/ory/apis/enterprise-sso-directory-sync/changes/api/v1/dsync/post.md)

---

[API](https://skmtc.dev/ory/apis/enterprise-sso-directory-sync.md) · [All operations](https://skmtc.dev/ory/apis/enterprise-sso-directory-sync/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ory/enterprise-sso-directory-sync/revisions/d92c991ace28/schema)
