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

NameTypeDescription
orgstringThe organization: its id (org_…) or its slug. It has to be an org your token can manage (see Who can call it)
pageIdstringThe page, pge_…

Body

FieldTypeRequiredDescription
namestringno1–120 characters, trimmed
slugstringnoa-z, 0-9 and -; up to 63 characters
typestringnolive, draft or unclaimed
customDomainstring | nullnoA bare hostname this org has verified. Clearable: null or "" removes it
clientIdstringnoA client of this org
kitIdstringnoA kit of this org
login_methodsobjectno{ password: boolean, magic_link: boolean, sso: string[] }, all three required. sso from google, ms, github, gitlab, linkedin, apple, x, meta
allow_registrationbooleanno
whitelabelbooleanno
localesstring[]noAt least one, each a locale we ship. Duplicates are dropped
legalobjectno{ 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

StatuserrorWhen
400invalid_requestAn empty body, an unknown field, or a value that fails validation. The detail names it
400invalid_requestclientId or kitId names nothing in this org, or customDomain is not a domain this org has verified
403forbiddenYou are not an owner of the org
404not_foundNo such page in this org, or the id is not a pge_ id
404not_foundThe 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"}'