Guest RSVP Endpoint

Route

POST /wp-json/extrachill/v1/events/{id}/guest-rsvp

Purpose

Lets a logged-out visitor RSVP to a perk-enabled event with only an email address. Thin adapter over the extrachill/guest-rsvp-event ability (extrachill-events), which resolves or creates a claimable account via extrachill/resolve-account-by-email (extrachill-users), marks the visitor Going, and emails the RSVP pass. When the account is unclaimed, that same email carries a set-password link.

Site affinity: events (the /extrachill/v1/events/ prefix).

Admission

  1. Cloudflare Turnstile (turnstile_response) via ec_turnstile_check_request().
  2. Shared per-client public-write rate limit, scope guest-rsvp, default 5 per minute (filter extrachill_api_guest_rsvp_rate_limit).

The ability itself is show_in_rest: false; this route is its only public write boundary.

Request

FieldTypeRequiredNotes
idinteger (path)YesEvent post ID. Forwarded as event_id.
emailstringYesSanitized with sanitize_email().
turnstile_responsestringYes in productionConsumed by admission, never forwarded.
referrerstringNoExternal referrer URL for attribution.
utmobjectNoOnly utm_* keys are forwarded, as sanitized text.

Response

Success is always opaque:

json
{ "status": "rsvped" }

The response never includes the pass code, the user ID, or whether the email already had an account. The pass and any claim link arrive by email only.

Errors

CodeStatusWhen
turnstile_missing_token / turnstile_failed403Missing or invalid Turnstile token.
public_write_rate_limited429Over the per-client budget.
invalid_email400Not a valid email.
event_not_found404Not a published event.
guest_rsvp_unavailable403 / 503Event has no RSVP perk, or a dependency is missing.
guest_rsvp_closed410Event is in the past.
guest_rsvp_failed500Generic failure; no account details are exposed.