Create, update or delete a Plan

Create a Plan, edit its access rules or remove it from the catalog. A rule edit can affect shared classification labels and linked subscription choices. Check the replacement rules before sending arrays.

TaskOperationEligible caller
Create a PlanPOST /api/v1/admin/plansadmin or partner, or root
Update a known PlanPUT /api/v1/admin/plans/{id}support, admin or partner, or root
Delete a known PlanDELETE /api/v1/admin/plans/{id}support, admin or partner, or root

Context and examples

Send the assigned Admin token and publication public key. Allowed roles are in the task table. readonly/manager cannot write. Service accounts cannot use these routes; Plan full_access controls access rules, not mutation permission. Keep calls in trusted server code.

InputLocation / typeMeaning
resourceRequired header, publication public-key stringSelects the publication for creation or ID lookup, not a numeric record ID or secret.
tokenRequired header, existing eligible token stringADMIN_TOKEN in examples, with the operation-specific grant above.
idPUT/DELETE path, digit stringPlan record ID within the selected publication, not a slug or subscription 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 publication and Plan from your catalog records. resource_id does not move a Plan between publications.

Examples use fictional Plan 5001, slug example-plan and illustrative responses. They are separate scenarios: create assumes a unique slug; update assumes the record exists; delete assumes no blocking dependencies. 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.

Understand changes before sending a body

Most omitted individual fields keep their values. A supplied extra object replaces the whole object. Supplied rule or linked-choice arrays can remove omitted entries.

SelectionBehavior and consequence
Ordinary scalar fieldsUpdate changes them only when accepted and nonnull as described below. Omitted fields usually preserve stored values; predictive fields have separate property-presence rules.
extra objectA supplied JSON object replaces the whole extra value; it is not a property merge. Arrays, scalars and null are ignored by this assignment.
taxonomies / content_types on PUTA supplied array replaces the Plan's selected rule-link set: links omitted from that array are removed. [] clears that set. Omitted/null arrays leave the set untouched. Matching links may preserve rule fields not explicitly supplied.
team_subscriptionsA supplied array clears all current linked team-choice relationships before rebuilding them. [] clears the set; omitted/null leaves it untouched. These are not the Plan's own subscriptions or actual memberships.
Shared classification recordsRule helpers can create publication content types, taxonomies and terms. Taxonomy title changes and term title assignments can change labels shared by other configuration in that publication.
Team-choice referencesUse known subscription choices from the intended publication/customer context. A configured link does not establish team eligibility or available seats.

Empty create rule arrays add nothing. On update, [] clears the corresponding taxonomy/content-type rules. Omit the field to preserve them; send the complete intended set to replace them.

After an uncertain write, read the Plan before repeating. Validation, events or response generation can fail after earlier changes were saved.

Predictive-percentage changes can mark an existing action for an update. Guest-Plan update/delete can queue access work. The response does not confirm recalculation or an individual reader’s access.

Create a Plan

POST /api/v1/admin/plans

Create a Plan for the publication. This does not create catalog subscriptions or assign readers.

Before you call

Use admin or partner token, or root, and the publication key. support alone cannot create. Review replacement and failure behavior: rules can change shared labels. Select linked team choices from the intended publication/customer catalog and confirm their eligibility separately.

The example supplies material flags for an inactive/private Plan, without relationship arrays. Use a nonconflicting publication slug. Other omitted defaults depend on stored schema.

Request

Send a JSON object with required title and optional scalar fields or rule arrays. Pagination, filter and sort inputs are ignored.

Response

HTTP 201 returns the detailed Plan at the top level, without items/paginator. A response failure after commit does not undo creation.

Example: Create an inactive private Plan

Assume Plan 5001 was created without subscriptions, team choices or rule links. Taxonomy/content-type keys are intentionally absent.

curl "${WALLKIT_API_BASE}/api/v1/admin/plans" \
  -X POST \
  -H "resource: ${RESOURCE_KEY}" \
  -H "token: ${ADMIN_TOKEN}" \
  -H "Content-Type: application/json" \
  --data '{"title":"Example Plan","slug":"example-plan","description":"Illustrative configuration.","private":true,"active":false,"priority":1,"full_access":false,"predictive_paywall":false,"predictive_percents":0,"can_own_teams":false,"extra":{"label":"example"}}'
