Create, update or delete content metadata

Register an article’s metadata, update it by content key or delete its Wallkit record. To register an article and decide whether a reader can see it in the same request, use the content access guide.

TaskOperationEligible caller
Create metadataPOST /api/v1/admin/contentsupport, admin or partner, or root
Update metadataPUT /api/v1/admin/content/{key}support, admin or partner, or root
Delete metadataDELETE /api/v1/admin/content/{key}support, admin or partner, or root

Context and examples

Allowed roles: support, admin, partner; root is also permitted. Send the assigned token and publication key. Unlike Plan/subscription create, support can create content. readonly/manager and service accounts cannot write here. full_access does not enable these routes. Keep calls in trusted server code.

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

The caller must be active; their current publication relationship, when present, must not be locked or suspended. Session checks can reject revoked, expired or compromised tokens. Choose the intended content record in the selected publication.

Examples use fictional content 9001, key example-article and configured type article. They are separate scenarios: create assumes a new key and existing type; update assumes a record; delete assumes database constraints permit removal. Responses are illustrative. 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. example.com URLs are stored metadata. See shared errors.

Identity and replacement boundaries

Use the stored key for update/delete. Create trims and URL-decodes the body key; path lookups trim it and use a publication cache without the same extra decode. A plain key such as example-article avoids ambiguity. PUT ignores body key, id and resource_id.

Empty update images/taxonomies arrays keep existing sets; nonempty arrays replace them.

InputEffect
images omitted, null or []Update does not invoke the image helper; existing images remain.
images nonemptyDeletes the content's old image rows, then creates the supplied rows. Not a merge or a guaranteed atomic replacement.
taxonomies omitted, null or []Update does not invoke the taxonomy helper; existing mappings remain.
taxonomies nonemptyRemoves old content-term links, then processes supplied taxonomy/term rows. A nonempty array whose taxonomy keys are all skipped can clear links.
Shared classification metadataHelpers can create publication types, taxonomies and terms. Nonempty taxonomy titles can rename a shared group; term titles are assigned even for existing terms, so omission is not a preservation guarantee.
extraA supplied update object replaces the whole extra value, not selected properties. Create uses different object-casting behavior described below.

Classification links are separate from Plan rules, reader labels and access grants. Replacement does not explicitly delete shared type/group/term records. Send complete nonempty sets only when replacement is intended; the examples omit them.

Read current metadata before repeating an uncertain write. Create can fail without explicit rollback or after commit. Update saves the record before replacing links/images, so some changes may remain.

Create content metadata

POST /api/v1/admin/content

Create a content record under the selected publication key.

Before you call

Send an allowed token and publication key. Use an intended plain key/type. Create URL-decodes the body key; update/delete do not add that decode. Do not assume generated keys or arbitrary encoded routing.

Read replacement and failure behavior before adding links/images. Types can be created and shared labels changed. The example assumes an existing type and omits link arrays. Metadata creation does not publish or grant access.

Request

Send JSON with required key, price, currency and content_type presence, plus optional fields. Title has the maximum length described in the field table. This metadata write has no pagination, filter or sort options.

Response

HTTP 201 returns content metadata. After commit, access-queue, admin-event and response work can fail; success does not confirm recalculation or live publication.

Example: Create plain metadata without relationship arrays

Assume article exists and USD is configured. ID 9001/timestamps are illustrative. published_at:null shows an unset value, not a guaranteed default. New images/taxonomies are empty.

curl "${WALLKIT_API_BASE}/api/v1/admin/content" \
  -X POST \
  -H "resource: ${RESOURCE_KEY}" \
  -H "token: ${ADMIN_TOKEN}" \
  -H "Content-Type: application/json" \
  --data '{"key":"example-article","title":"Example article","description":"Illustrative metadata.","price":500,"currency":"USD","content_type":"article","extra":{"label":"example"},"link":"https://example.com/articles/example-article","is_applied_vat":false,"vat_percent":0}'
const url = new URL(`${process.env.WALLKIT_API_BASE}/api/v1/admin/content`);
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": "example-article", "title": "Example article", "description": "Illustrative metadata.", "price": 500, "currency": "USD", "content_type": "article", "extra": {"label": "example"}, "link": "https://example.com/articles/example-article", "is_applied_vat": false, "vat_percent": 0})
});
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/content"
body = json.dumps({'key': 'example-article', 'title': 'Example article', 'description': 'Illustrative metadata.', 'price': 500, 'currency': 'USD', 'content_type': 'article', 'extra': {'label': 'example'}, 'link': 'https://example.com/articles/example-article', 'is_applied_vat': False, 'vat_percent': 0}).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:

