> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.partnerpage.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.partnerpage.io/_mcp/server.

# Create a directory

POST https://v1.api.partnerpage.io/api/directory/private/v1alpha/directories/
Content-Type: application/json

Create a new GenericDirectory for the authenticated user's organization.

Reference: https://docs.partnerpage.io/api-reference/directory/create-a-directory

## Authentication

- `Authorization` header (required) (prefixed with ` Token   `) — Your API key, sent as `Authorization: Token <your API key>`

## Request

### Body (application/json)

This endpoint expects a CreateDirectoryRequest.

- `name` (string, required)
- `type` (enum, optional) — * `services` - services * `technology` - technology * `combination` - combination
  - Allowed values: `services`, `technology`, `combination`

## Response

### 201

Created

- `href` (string, required)
- `id` (string, required)
- `name` (string, required, nullable)
- `organization` (OrganizationDetail, required)
- `settings` (GenericSettings, required) — All resources should return their href url
- `customizations` (MinimalGenericCustomization, required) — All resources should return their href url
- `tracking` (Tracking, required)
- `seo` (GenericDirectorySEO, required)

## Errors

### 400 Bad Request Error

Bad Request

- `any`

### 500 Internal Server Error

Internal Server Error

- `any`

## Types

### OrganizationDetail

- `id` (string, required)
- `name` (string, required)

### GenericSettings

All resources should return their href url

- `href` (string, required)
- `genericDirectoryId` (string, required)
- `customUrl` (string, required, nullable)
- `globalCallToActionUrl` (string, required, nullable)
- `globalCallToActionLabel` (string, required, nullable)
- `contactButtonLabel` (string, required, nullable)
- `featuredEntriesEnabled` (boolean, required)
- `entryTypes` (list of enum, required)
  - Allowed values: `app`, `partner`
- `entryTypeSettings` (map from string to BaseEntryTypeSetting, required)
- `pageSizeSelectionOnDirectory` (boolean, required)
- `filterMappingsEnabled` (boolean, required)
- `badgesEnabled` (boolean, required)
- `calloutsEnabled` (boolean, required)
- `customFormsEnabled` (boolean, required)
- `certificationsEnabled` (boolean, required)
- `verificationsEnabled` (boolean, required)
- `callToActionEnabled` (boolean, required)
- `awardsEnabled` (boolean, required)
- `availabilityToggleEnabled` (boolean, required)
- `landingPageEnabled` (boolean, required)
- `customLandingPagesEnabled` (boolean, required)
- `partnerPortalEnabled` (boolean, required)
- `customSlugEnabled` (boolean, required)
- `darkLogosEnabled` (boolean, required)
- `partnerCompareEnabled` (boolean, required)
- `embeddedEditorEnabled` (boolean, required)
- `keywordsEnabled` (boolean, required)
- `questionnaireEnabled` (boolean, required)
- `mediaEnabled` (boolean, required)
- `caseStudiesEnabled` (boolean, required)
- `clientsEnabled` (boolean, required)
- `testimonialsEnabled` (boolean, required)
- `specialOffersEnabled` (boolean, required)
- `contactRequestsEnabled` (boolean, required)
- `dealRegistrationsEnabled` (boolean, required)
- `partnerSourcedLeadsRequireApproval` (boolean, required)
- `crmConnectionsEnabled` (boolean, required)
- `tiersEnabled` (boolean, required)
- `matchmakingRequestsEnabled` (boolean, required)
- `matchmakingRequestsPublic` (boolean, required)
- `partnerApplicationsEnabled` (boolean, required)
- `getListedEnabled` (boolean, required)
- `assignMatchmakingRequestEnabled` (boolean, required)
- `useCasesEnabled` (boolean, required)
- `accreditationsEnabled` (boolean, required)
- `externalUrlEnabled` (boolean, required)
- `externalIdEnabled` (boolean, required)
- `externalIdUnique` (boolean, required)
- `partnerWebhooksEnabled` (boolean, required)
- `partnerApplicationDeclinedEmailEnabled` (boolean, required)
- `partnerApplicationAcceptanceMessage` (string, required, nullable)
- `showBottomBar` (boolean, required)
- `legacyPartnerViewEnabled` (boolean, required)
- `profileSectionOrderingEnabled` (boolean, required)
- `hostedPagesDisabled` (boolean, required)
- `profilePreviewUrlTemplate` (string, required)
- `holdRepeatedRequestsEnabled` (boolean, required)
- `serviceMarketplaceEnabled` (boolean, required)
- `recommendedSortEnabled` (boolean, required)
- `internalDirectoryEnabled` (boolean, required)
- `defaultSorting` (string, required)
- `entryApprovalFlowEnabled` (boolean, required)
- `supportEnabled` (boolean, required)
- `locationEnabled` (boolean, required)
- `locationsEnabled` (boolean, required)
- `contactRequestProjectStatusesEnabled` (boolean, required)
- `contactDetailsAfterAcceptEnabled` (boolean, required)
- `partnersInvitationsEnabled` (boolean, required)
- `lastUpdatedEnabled` (boolean, required)
- `entryDisclaimerTextEnabled` (boolean, required)
- `gdprEnabled` (boolean, required)
- `termsOfServiceUrl` (GenericSettingsTermsOfServiceUrl, required, nullable)
- `privacyPolicyUrl` (GenericSettingsPrivacyPolicyUrl, required, nullable)
- `integrationDescriptionEnabled` (boolean, required)
- `partnerEmbedEnabled` (boolean, required)
- `partnerDescriptionMaxLength` (integer, required, nullable)
- `reviewsEnabled` (boolean, required)
- `autoApproveReviewsEnabled` (boolean, required)
- `showFullReviewInformationEnabled` (boolean, required)
- `showDescriptionOnCard` (boolean, required)
- `i18nEnabled` (boolean, required)
- `i18nMode` (enum, required, nullable) — * `prefix` - Prefix * `query_param` - Query param
  - Allowed values: `prefix`, `query_param`
