{"id":"01KWTK2K4ENESPAXBNRKGV56CD","created":"2026-07-06T02:10:51.150Z","type":"published","schema_version":1,"data":{"kind":"getting_started","audience":"ai-agent","service":"Relayplex","summary":"The shortest path from an API key to (1) a live website and (2) a working web application on Relayplex. Every step is one HTTP call against https://api.relayplex.com with Authorization: Bearer rlpx_... unless marked as a human step. This is the pared-down version — the full reference with every option is api-reference.json.","canonical":"GET https://docs.relayplex.com/_relayplex/published/getting-started.json (machine copy; what agents should read).","human_view":"https://docs.relayplex.com/getting-started renders this same record for people.","full_reference":"GET https://docs.relayplex.com/_relayplex/published/api-reference.json","before_you_start":{"api_key":"(HUMAN STEP) A person signs in at https://app.relayplex.com and mints an agent API key (rlpx_...) from the console. That key is the only prerequisite — everything below is agent-drivable.","base_url":"https://api.relayplex.com","auth_header":"Authorization: Bearer rlpx_...","first_call":"GET /v1/limits — your plan's limits, entitlements, and the authoritative error-code list. Always read this before sizing work."},"first_website":{"goal":"A real, rendered page a browser can open at your own subdomain — two calls after the key.","steps":[{"n":1,"call":"GET /v1/limits","note":"Confirm maxSites headroom and read your plan's caps."},{"n":2,"call":"POST /v1/sites","request":"{ \"name\": \"My First Site\", \"subdomain\": \"my-first-site\" }","note":"Creates https://my-first-site.relayplex.com — live instantly, ZERO DNS steps (subdomains ride a wildcard). The response includes the siteId used in every later call."},{"n":3,"call":"PUT /v1/sites/:siteId/pages/index","request":"Body is the raw HTML (Content-Type: text/html). The 'index' route maps to the apex /.","note":"This is the hosting surface: pages render as HTML in a browser. Storing a published JSON record does NOT create a page — pages and buckets are separate surfaces that compose."},{"n":4,"call":"Open https://my-first-site.relayplex.com/ in a browser.","note":"Done. robots.txt, sitemap.xml, and /.well-known/api-catalog are auto-served for the site; push your own later to override."}],"go_deeper":"Recipe 'Put a real, rendered home page' in api-reference.json, plus the hosting and site_management sections."},"first_web_application":{"goal":"The same site, now interactive: it serves data you publish, and visitors can send data back — safely, with no secret in the page.","steps":[{"n":1,"call":"POST /v1/sites/:siteId/storage/published","request":"{ \"name\": \"catalog\", \"data\": { \"items\": [ { \"title\": \"Hello\" } ] } }","note":"published is the owner->world bucket: world-readable JSON at /_relayplex/published/catalog.json on your site. Confirm the write by reading the returned readPath."},{"n":2,"call":"Have your page fetch its own published record.","request":"fetch('/_relayplex/published/catalog.json')","note":"Same-origin, no auth, no CORS: the page renders whatever you publish. Update the record and the page updates."},{"n":3,"call":"POST /v1/sites/:siteId/storage/submissions/token","request":"{ \"forever\": true, \"label\": \"contact-form\" }","note":"Mints a capability token (rlpx_cap_...): append-only, scoped to this site's submissions, rate-limited (dailyMax defaults to 500/day for forever tokens) — safe to embed in the page. No master credential ever ships to a browser."},{"n":4,"call":"Embed a form that POSTs to /_relayplex/submit with the capability token.","request":"fetch('/_relayplex/submit', { method: 'POST', headers: { Authorization: 'Bearer rlpx_cap_...', 'Content-Type': 'application/json' }, body: JSON.stringify({ data: { email, message } }) })","note":"submissions is the world->owner bucket: append-only and owner-read-only, so a publicly readable contact form is impossible by construction."},{"n":5,"call":"GET /v1/sites/:siteId/storage/submissions","note":"Read what visitors sent (owner key only). Your application loop is closed: publish out, collect in."},{"n":6,"call":"(OPTIONAL, HUMAN STEP to enable) Gate paths behind logins.","note":"Site accounts add password logins, account types, and type-gated paths. Enabling them is the one human step — an owner/admin publishes the site auth-config from the console (agent keys get 401 there). After that, accounts, claims, sessions, and Stripe plan links are all agent-drivable. See site_accounts in api-reference.json and https://docs.relayplex.com/accounts."}],"go_deeper":"Recipes 'Register-for-feed / signup', 'Read + interact + write in one page', and 'Publish a JSON document' in api-reference.json."},"errors_you_might_hit":{"SITE_LIMIT_EXCEEDED":"Plan's maxSites reached — read GET /v1/limits.","SUBDOMAIN_TAKEN":"Pick another subdomain.","RATE_LIMITED":"Agent keys are burst-limited to 120 requests/min.","full_list":"The errors section of api-reference.json documents every code; GET /v1/limits returns the authoritative list."},"next":{"accounts":"https://docs.relayplex.com/accounts — end-user accounts, types, gated paths, Stripe billing.","hooks":"https://docs.relayplex.com/hooks — inbound webhook receiver (Pro and above).","jobs":"https://docs.relayplex.com/jobs — scheduled outbound HTTP (enabled by interview).","plans":"The plan_matrix section of api-reference.json holds per-plan limits; GET /v1/limits is your account's effective truth."}}}