{
  "key": "example-article",
  "title": "Example article",
  "description": "Illustrative metadata.",
  "price": 500,
  "currency": "USD",
  "extra": {
    "label": "example"
  },
  "link": "https://example.com/articles/example-article",
  "created_at": "2026-11-01 12:00:00",
  "updated_at": "2026-11-01 12:00:00",
  "published_at": null,
  "images": [],
  "is_payable_content": true,
  "id": 9001,
  "is_applied_vat": false,
  "vat_percent": 0,
  "content_type": "article",
  "taxonomies": []
}

Alternative: Key already exists

HTTP 409 response:

{
  "error": "invalid_key",
  "error_description": "Content key exists",
  "req_guid": "synthetic-request-reference"
}

The duplicate check precedes creation. Later errors can follow writes or commit.

Recovery

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 with required fields.
409invalid_{field}, invalid_image_{field}, invalid_published_atField, image URL or date validation.Correct the reported constraint; do not infer a network check or universal date assignment.
409invalid_key / Content key existsNormalized key already stored in publication.Inspect the intended existing content before choosing another action.
409term_empty / Term not setProcessed taxonomy has no terms, possibly after writes.Inspect state and intended complete mappings before resubmitting.
406create_content_fail, create_taxonomy_fail, create_term_fail / messageSave or classified helper failure. Saved changes may remain after failure.Retain reference and inspect persisted content/shared metadata; no unchanged-state guarantee.
409 / variesexception / message, or uncaught/runtime/transport failureOther failure, potentially after commit/queue attempts.Inspect stored state before retrying; no atomicity or completed-work guarantee.

See shared errors. Read detail to inspect saved metadata.

Update metadata by content key

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

Update a known record in the selected publication.

Before you call

Send an allowed token, publication key and stored key. Omitted/null/empty images and taxonomies preserve; nonempty arrays replace after old rows/links are removed. An all-skipped nonempty taxonomy set can clear links. Shared labels/types and whole-extra replacement follow write behavior.

Path lookup trims and uses cache without POST’s extra decode. Body key cannot rename; PUT ignores published_at. Empty raw keys, including string 0, can return a different error format from read’s 404. Use a known path segment; cached results may lag.

Request

Send a JSON object and follow field-specific rules for title, price, currency and link. Supply valid nonempty image URLs and inspect their stored values after replacement. This write has no pagination, filter or sort options. The example omits links/type/date and replaces extra.

Response

HTTP 200 returns metadata. Base/type/shared-label changes are not in one transaction with later set replacement. Queue/event attempts do not confirm delivery, publication or access recalculation; an error can follow saved changes.

Example: Change display metadata and replace extra

Assume existing fields match the create example with no links. extra becomes {label:revised}; old omitted keys are removed. Omitted link arrays leave them unchanged.

curl "${WALLKIT_API_BASE}/api/v1/admin/content/example-article" \
  -X PUT \
  -H "resource: ${RESOURCE_KEY}" \
  -H "token: ${ADMIN_TOKEN}" \
  -H "Content-Type: application/json" \
  --data '{"title":"Example revised article","description":"Revised illustrative metadata.","extra":{"label":"revised"}}'
const url = new URL(`${process.env.WALLKIT_API_BASE}/api/v1/admin/content/example-article`);
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({"title": "Example revised article", "description": "Revised illustrative metadata.", "extra": {"label": "revised"}})
});
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/content/example-article"
body = json.dumps({'title': 'Example revised article', 'description': 'Revised illustrative metadata.', 'extra': {'label': 'revised'}}).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:

{
  "key": "example-article",
  "title": "Example revised article",
  "description": "Revised illustrative metadata.",
  "price": 500,
  "currency": "USD",
  "extra": {
    "label": "revised"
  },
  "link": "https://example.com/articles/example-article",
  "created_at": "2026-11-01 12:00:00",
  "updated_at": "2026-11-01 12:05:00",
  "published_at": null,
  "images": [],
  "is_payable_content": true,
  "id": 9001,
  "is_applied_vat": false,
  "vat_percent": 0,
  "content_type": "article",
  "taxonomies": []
}

Alternative: No matching content

HTTP 404 response:

{
  "error": "content_not_exists",
  "error_description": "Content not found",
  "req_guid": "synthetic-request-reference"
}

No nonempty key matched this publication. Empty-key failures can differ; this does not establish global absence.