- `i18nLanguages` (any, required, nullable)
- `i18nDynamicContentTranslationEnabled` (boolean, required, nullable)
- `partnerFinderEnabled` (boolean, required)
- `badgesShowWideEnabled` (boolean, required)
- `crmObjectsEnabled` (boolean, required)
- `schedulerEnabled` (boolean, required)
- `schedulerPostCallFeedbackEnabled` (boolean, required)
- `enrichProfileDirOwnerEnabled` (boolean, required)
- `enrichProfileEntryOwnerEnabled` (boolean, required)
- `entryWebsiteLinkEnabled` (boolean, required)
- `contactRequestsCustomFieldsForm` (string, required, nullable)
- `requireBusinessEmailForLeadForms` (boolean, required)
- `selfServeSettingsEnabled` (boolean, required)
- `indexDirectory` (boolean, required)
- `type` (string, required)
- `plan` (string, required)
- `urlCustomizationEnabled` (boolean, required)
- `webhooksEnabled` (boolean, required)
- `webhooksSecret` (string, required)
- `customUrlSetupMethod` (string, required, nullable)
- `customDomainRouterId` (string, required, nullable)
- `entryDisclaimerText` (string, optional, nullable)
- `profileFieldsEnabled` (boolean, optional, default: false)
- `profileFieldDefinitions` (list of ProfileFieldDefinitionSerializerReader, optional)
- `friendlySubdomain` (string, optional, nullable)
- `friendlyUrl` (string, optional, nullable)

### MinimalGenericCustomization

All resources should return their href url

- `href` (string, required)
- `genericDirectoryId` (string, required)
- `logo` (string, required, nullable)
- `internalLogo` (string, required, nullable)
- `favicon` (string, required, nullable)
- `internalFavicon` (string, required, nullable)
- `logoUrl` (string, required, nullable)
- `internalLogoUrl` (string, required, nullable)
- `faviconUrl` (string, required, nullable)
- `internalFaviconUrl` (string, required, nullable)
- `interactiveColor` (string, required)
- `actionPrimaryColor` (string, required)
- `colorsTheme` (any, optional, nullable)
- `fontFamily` (any, optional, nullable)
- `cssFile` (string, optional, nullable)
- `customNavbar` (CustomizationSection, optional, nullable)
- `directoryFeaturedSection` (FeaturedSection, optional, nullable)
- `directoryMainSection` (DirectoryMainSection, optional, nullable)
- `customFirstSection` (CustomizationSection, optional, nullable)
- `customSecondSection` (CustomizationSection, optional, nullable)
- `customLastSection` (CustomizationSection, optional, nullable)
- `customFooter` (CustomizationSection, optional, nullable)
- `landingPageHero` (any, optional, nullable)
- `landingPageMetrics` (any, optional, nullable)
- `landingPagePartners` (any, optional, nullable)
- `landingPageProcess` (any, optional, nullable)
- `landingPageReviews` (any, optional, nullable)
- `partnerProfileHeader` (any, optional, nullable)
- `partnerProfileMain` (any, optional, nullable)
- `partnerProfileReviews` (any, optional, nullable)
- `reviewFormMain` (any, optional, nullable)
- `contactFormMain` (any, optional, nullable)
- `matchmakingFormMain` (any, optional, nullable)
- `dealRegistrationFormMain` (any, optional, nullable)
- `matchmakingSuccessMain` (any, optional, nullable)
- `partnerApplicationSuccessMain` (any, optional, nullable)
- `contactRequestSuccessMain` (any, optional, nullable)
- `dealRegistrationSuccessMain` (any, optional, nullable)
- `partnerApplicationFormMain` (any, optional, nullable)
- `customPartnerProfileLastSection` (any, optional, nullable)

