---
title: "Create"
method: POST
path: "/api/v1/directories"
tags: ["Directory"]
---

# Create

`POST /api/v1/directories`

Create a directory.

## Request body

- C1ApiDirectoryV1DirectoryServiceCreateRequest — Uplevel an app into a full directory.
  - `appId` string — The AppID to make into a directory, providing identities and more for the C1 app.
  - `expandMask` C1ApiDirectoryV1DirectoryExpandMask — The fields to be included in the directory response.
    - `paths` string[], nullable — An array of fields to be included in the directory response.

## Response `200`

The DirectoryServiceCreateResponse message.

- C1ApiDirectoryV1DirectoryServiceCreateResponse — The DirectoryServiceCreateResponse message.
  - `directoryView` C1ApiDirectoryV1DirectoryView — The directory view contains a directory and an app_path which is a JSONPATH set to the location in the expand mask that the expanded app will live if requested by the expander.
    - `appPath` string — JSONPATH expression indicating the location of the App object in the array.
    - `directory` C1ApiDirectoryV1Directory — This object indicates that an app is also a directory.
      - `appId` string — The ID of the app associated with the directory.
      - `createdAt` string, date-time
      - `deletedAt` string, date-time
      - `updatedAt` string, date-time
  - `expanded` object[], nullable — List of serialized related objects.
    - `@type` string — The type of the serialized message.

## Changes

- **2025-04-10** `17f9f3bcedd5` — 4 info
  - the response optional property `directoryView/directory/appId` became read-only for the status `200`
  - the response optional property `directoryView/directory/createdAt` became read-only for the status `200`
  - the response optional property `directoryView/directory/deletedAt` became read-only for the status `200`
  - the response optional property `directoryView/directory/updatedAt` became read-only for the status `200`

[Change history](https://skmtc.dev/conductorone/apis/c1-api/changes/api/v1/directories/post.md)

---

[API](https://skmtc.dev/conductorone/apis/c1-api.md) · [All operations](https://skmtc.dev/conductorone/apis/c1-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/conductorone/c1-api/revisions/e09d811ca082/schema)