Recovery

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.
404content_not_exists / Content not foundNo record matches key and publication.Check the known plain stored key/publication; do not substitute numeric ID or body key.
409invalid_{field}; invalid_images / Param url in images object required.Scalar validation or falsy image URL.Supply valid nonempty image URLs and inspect current images before retrying.
409term_empty / Term not setMissing terms after a processed taxonomy.Inspect persisted base/shared records and mappings; replacement may have begun.
406create_content_fail / model messageContent save returned false, even though this is PUT.Keep the error reference and inspect state before retrying.
500 / variesexception / message, or uncaught/runtime/transport failureLookup/helper/cache/serialization failure or other error. Falsy-key/method branches are not uniformly normalized here.Inspect persisted content/images/classification before retrying; no rollback or unchanged-state promise.

See shared errors. Read saved metadata and compare intended fields/links.

Delete content metadata by key

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

Attempt destructive content-record deletion in the selected publication.

Before you call

Send an allowed token, publication key and intended key. Review purchases, memberships and other dependencies before deleting the content record. Deployed database constraints or cascades can affect removal and related records; the subscription catalog’s guarded-delete behavior is a separate contract.

Lookup uses trimmed cached key/publication context without POST’s extra decode. Empty/string 0 keys can return a different error format from the failures listed below. Do not use this operation to refund payments, manage reader access, cancel subscriptions, remove files, or migrate history; handle those tasks separately. Inspect state before retrying; removal is not guaranteed atomic or safely repeatable.

Request

Send the stored key and headers without a body, rather than a numeric ID. There are no pagination, filter or sort options. Check reader access separately after removal; admin events and cache invalidation do not confirm downstream completion or recalculation.

Response

HTTP 200 returns this result, apart from shared metadata:

FieldType / presenceMeaning
resultBoolean; addedContent model delete result, not an exhaustive related-record cleanup report or reader-access/refund/file-removal result. False is possible without an exception.

Example: Delete intentionally disposable metadata

Assume the fictional record exists and database constraints allow removal.

curl "${WALLKIT_API_BASE}/api/v1/admin/content/example-article" \
  -X DELETE \
  -H "resource: ${RESOURCE_KEY}" \
  -H "token: ${ADMIN_TOKEN}"
const url = new URL(`${process.env.WALLKIT_API_BASE}/api/v1/admin/content/example-article`);
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/content/example-article"
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
}

Alternative: Content not found

HTTP 404 response:

{
  "error": "content_not_exists",
  "error_description": "Content not found",
  "req_guid": "synthetic-request-reference"
}

Already removed records can return this error rather than another success. This does not establish global absence.

Recovery

HTTP statusAPI code / shapeCauseNext action
404content_not_exists / Content not foundNo known key/publication record, including a prior deletion.Inspect known configuration; do not retry deletion blindly.
200result:falseModel delete returned false.Inspect the stored record and reported diagnostics before deciding another action.
500incorrect_method / Incorrect methodWrong method if this action is reached.Use the registered DELETE route; no alternative method behavior is promised.
500 / variesexception / message or uncaught/runtime/transport failureConstraint/snapshot/cache/event/serialization error, possibly after deletion; key lookup failures can use different response formats.Keep request reference and inspect persisted state/dependencies. Do not infer rollback, complete cascades or refunds/revocation.

See shared errors. Browse metadata to inspect remaining records.

Scalar input fields

Send a JSON object. Presence, assignment and null rules differ by field and operation.