### Tracking

- `umamiWebsiteId` (string, required, nullable)
- `umamiShareId` (string, required, nullable)
- `internalUmamiWebsiteId` (string, optional, nullable)
- `internalUmamiShareId` (string, optional, nullable)

### GenericDirectorySEO

- `indexDirectory` (boolean, required)
- `metaTitle` (string, optional, nullable)
- `metaDescription` (string, optional, nullable)
- `metaImage` (string, optional, nullable)
- `siteName` (string, optional, nullable)

### BaseEntryTypeSetting

- `urlSegment` (string, required)
- `onCardClick` (string, optional)
- `showCardLinksAsInternal` (boolean, optional)

### GenericSettingsTermsOfServiceUrl

- string
- string

### GenericSettingsPrivacyPolicyUrl

- string
- string

### ProfileFieldDefinitionSerializerReader

- `id` (string, required)
- `key` (string, required)
- `name` (string, required)
- `helpText` (string, required)
- `type` (enum, required) — * `short_text` - Short text * `long_text` - Long text * `integer` - Whole number * `decimal` - Decimal * `currency` - Currency amount * `price` - Price * `date` - Date * `single_choice` - Single choice * `multiple_choice` - Multiple choice * `boolean` - Yes/no * `url` - Link * `email` - Email * `phone` - Phone * `image` - Image * `file` - File
  - Allowed values: `short_text`, `long_text`, `integer`, `decimal`, `currency`, `price`, `date`, `single_choice`, `multiple_choice`, `boolean`, `url`, `email`, `phone`, `image`, `file`
- `required` (boolean, required)
- `visibility` (enum, required) — * `internal` - Internal * `public` - Public
  - Allowed values: `internal`, `public`
- `editableBy` (enum, required) — * `partner` - Partner can edit * `owner` - Only the directory owner can edit
  - Allowed values: `partner`, `owner`
- `placement` (enum, required) — * `sidebar` - Sidebar * `main` - Main column
  - Allowed values: `sidebar`, `main`
- `order` (integer, required)
- `rules` (map from string to any, required)
- `archivedAt` (datetime, required, nullable)
- `restoreUntil` (datetime, required, nullable)
- `filledCount` (integer, optional)

### CustomizationSection

- `name` (string, required)
- `settings` (any, required)

### FeaturedSection

- `title` (string, required, nullable)
- `background` (string, required, nullable)

### DirectoryMainSection

- `title` (string, required, nullable)
- `background` (string, required, nullable)
- `matchmakingCard` (MatchmakingCard, required, nullable)
- `requestLink` (RequestLink, optional)
- `searchPlaceholder` (string, optional, nullable)

### MatchmakingCard

- `title` (string, required, nullable)
- `description` (string, required, nullable)
- `introduction` (string, required, nullable)
- `image` (MatchmakingCardImage, required, nullable)
- `buttonLabel` (string, required, nullable)

### RequestLink

- `title` (string, required, nullable)
- `buttonLabel` (string, required, nullable)
- `url` (RequestLinkUrl, required, nullable)

### MatchmakingCardImage

- string
- string

### RequestLinkUrl

- string
- string

## Examples

**Request**

```json
{
  "name": "Acme Partner Directory",
  "type": "services"
}
```

**SDK Code**

```python Create Directory (application/json)
import requests

url = "https://v1.api.partnerpage.io/api/directory/private/v1alpha/directories/"

payload = {
    "name": "Acme Partner Directory",
    "type": "services"
}
headers = {
    "Authorization": "Token  <apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Create Directory (application/json)
const url = 'https://v1.api.partnerpage.io/api/directory/private/v1alpha/directories/';
const options = {
  method: 'POST',
  headers: {Authorization: 'Token  <apiKey>', 'Content-Type': 'application/json'},
  body: '{"name":"Acme Partner Directory","type":"services"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```