---
title: "Create a Setup Link"
method: POST
path: "/api/v1/dsync/setuplinks"
tags: ["Setup Links | Directory Sync"]
---

# Create a Setup Link

`POST /api/v1/dsync/setuplinks`

## Request body

- object
  - `name` string — Name of connection
  - `tenant` string, required — Tenant
  - `product` string, required — Product
  - `webhook_url` string, required — The URL to send the directory sync events to
  - `webhook_secret` string, required — The secret to sign the directory sync events
  - `expiryDays` number — Days in number for the setup link to expire
  - `regenerate` boolean — If passed as true, it will remove the existing setup link and create a new one.

## Response `200`

Success

- SetupLink
  - `setupID` string — Setup link ID
  - `tenant` string — Tenant
  - `product` string — Product
  - `validTill` string — Valid till timestamp
  - `url` string — Setup link URL

## 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/setuplinks/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)
