---
title: "Create Samba Domain"
method: POST
path: "/ldapservers/{ldapserver_id}/sambadomains"
tags: ["Samba Domains"]
---

# Create Samba Domain

`POST /ldapservers/{ldapserver_id}/sambadomains`

## Request

- Base URL: `https://console.jumpcloud.com/api/v2`
- URL: `https://console.jumpcloud.com/api/v2/ldapservers/{ldapserver_id}/sambadomains`
- Auth: API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/jumpcloud/apis/jumpcloud-api-2/docs/ldapservers/:ldapserver_id/sambadomains/post.ts> (a function with typed inputs; its response is checked against the schema)

This endpoint allows you to create a samba domain for an LDAP server.

##### Sample Request
```
curl -X POST https://console.jumpcloud.com/api/v2/ldapservers/{LDAP_ID}/sambadomains \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: {API_KEY}' \
  -d '{
    "sid":"{SID_ID}",
    "name":"{WORKGROUP_NAME}"
  }'
```

## Headers

- `x-org-id` string

## Request body

- SambaDomain
  - `id` string: Unique identifier of this domain
  - `name` string, required: Name of this domain's WorkGroup
  - `sid` string, required: Security identifier of this domain

## Response `201`

- SambaDomain
  - `id` string: Unique identifier of this domain
  - `name` string, required: Name of this domain's WorkGroup
  - `sid` string, required: Security identifier of this domain

---

[API](https://skmtc.dev/jumpcloud/apis/jumpcloud-api-2.md) - [All operations](https://skmtc.dev/jumpcloud/apis/jumpcloud-api-2/llms.txt) - [OpenAPI document](https://skmtc.dev/jumpcloud/apis/jumpcloud-api-2/revisions/3f09fe63caaa?raw)