const url = new URL(`${process.env.WALLKIT_API_BASE}/api/v1/admin/plans`);
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({"title": "Example Plan", "slug": "example-plan", "description": "Illustrative configuration.", "private": true, "active": false, "priority": 1, "full_access": false, "predictive_paywall": false, "predictive_percents": 0, "can_own_teams": false, "extra": {"label": "example"}})
});
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/plans"
body = json.dumps({'title': 'Example Plan', 'slug': 'example-plan', 'description': 'Illustrative configuration.', 'private': True, 'active': False, 'priority': 1, 'full_access': False, 'predictive_paywall': False, 'predictive_percents': 0, 'can_own_teams': False, 'extra': {'label': 'example'}}).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": 5001,
  "title": "Example Plan",
  "slug": "example-plan",
  "description": "Illustrative configuration.",
  "full_access": false,
  "predictive_paywall": false,
  "predictive_percents": 0,
  "can_own_teams": false,
  "priority": 1,
  "private": true,
  "active": false,
  "extra": {
    "label": "example"
  },
  "public": false,
  "subscriptions": [],
  "team_subscriptions": []
}

Alternative: Normalized slug already exists

HTTP 409 response:

{
  "error": "invalid_slug",
  "error_description": "Slug field must be unique",
  "req_guid": "synthetic-request-reference"
}

This slug check precedes creation, but other errors can follow writes.

Recovery

HTTP statusAPI code / shapeCauseNext action
409incorrect_data / Body must be json formatMissing/falsy parsed JSON body.Send the intended JSON object with required title.
409invalid_title / validation messageMissing/invalid/trimmed-empty title.Correct the reported title constraint.
409invalid_slug / Slug field must be uniqueNonempty normalized slug already used in the publication.Select the intended unique slug; check existing configuration first.
409invalid_taxonomies, invalid_content_type, tax/rule field error or exceptionShared-record/rule processing failed; some branches exit after writes begin.Inspect stored Plan/rules with the integration operator before retrying.
404 / 412incorrect_subscription / Subscription does not exist; incorrect_term / Term empty objectTeam choice missing or taxonomy terms empty after processing began.Inspect state; reconstruct complete intended sets only after resolving the reported input.
412 / varieserror / Unknown error, or uncaught/runtime/transport failureOther failure, potentially after commit or outside normalized handling.Do not infer rollback or retry blindly; inspect persisted state and request reference.

See shared errors. Read the Plan for saved configuration; downstream queue work is separate.

Update Plan configuration

PUT /api/v1/admin/plans/{id}

Change a known Plan within the selected publication.

Before you call

Use support, admin or partner token, or root, with the publication key and Plan ID. Supplied extra replaces the whole object; supplied rule/team arrays replace link sets, with [] clearing them. Rules can change shared taxonomy/term labels. Select linked team choices from the intended publication/customer catalog and confirm eligibility separately. Review write behavior before replacing sets.

The example changes title and extra, leaving relationship arrays omitted. String 0 is rejected with invalid_id. Other digit IDs reach this route; nondigit paths do not guarantee its JSON errors.

Request

Send a JSON object. Omitted/null title preserves it; a supplied title is validated. See scalar and rule differences for predictive nulls, slug generation and paired limits. subscriptions does not create or replace owned catalog choices. Pagination, filter and sort inputs are ignored.

Response

HTTP 200 returns the detailed Plan. Percentage changes can mark work before commit; guest access work can be queued after commit. These attempts do not confirm recalculation or delivery. An error can follow persisted changes.

Example: Change title and replace extra

Assume Plan 5001 has the create scenario’s values and no relationships. extra becomes {label:revised}; omitted old properties are removed. No rule/team array is sent.

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

{
  "id": 5001,
  "title": "Example revised Plan",
  "slug": "example-plan",
  "description": "Illustrative configuration.",
  "full_access": false,
  "predictive_paywall": false,
  "predictive_percents": 0,
  "can_own_teams": false,
  "priority": 1,
  "private": true,
  "active": false,
  "extra": {
    "label": "revised"
  },
  "public": false,
  "subscriptions": [],
  "team_subscriptions": []
}

Alternative: Plan absent from this publication

HTTP 409 response:

{
  "error": "invalid_id",
  "error_description": "Plan not found",
  "req_guid": "synthetic-request-reference"
}

Update uses invalid_id/409, while delete uses plan_not_found/404 for a missing publication Plan. Neither establishes global absence.

Recovery