FieldInput / validationCreate and update behavior
keyRequired on POST, maximum 50 characters before normalizationPOST string/trim/URL-decode; duplicate key in selected publication rejected. If normalization leaves an empty key and saving proceeds, the model has a generated-key fallback; do not rely on it as an identity recipe. PUT body key is ignored.
titleText; maximum 500Stored after string/tag stripping/trim/URL-decode. POST reads it even when omitted, without a universal omitted/null result guarantee. PUT assigns when nonnull; omission/null avoids assignment.
descriptionStored valuePOST uses supplied value or null; PUT assigns when nonnull. Omitted/null PUT does not establish a clear instruction.
priceRequired on POST; use numeric inputBoth assign a supplied nonnull value using amount normalization below. On update, omission/null preserves the price; 0 or empty text can overwrite it. Supply the intended nonnegative amount and inspect the saved price.
currencyRequired configured currency on POST; update validates only nonempty nonnull valuesStored string without automatic uppercase conversion. Omitted/null update preserves; empty values do not establish validated currency.
content_typeRequired presence on POST; binding requires nonempty stringPublication type lookup or creation. PUT nonempty string reassigns/resolves a type; empty/null/nonstring does not explicitly clear the existing type. No closed type enum or universal malformed-type rejection.
extraCreate object-casts supplied value or empty fallback; update requires an objectPOST omitted/null becomes empty object; arrays/scalars are object-cast rather than uniformly rejected. PUT whole-object replacement; array/scalar/null is ignored by this assignment. No closed property schema.
linkPOST URL validation when nonnull; PUT URL validation only when nonempty/nonnullPOST stores trimmed URL-decoded value; PUT trims without that decode filter. Neither validates network reachability or fetches the target.
is_applied_vat, vat_percentBoolean filtering / float filtering when nonnullStored settings, rather than a tax calculation. Supply the intended percentage. Omitted/null update avoids assignment.
published_atPOST nonempty value checked with date parsingAssignment also requires a positive integer interpretation of the raw value; accepted parsing alone does not guarantee assignment. Stored format Y-m-d H:i:s, timezone unspecified. PUT ignores this field entirely.

For published_at, parsing alone does not ensure assignment. Accepted dates, relative phrases or Unix-like values can behave differently; omission does not mean publish now. Assignment has a current-time fallback if parsing fails, but it is not a general default.

price is filtered to float, then text. A decimal point in that filtered text triggers multiplication by 100, rounding and integer conversion; otherwise rounding occurs without multiplication. The filtered value matters, not original JSON spelling. There is no universal major/minor input unit or currency conversion. The example uses integer-form 500 and stored price 500.

Use JSON booleans. After string/lowercase/trim filtering, empty values and literal false become false; nonempty off does not. is_payable_content describes positive stored price, not reader permission.

Image and taxonomy input details

Images are stored metadata, not uploaded or fetched files.

Image fieldInput / presenceMeaning and limits
urlRequired for a processed rowSend a valid nonempty URL string. Update stores trimmed URL text. Image URLs are stored metadata; the target is not fetched.
width, heightOptional; assigned only when nonnull and truthy, integer-filteredStored dimensions. Use intended integer dimensions; 0/empty does not assign a dimension. No unit conversion is specified.
titleOptional nonempty textCan be stored on image rows but is omitted from the selected response.

Nonempty update images removes old rows before creating new ones. IDs/timestamps may change. No deduplication, file removal or atomic replacement is guaranteed.

Classification inputInput / presenceEffect
taxonomies[].keyText; missing/falsy key skippedSanitized/trimmed/URL-decoded for current-publication lookup or creation. Skipped entries in a nonempty replacement still follow old-link removal.
taxonomies[].titleOptional nonempty textCan update the shared publication taxonomy title.
taxonomies[].terms[]Nonempty array for a processed taxonomyMissing/empty terms returns term_empty after shared taxonomy save and possible old-link removal.
terms[].keyRequired field for each processed termSanitized/trimmed/URL-decoded; current-publication lookup or creation.
terms[].titleProvide intended textAlways assigned/saved, including existing shared terms; omission does not guarantee preservation and can fail or coerce.

Classification helpers create/find group-term and content-term links, without Plan access rules. Wrong shapes, skipped keys, duplicates or later errors can leave partial replacement.

Create/update response fields

Create returns HTTP 201; update returns HTTP 200. Both return content-with-term-arrays fields at the top level, without items/paginator. That definition covers types, presence and image meanings.

Returned field/objectType / presenceMeaning
MetadataFields from the linked definitionid,key,title,description,price,currency,extra,link,created_at,updated_at,published_at. ID/price become integers; display text is entity-decoded. extra has application-defined keys; malformed/null values have no universal conversion.
images[]Array; always presenturl,width,height,created_at, without ID/title/hash. Empty if none. Dimension units/conversion and file availability are unspecified.
is_payable_contentBoolean; presentStored price exceeds zero, not a reader-access decision.
is_applied_vat, vat_percentStored flag/numeric value, potentially nullConfiguration, not a tax calculation.
content_typeRelated key; conditionalOmitted if no related key is defined; not necessarily null.
taxonomies[]Array; always presentGroups with key,title,terms[]; terms with key,title. No numeric classification/link IDs or Plan rules.

Arrays show current links, rather than key-indexed maps or historical snapshots. Related records can belong to other publications; order and uniqueness are unspecified, and dangling links can fail the response. resource_id, content_type_id, access_level and protected article body are absent. Metadata does not prove delivery or reader access.

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