Create, edit or delete a classification group

Create a classification group such as Categories, change its shared key or title, or remove the group. To add Culture to Categories, use the term endpoint.

TaskOperation
Create CategoriesPOST /api/v1/admin/taxonomies
Change a group key or titlePUT /api/v1/admin/taxonomies/{key}
Delete a groupDELETE /api/v1/admin/taxonomies/{key}

Before you start

Allowed roles: support, admin, partner; root is also permitted. Send the assigned token and publication key. readonly/manager and service accounts cannot write; full_access does not enable these routes. Keep calls in trusted server code. Caller activation, session and current publication-relationship restrictions apply.

InputLocation / typeMeaning
resourceRequired header, publication public-key stringSelects the publication; not a numeric taxonomy ID or secret.
tokenRequired header, existing eligible token stringADMIN_TOKEN in examples.
keyPOST/PUT body text; PUT/DELETE path textTaxonomy key within the selected publication, not a term key or numeric ID.

For a title edit, send the current key in URL and body. For a key rename, use the old URL key and new body key, then update consumers of the old key. terms input is ignored; the response shows current selected terms.

A request can save changes before a later error. A completed response does not confirm every save. Inspect stored configuration before repeating; there is no full rollback, access-queue or cache-propagation guarantee.

Examples use fictional group 7101/category and term 7201/culture in separate scenarios. Use intended plain keys; there is no automatic lowercase/slug conversion or general slash/encoded-key routing guarantee. Requests use cURL, Node.js 18+ fetch in an ES module (.mjs), and Python 3 urllib. Set WALLKIT_API_BASE to scheme and host only, plus RESOURCE_KEY and ADMIN_TOKEN. See shared errors.

Create Categories

POST /api/v1/admin/taxonomies

Create a publication group without creating or attaching terms.

Request

Send JSON with Content-Type: application/json using a key not already used here. Filter, pagination and sort are ignored.

Body fieldType / requirementMeaning and constraints
keyRequired textIntended group key, sanitized and trimmed.
titleRequired textShared group label; sanitized and trimmed before storage.

Send plain nonblank fields: required-presence checks occur before trimming. Do not depend on generated fallback values.

Example: Create the group without terms

Assume category is unused and new ID 7101 is returned. Empty terms shows selected links for the new group.

curl "${WALLKIT_API_BASE}/api/v1/admin/taxonomies" \
  -X POST \
  -H "resource: ${RESOURCE_KEY}" \
  -H "token: ${ADMIN_TOKEN}" \
  -H "Content-Type: application/json" \
  --data '{"key":"category","title":"Categories"}'
const url = new URL(`${process.env.WALLKIT_API_BASE}/api/v1/admin/taxonomies`);
const response = await fetch(url, {
  method: "POST",
  headers: {"resource": process.env.RESOURCE_KEY, "token": process.env.ADMIN_TOKEN, "Content-Type": "application/json"},
  body: JSON.stringify({"key": "category", "title": "Categories"})
});
console.log(response.status, await response.json());
import os, json
from urllib.request import Request, urlopen
from urllib.error import HTTPError

url = os.environ["WALLKIT_API_BASE"] + "/api/v1/admin/taxonomies"
body = json.dumps({'key': 'category', 'title': 'Categories'}).encode("utf-8")
request = Request(
    url,
    data=body,
    headers={"resource": os.environ["RESOURCE_KEY"], "token": os.environ["ADMIN_TOKEN"], "Content-Type": "application/json"},
    method="POST"
)
try:
    with urlopen(request) as response:
        print(response.status, json.load(response))
except HTTPError as error:
    print(error.code, json.load(error))

HTTP 201 response:

{
  "id": 7101,
  "key": "category",
  "title": "Categories",
  "terms": []
}

See field meanings. Keep the returned key for later edits/lookups.

Alternative: The key already exists

HTTP 404 response:

{
  "error": "invalid_taxonomy_key",
  "error_description": "Taxonomy key exists",
  "req_guid": "synthetic-request-reference"
}

This duplicate-key 404 differs from taxonomy_not_exists; the group is not missing.