HTTP statusAPI code / shapeCauseNext action
409invalid_id / Empty plan id or Plan not foundEmpty/string 0 ID or no matching Plan in publication.Check the known Plan ID and publication.
409incorrect_data / Body must be json format or Incorrect methodFalsy parsed body or wrong method if action reached.Use the registered PUT route and intended JSON object.
409invalid_{field}, invalid_taxonomies, invalid_content_type, tax_term_duplicate or exceptionScalar/rule validation, duplicate rule settings or processing failure.Correct the reported input; inspect persisted configuration before repeating any replacement set.
409invalid_content_type_access_limit_period or invalid_term_{field}Rule-period or predictive validation. Content-type predictive errors also use invalid_term_ prefix.Apply the exact period/range/pair semantics; inspect prior writes before retrying.
404 / 412incorrect_subscription / Subscription does not exist; incorrect_term / Term empty objectMissing team choice or empty taxonomy terms during helper processing.Inspect state and complete intended relationships; no unchanged-state guarantee.
500 / variesexception / message, or uncaught/runtime/transport failureOther error, including possible postcommit failure.Retain request reference and inspect stored Plan/rules before retry; do not assume rollback.

See shared errors. Read the Plan and compare scalar, rule and linked-choice settings.

Delete a Plan and its catalog subscriptions

DELETE /api/v1/admin/plans/{id}

Attempt to delete the Plan’s own subscriptions, then the Plan. This is destructive catalog removal, not soft deletion, reader cancellation, refund or migration.

Before you call

Use support, admin or partner token, or root, with the publication key and numeric Plan ID. Any linked membership/history can block removal, including inactive or expired memberships. Child subscription guards also check invitations, promos, sponsorships and default user/guest/downgrade settings. These are not an exhaustive dependency/cascade check.

Review dependencies first. Earlier child deletions can precede a later failure; errors after commit can follow removal. Inspect state before repeating. Another call may return not found. Guest access-queue attempts do not confirm recalculation.

Request

Send the path and headers. Body, filter, pagination and sort inputs are ignored. Digit IDs become integers. String 0 returns invalid_key / Empty plan id. Nondigit paths do not guarantee this JSON error shape.

Response

HTTP 200 returns this field, apart from shared response metadata:

FieldType / presenceMeaning
resultBoolean; addedParent Plan delete result. It is not a per-child deletion report, complete cascade audit, queue acknowledgment or proof memberships/payments were canceled.

result can be false without an exception. HTTP 200 does not confirm every dependency was removed.

Example: Delete an intentionally disposable Plan

Assume fictional Plan 5001 belongs to this publication, has no blocking dependencies and permits both child and parent deletion.

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

Illustrative HTTP 500 from a guarded child-subscription failure:

{
  "error": "exception",
  "error_description": "The subscription cannot be deleted because users have a subscription history associated with it.",
  "req_guid": "synthetic-request-reference"
}

Plan delete wraps this caught guard as exception/500 rather than 409. Resolve the blocking dependency with your operator before retrying.

Recovery

HTTP statusAPI code / shapeCauseNext action
409invalid_key / Empty plan idEmpty/string 0 ID.Use the known numeric Plan ID.
404plan_not_found / Plan not foundNo Plan matches ID/publication, including an already removed Plan.Inspect known configuration; do not infer global absence or repeat deletion blindly.
500exception / guard messageMembership/history, invitation, promo, sponsorship or default-setting guard blocked a catalog delete.Inspect the reported dependency with the integration operator; do not treat it as cancellation or permission to erase history.
200result:falseParent delete result was false.Inspect persisted Plan and child records before deciding any next action.
500 / variesexception / message or uncaught/runtime/transport failureOther error, possibly after earlier child attempts or commit.Inspect persisted state and retain request reference; no rollback/full-cascade/safe-retry guarantee.

See shared errors. Browse Plans to inspect remaining configuration.

Scalar request fields

Send a JSON object using the fields below. extra uses your application’s keys.

FieldInput type / validationCreate and update behavior
titleText; required on create, optional on update; length 1–250, sanitized/trimmed nonemptyUpdate omitted/null preserves it; supplied whitespace-only title is rejected.
slugText when nonnull; length 1–64 before normalizationTransliterated/lowercased/hyphen-normalized; nonempty normalized slug must be unique within the publication. Create omitted/null or normalized-empty value leads to title-ID generation after saving. Update does not assign an omitted/null/normalized-empty slug, but the model can still generate title-ID when the stored slug is empty. No global uniqueness or arbitrary-text preservation guarantee.
descriptionStored value; assigned when nonnullOmitted/null is not assigned; no automatic clearing promise.
privateBoolean inputSets private when nonnull.
publicBoolean inputSets private to its inverse, after private. If both are supplied, public wins.
active, full_access, can_own_teamsBoolean inputsAssigned when nonnull; omitted/null preserves existing update values. These flags do not validate linked-choice eligibility or assign membership.
priorityNumeric validation then integer conversionAssigned when nonnull. Choose the intended integer ranking.
predictive_paywallBoolean input when property is presentOmission leaves it alone; explicit null is processed, unlike ordinary nonnull-only fields.
predictive_percentsNumeric 0–100 when property is present; converted to floatExplicit null enters validation; do not assume it means preserve or zero. A changed value can initiate related predictive-work updates; completion is separate.
extraJSON objectWhole-object assignment; no merge. Omitted/null/array/scalar is ignored by this assignment.

