---
title: "Create a new Active Directory"
method: POST
path: "/activedirectories"
tags: ["Active Directory"]
---

# Create a new Active Directory

`POST /activedirectories`

## Request

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

This endpoint allows you to create a new Active Directory.


#### Sample Request
```
curl -X POST https://console.jumpcloud.com/api/v2/activedirectories/ \
  -H 'accept: application/json' \
  -H 'content-type: application/json' \
  -H 'x-api-key: {API_KEY}' \
  -d '{
    "domain": "{DC=AD_domain_name;DC=com}"
  }'
```

## Headers

- `x-org-id` string

## Request body

- ActiveDirectory
  - `domain` string: Domain name for this Active Directory instance.
  - `id` string: ObjectID of this Active Directory instance.
  - `useCase` 'UNSET' | 'TWOWAYSYNC' | 'JCASAUTHORITY' | 'ADASAUTHORITY'
  - `groupsEnabled` boolean
  - `delegationState` 'ENABLED' | 'PENDING' | 'DISABLED': Delegation state of the Active Directory instance
  - `primaryAgent` string: ObjectID of the primary sync agent of domain.
  - `primaryImportAgent` string: ObjectID of the primary import agent of domain.
  - `updatedAt` string, date-time, nullable
  - `permission` 'PERMISSION_UNSPECIFIED' | 'PERMISSION_OWNER' | 'PERMISSION_READ_ONLY': Permission level for the Active Directory domain.
  - `organizationId` string: ObjectID of the organization that owns this Active Directory instance.
  - `associatedOrganizationIds` string[]: Organization object ids (hex) where this Active Directory integration is associated among the caller's authorized organizations.

## Response `201`

- ActiveDirectory
  - `domain` string: Domain name for this Active Directory instance.
  - `id` string: ObjectID of this Active Directory instance.
  - `useCase` 'UNSET' | 'TWOWAYSYNC' | 'JCASAUTHORITY' | 'ADASAUTHORITY'
  - `groupsEnabled` boolean
  - `delegationState` 'ENABLED' | 'PENDING' | 'DISABLED': Delegation state of the Active Directory instance
  - `primaryAgent` string: ObjectID of the primary sync agent of domain.
  - `primaryImportAgent` string: ObjectID of the primary import agent of domain.
  - `updatedAt` string, date-time, nullable
  - `permission` 'PERMISSION_UNSPECIFIED' | 'PERMISSION_OWNER' | 'PERMISSION_READ_ONLY': Permission level for the Active Directory domain.
  - `organizationId` string: ObjectID of the organization that owns this Active Directory instance.
  - `associatedOrganizationIds` string[]: Organization object ids (hex) where this Active Directory integration is associated among the caller's authorized organizations.

---

[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)