Recovery and next task

HTTP statusAPI code / shapeCauseNext action
406incorrect_data / Body must be json formatMissing JSON or a value treated as empty by the API.Send the intended JSON object.
409invalid_key or invalid_title / validation messageRequired field fails presence validation.Supply both plain key and title.
404invalid_taxonomy_key / Taxonomy key existsProposed key already matches a group in the publication.Inspect the existing group before choosing create or edit.
Varies / no guaranteed JSONSave, query, method, runtime or transport failureErrors can use different response formats.Retain diagnostics and inspect stored configuration before retrying.

Read the taxonomy for terms, or edit the title.

Edit a group title or key

PUT /api/v1/admin/taxonomies/{key}

Edit the shared group by trimmed publication key. Both key and title are required, even for title-only changes.

Request

Send JSON with Content-Type: application/json for the known group. Filter, pagination and sort are ignored.

InputLocation / type / requirementMeaning and constraints
keyPath text; requiredExisting stored taxonomy key, sanitized and trimmed for lookup.
keyBody text; requiredIntended group key. For a title edit, send the exact existing value.
titleBody text; requiredIntended shared group title, sanitized and trimmed.

A raw key change triggers duplicate lookup after trimming. Whitespace variations can collide with the same record; use exact stored spelling for title-only changes. terms cannot add, remove or edit terms here.

Example: Keep category and change Categories to Article categories

Assume category already links Culture. Send the current key and new shared title; the term stays unchanged.

curl "${WALLKIT_API_BASE}/api/v1/admin/taxonomies/category" \
  -X PUT \
  -H "resource: ${RESOURCE_KEY}" \
  -H "token: ${ADMIN_TOKEN}" \
  -H "Content-Type: application/json" \
  --data '{"key":"category","title":"Article categories"}'
const url = new URL(`${process.env.WALLKIT_API_BASE}/api/v1/admin/taxonomies/category`);
const response = await fetch(url, {
  method: "PUT",
  headers: {"resource": process.env.RESOURCE_KEY, "token": process.env.ADMIN_TOKEN, "Content-Type": "application/json"},
  body: JSON.stringify({"key": "category", "title": "Article categories"})
});
console.log(response.status, await response.json());
import os, json
from urllib.request import Request, urlopen
from urllib.error import HTTPError

url = os.environ["WALLKIT_API_BASE"] + "/api/v1/admin/taxonomies/category"
body = json.dumps({'key': 'category', 'title': 'Article categories'}).encode("utf-8")
request = Request(
    url,
    data=body,
    headers={"resource": os.environ["RESOURCE_KEY"], "token": os.environ["ADMIN_TOKEN"], "Content-Type": "application/json"},
    method="PUT"
)
try:
    with urlopen(request) as response:
        print(response.status, json.load(response))
except HTTPError as error:
    print(error.code, json.load(error))

HTTP 200 response:

{
  "id": 7101,
  "key": "category",
  "title": "Article categories",
  "terms": [
    {
      "id": 7201,
      "key": "culture",
      "title": "Culture"
    }
  ]
}

The field meanings show the same group ID and term, not a new group or term edit.

Alternative: The proposed key collides

HTTP 404 response:

{
  "error": "invalid_taxonomy_key",
  "error_description": "Taxonomy key exists",
  "req_guid": "synthetic-request-reference"
}

The proposed key collided. A missing URL key instead returns taxonomy_not_exists / Taxonomy not found.

Recovery and next task

HTTP statusAPI code / shapeCauseNext action
406incorrect_data / Body must be json formatMissing JSON or a value treated as empty by the API.Send a JSON object containing both required fields.
404taxonomy_not_exists / Taxonomy not foundNo group matches path key and publication.Check the existing stored key and publication.
409invalid_key or invalid_title / validation messageRequired body field fails validation.Include both key and title; use the existing key for a title edit.
404invalid_taxonomy_key / Taxonomy key existsProposed key collides, including normalization-equivalent input.Keep exact existing spelling or choose the intended available key.
Varies / no guaranteed JSONSave, refresh, serialization, runtime or transport failureA write can precede a later failure.Inspect the group under its intended old/new key before retrying.