Use JSON booleans. After string/lowercase/trim filtering, empty values and literal false become false; a nonempty word such as off does not.

Send material creation flags explicitly; omitted defaults depend on stored schema. settings, resource_id and a generic subscriptions field are not assigned as configuration. This body does not create catalog subscriptions.

Rule arrays and linked team choices

These arrays can change shared records or replace links. The ordinary update example omits them.

InputEntry fields / constraintsEffect
taxonomies[]key; optional nonempty title; nonempty terms[] for each processed taxonomyMissing/falsy taxonomy key is skipped, but final set cleanup still applies. Known taxonomy key lookup is publication-scoped; missing records can be created. A supplied nonempty title can rename the shared taxonomy.
taxonomies[].terms[]key; provide intended title; rule fields belowTerm key is required. Its title is assigned and saved even for an existing term; omission is not a preservation promise. Missing publication terms/junctions can be created. Other Plan term-rule links absent from the supplied set are removed, while shared taxonomy/term/junction records are not deleted by that cleanup.
content_types[]key; rule fields belowKey required, trimmed for publication lookup; missing type can be created. Matching Plan/type link is updated, others outside the supplied set removed.
team_subscriptions[]subscription_id or id; optional users_limit converted to integerClears old choices first. A nonzero integer value after filtering subscription_id takes precedence, otherwise id is used. Entries with neither are skipped. Missing referenced subscription returns 404 incorrect_subscription after clearing may have begun. Provide the complete intended set with appropriate users_limit values and confirmed team eligibility; repeated entries are not a uniqueness guarantee.

Rule entries use these fields:

Rule fieldInput type / presenceMeaning and precedence
limitLiteral JSON false has special handlingClears stored access_limit and access_limit_period. Other values do not establish a separate limit mode.
access_limit + access_limit_periodBoth must be nonnull to assign the pairLimit is converted to integer; choose the intended limit explicitly. Period matches /^[\d]{1,4}\s(day|month|year|week|hours|minute)$/i: one to four digits, one whitespace character and one listed word. This does not establish calendar-to-seconds conversion. If both are supplied with limit:false, the pair assignment follows and can override the clear. One supplied without the other does not independently update the pair.
excludeBoolean input; nonnullStored exclusion flag, not an immediate access decision.
predictive_percentsProperty present; numeric 0–100, float conversionCan initiate related predictive-work updates when changed; completion is separate.
predictive_paywallProperty present; boolean filteringStored predictive-rule flag, not a retraining request or result.

Array processing can change shared records or remove links before a later entry fails. Invalid entry types, skipped keys, duplicates and invalid rules can leave partial results. Returned stored-null access limits become integer 0, not necessarily null.

Create/update response fields

Both writes return detailed Plan fields rather than list counts. Start with the 14 Plan fields, with these additions:

Returned objectType / presenceMeaning
PlanTop-level fieldsid,title,slug,description,full_access,predictive_paywall,predictive_percents,can_own_teams,priority,private,active,extra,public,subscriptions. Types follow the linked table. No Plan timestamps, resource_id or settings.
subscriptions[]Array; always presentOwn general subscriptions, with compact Plans, next/downgrade objects as defined there, and conditional Admin subscription timestamps/country_vat. These are full objects, not lightweight five-field choices.
taxonomies[] / content_types[]Arrays; key omitted without linksPlan-rule fields. Terms have id,key,title plus exclude/predictive_paywall booleans, predictive_percents float, access_limit integer and stored access_limit_period. Content types have id,key plus those five fields. Order is unspecified; confirm linked-record context and eligibility separately.
team_subscriptions[]Array; always present, empty if noneGeneral subscription with the expanded immediate Plan, plus numeric users_limit, not remaining seats. The immediate Plan has 14 fields and five-field choices. Next/downgrade objects keep compact Plans and their own nesting limits.

No list aggregate fields are added. Rule keys can disappear after clearing. Linked choices are configuration, not activated memberships or confirmed eligibility.

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