Update a page
Change a page's settings, the client it signs in to, or the kit it wears.
PATCH /organizations/{org}/pages/{pageId}
The body is the mask: the keys you send change, the rest stay as they are. Branding is not set here: it belongs to the kit. Point the page at another kit with kitId, edit the kit itself, or unlink the page to give it a kit of its own.
Authorization
Org owner. Anyone else gets 403 forbidden.
Path parameters
| Name | Type | Description |
|---|---|---|
org | string | The organization: its id (org_…) or its slug. It has to be an org your token can manage (see Who can call it) |
pageId | string | The page, pge_… |
Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | no | 1–120 characters, trimmed |
slug | string | no | a-z, 0-9 and -; up to 63 characters |
type | string | no | live, draft or unclaimed |
customDomain | string | null | no | A bare hostname this org has verified. Clearable: null or "" removes it |
clientId | string | no | A client of this org |
kitId | string | no | A kit of this org |
login_methods | object | no | { password: boolean, magic_link: boolean, sso: string[] }, all three required. sso from google, ms, github, gitlab, linkedin, apple, x, meta |
allow_registration | boolean | no | |
whitelabel | boolean | no | |
locales | string[] | no | At least one, each a locale we ship. Duplicates are dropped |
legal | object | no | { privacy_policy, terms_of_service, cookie_policy, legal_notice }, all four required, all https URLs |
At least one field is required.
Response
200 OK with the updated page, shaped as in List pages.
Errors
| Status | error | When |
|---|---|---|
400 | invalid_request | An empty body, an unknown field, or a value that fails validation. The detail names it |
400 | invalid_request | clientId or kitId names nothing in this org, or customDomain is not a domain this org has verified |
403 | forbidden | You are not an owner of the org |
404 | not_found | No such page in this org, or the id is not a pge_ id |
404 | not_found | The org does not exist, or your token cannot manage it |
Example
curl -X PATCH https://loginwith.loginwith.dev/organizations/acme/pages/pge_65f1c2a9e4b0d3f7a1c8e904 \
-H "Authorization: Bearer $TOKEN" -H "content-type: application/json" \
-d '{"type": "live", "customDomain": "login.acme.com"}'