Read the group to inspect label and terms. Edit term labels separately.

Delete a classification group

DELETE /api/v1/admin/taxonomies/{key}

Attempt to remove the known shared group from the selected publication.

Before you call

Review shared uses before removal. Depending on deployed database rules, removal can also remove group-term links and dependent content/Plan/event mappings. Separate Term records are not directly deleted. Check purchases and memberships separately before removal; the response does not confirm full cleanup, access revocation, refunds or completed cache/access updates.

Request

Send the stored group key and headers. Body, term array, filter, pagination and sort are ignored.

Example: Remove an intentionally disposable group

Assume the fictional category group exists.

curl "${WALLKIT_API_BASE}/api/v1/admin/taxonomies/category" \
  -X DELETE \
  -H "resource: ${RESOURCE_KEY}" \
  -H "token: ${ADMIN_TOKEN}"
const url = new URL(`${process.env.WALLKIT_API_BASE}/api/v1/admin/taxonomies/category`);
const response = await fetch(url, {
  method: "DELETE",
  headers: {"resource": process.env.RESOURCE_KEY, "token": process.env.ADMIN_TOKEN}
});
console.log(response.status, await response.json());
import os, json
from urllib.request import Request, urlopen
from urllib.error import HTTPError

url = os.environ["WALLKIT_API_BASE"] + "/api/v1/admin/taxonomies/category"
request = Request(
    url,
    headers={"resource": os.environ["RESOURCE_KEY"], "token": os.environ["ADMIN_TOKEN"]},
    method="DELETE"
)
try:
    with urlopen(request) as response:
        print(response.status, json.load(response))
except HTTPError as error:
    print(error.code, json.load(error))

HTTP 200 response:

{
  "result": true
}
FieldType / presenceMeaning
resultLiteral boolean true if the response is reachedFixed response value after the delete attempt. Inspect the stored group and affected mappings to confirm removal; this marker is not a per-record cleanup result.

Alternative: The group is missing

HTTP 404 response:

{
  "error": "taxonomy_not_exists",
  "error_description": "Taxonomy not found",
  "req_guid": "synthetic-request-reference"
}

No group matched this key/publication. Repeating after removal may return this error, not success.

Recovery and next task

HTTP statusAPI code / shapeCauseNext action
404taxonomy_not_exists / Taxonomy not foundNo matching key/publication record.Inspect known configuration; do not infer global absence.
200result:trueFixed reply after the delete attempt.Inspect the stored group and affected mappings rather than treating this field as a cleanup audit.
Varies / no guaranteed JSONConstraint, query, runtime, method or transport failureError formats can vary, and earlier changes may remain.Keep diagnostics and inspect persisted state before retrying.

Browse groups. That list excludes blank-title groups and cannot verify all dependent cleanup.

Read the create/update result

Create/update return taxonomy fields at the top level, without items/paginator:

FieldType / presenceMeaning
idNumeric model identifier; selected, no explicit output castTaxonomy record ID, distinct from its key and the term/junction IDs.
keyText; selectedStored group key, including an accepted rename. Uniqueness is not global.
titleURL-decoded display text; selectedShared group label. No universal decoder-pass or null-preservation guarantee.
terms[]Array of objects; always present, including []Selected related terms. Its presence is response expansion, not evidence a request terms array was processed.
terms[].idNumeric model identifier; selected, no explicit output castTerm record ID.
terms[].keyText; selectedRelated term key; no universal encoded-key round-trip promise.
terms[].titleURL-decoded display text; selectedRelated term label.

Selected terms belong to this group/publication and have nonblank, nonnull stored titles. Empty terms can mean no links or only excluded rows. Order and uniqueness are unspecified. Rows have id/key/title, not Plan rules, link IDs or access results.

Full diagram

Use the arrow keys to scroll. Escape closes this view.

Search documentation

Enter at least 2 characters.

    ↑ ↓ move through results · Enter opens · Escape closes