public

Update directory configuration

Requires write. Covers name, listingTypes, the four submissionPolicy switches, and the two structured policy keys rejectionReasons and extraFields.

Added because listingTypes was settable only through the Clerk admin surface, so an integration that could provision its own taxonomies, attribute templates and listings still had to stop and ask a human to declare the listing type those listings would use. submissionPolicy joined it on 2026-10-01 for the same reason: a headless consumer could not open page comments or close reviews on its own directory.

PATCH semantics — an absent field is left alone. The two object fields differ, so read this twice: listingTypes REPLACES the whole map, so send every type you want to keep, whereas submissionPolicy is MERGED, so an absent switch keeps its value and keys this DTO does not declare survive. Within that merge the two LIST keys replace: send every rejection reason or extra field you want to keep, since a list has no false.

rejectionReasons and extraFields were previously refused here — the nested policy class did not declare them and forbidNonWhitelisted rejected the request, which made the rejection-reason feature unreachable from this surface even though the merge was written to preserve them.

slug, domain and the other *Policy fields are deliberately NOT settable here; see UpdatePublicDirectoryDto for why.

patch/public/v1/directories/{directory}

Request

  • Base URL: https://api.epicdirectories.com
  • URL: https://api.epicdirectories.com/public/v1/directories/{directory}
  • Auth: API key in header x-api-key

Path parameters

directorystring required

Headers

Idempotency-Keystring

Optional. Send a unique key per logical operation to make retries safe. 1-256 characters, and only letters, digits, - and _ — colons and other separators are rejected with 400. A retry with the same key replays the original response (status + body) instead of re-executing. Cached for 24h. Reusing a key with a different request body returns 409 — note that a timestamp in the body (e.g. fetchedAt) turns an otherwise-stable key into a permanent 409, so either omit it (snapshots default it server-side) or fold a payload digest into the key. Skipped on 5xx responses (transient errors should be retried fresh).

x-api-keystring required

API Key for authentication

Request body

namestring

Display name of the directory.

listingTypesobject

Listing types this directory declares, keyed by type slug. Replaces the whole map — send every type you want to keep, not just the new one. Each value needs a non-empty label; description is optional. Removing a type that still has listings is rejected with 409.

Example request

{
  "name": "Ecommerce Web Designers",
  "listingTypes": {
    "agency": {
      "label": "Agency",
      "description": "An ecommerce design or dev agency"
    }
  },
  "submissionPolicy": {
    "rejectionReasons": [
      "no-license",
      "duplicate",
      "low-effort-fork"
    ],
    "extraFields": [
      {
        "key": "replaces",
        "type": "string_list",
        "maxItems": 10,
        "maxLength": 100
      },
      {
        "key": "self_hostable",
        "type": "boolean"
      },
      {
        "key": "submitter_role",
        "type": "enum",
        "enumValues": [
          "maintainer",
          "user"
        ]
      }
    ]
  }
}

Response

Directory updated

Changes

No recorded changes to this operation across all 1 revision of this API.