Submit a configured event

Submit an existing public event name with a value and optional application data. The HTTP result describes completion of the Wallkit submission path; it does not certify queue acceptance or downstream handling.

TaskOperation
Submit a public configured eventSubmit event

Example clients and synthetic values follow response conventions.

Submit an event

POST /api/v1/user/event

Submit an event for the resolved resource and optional member. Wallkit validates the name against its configured public event list, builds request context and attempts to send a queue message. This is not an inbound webhook receiver or an outbound webhook delivery contract.

Before you call

A valid resource is required; guest submission is permitted. A member token is optional and selects identity through the existing session context. There is no active-member requirement in this event initializer. Existing configured Firebase handling can affect identity; see credential transport.

Obtain an existing public event name from the integration owner. Validation uses a cached global list of Events whose private flag is false, without a resource filter; it does not establish which downstream handler exists for this resource. No complete event-name enum or cache lifetime is supplied here.

Request

Send a JSON object.

NameLocationType / requirementMeaning / constraints
resourceheaderresource public key; requiredSelects the resolved resource.
tokenheaderoptional member session tokenSelects the resolved member, when present; not required for guest submission.
nameJSONnonempty string; requiredLowercased and stripped of tags; must match a configured public event name.
valueJSONnonempty string; requiredLowercased and stripped of tags. Use text; no Boolean or numeric value schema is established.
dataJSONoptional application objectNested custom data, object-cast; defaults to an empty object. No event-specific nested schema or field allowlist is enforced here.
content_keyJSONoptional nonempty stringTrimmed content reference; this action does not validate article existence or grant access.
custom_recipient_emailJSONoptional nonempty stringEmail-filtered, lowercased and trimmed; no dedicated email-validity check or delivery guarantee.

Top-level user_id, resource_id and session_id are not caller selectors. Wallkit supplies resolved identity/session and request IP, user-agent, referrer, host and language. Nested data does not override those top-level values. Queue processing adds an event timestamp. Omit unrelated top-level fields; they are not forwarded by this action.

Result

HTTP 200 with the following field:

FieldType / presenceMeaning
resultBoolean trueSubmission path returned. It is not a queue acknowledgment, event-handler outcome or delivery receipt.

The queue helper catches send failures, and the event wrapper discards its result. No message ID is returned. A repeat request attempts another send; no deduplication, ordering, retry or delivery contract is established. Other initialization failures may still surface without an action-specific error shape.

Example: Submit a guest preference event

Assume the integration owner has already configured the synthetic public name example_preference_saved. It is not a built-in event name. This request deliberately omits a member token, so it does not select a Wallkit member by a body ID.

curl -X POST "${WALLKIT_API_BASE}/api/v1/user/event" \
  -H "resource: ${RESOURCE_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"name": "example_preference_saved", "value": "enabled", "data": {"source": "example preference form"}}'
const response = await fetch(`${process.env.WALLKIT_API_BASE}/api/v1/user/event`, {
  method: "POST", headers: { "resource": process.env.RESOURCE_KEY, "Content-Type": "application/json" },
  body: JSON.stringify({"name": "example_preference_saved", "value": "enabled", "data": {"source": "example preference form"}})
});
console.log(response.status, await response.json());
import os, json
from urllib.request import Request, urlopen
from urllib.error import HTTPError

body = {'name': 'example_preference_saved', 'value': 'enabled', 'data': {'source': 'example preference form'}}
request = Request(os.environ["WALLKIT_API_BASE"] + "/api/v1/user/event",
    data=json.dumps(body).encode("utf-8"), headers={"resource": os.environ["RESOURCE_KEY"], "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))

Synthetic HTTP 200 excerpt:

{
  "result": true
}

The application can record that the submission path returned. It cannot infer that a downstream subscription, email or membership change happened.

Consequential alternate

For an unknown or unavailable public name, a synthetic HTTP 409 response is:

{
  "error": "invalid_event_name",
  "error_description": "Event with this name not found",
  "req_guid": "example-request"
}

Change the name only after checking the owner-supplied configuration. A public-list lookup failure can produce the same response; do not invent a replacement event name.

Recovery

HTTP statusCode / shapeCauseNext action
409invalid_event_name / The event name is requiredMissing/empty name.Send the owner-supplied public event name.
409invalid_event_name / Event with this name not foundName absent from public cached list, or lookup failed.Confirm the configured public name and selected integration with the owner.
409invalid_event_value / The event value is requiredMissing/empty value.Send meaningful nonempty text for this configured event.
404resource_not_exists / Incorrect resource keyInvalid resolved resource.Check the resource public key; changing the event name will not repair it.
200result:true without a receiptSend failure can be caught inside the queue helper.Use separate application/owner evidence for downstream effects; do not blindly repeat, since duplication is possible.

Send valid JSON. Missing or malformed input can reach name validation; do not depend on a universal 406 malformed-body response for this action.

Next task

Choose the next operation according to the application’s actual job. For provider preferences, read Mailchimp interests; for article delivery, use the separate content-access walkthrough. Neither follows automatically from an event response.

Follow the task guide

Read the Event tickets: submit a configured event for request order, context choices and response decisions.

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