Read the ID configuration for a site
const url = 'https://your-tenant-host/v1/id/config';const options = {method: 'GET', headers: {'x-edgekit-site-id': 'site_example'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://your-tenant-host/v1/id/config \ --header 'x-edgekit-site-id: site_example'Unauthenticated and edge-cacheable. Selects the site with the same header as every other route, and the response varies on it (Vary: x-edgekit-site-id) rather than being keyed by a query parameter — one site must never be served another’s descriptor from a shared cache. Carries no branding or copy: the organization resolves presentation before the browser. Answers * for any origin on Access-Control-Allow-Origin, unlike the rest of the surface, because the descriptor carries no credential and is public to anyone who can guess a site id. Cached for up to 5 minutes on a shared cache (s-maxage=300) and 1 minute in the browser (max-age=60) — a setting changed here, including idMode, can take up to 5 minutes to reach a client even though the server enforces the change immediately.
Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”The site this request is for, within this tenant. Every official EdgeKit SDK sets it from the client you configured; set it yourself only when calling this API directly.
Example
site_exampleThe site this request is for, within this tenant. Every official EdgeKit SDK sets it from the client you configured; set it yourself only when calling this API directly.
Responses
Section titled “Responses”The configuration a client needs to drive the flows.
object
object
Open: accept a member not listed. Known: magic-link, email-otp, google.
object
Open: accept a member not listed. Known: string, integer, number, boolean, list.
object
object
object
Open: accept a member not listed. Known: edgekit_only, external_only, dual.
Example
{ "methods": [ { "name": "magic-link", "registrationTraits": [ { "name": "job_industry", "type": "string", "label": "Industry", "required": false, "constraints": { "items": [ { "id": "01926f3a-8b51-7e99-9aaa-8b9c0d1e2f3a", "label": "Fashion", "externalId": "IND_FASHION" } ] } } ], "clientId": "1234.apps.googleusercontent.com" } ], "captcha": { "provider": "turnstile", "siteKey": "0x4AAAAAAA" }, "flow": { "otpLength": 6, "otpExpiresIn": 300, "magicLinkExpiresIn": 300, "resendCooldown": 60 }, "operations": [ "sign-in" ], "idMode": "edgekit_only"}Invalid request.
object
object
Example
{ "error": { "code": "unauthorized", "message": "Invalid or missing API key." }}Resource not found.
object
object
Example
{ "error": { "code": "unauthorized", "message": "Invalid or missing API key." }}Request validation failed.
object
object
Example
{ "error": { "code": "unauthorized", "message": "Invalid or missing API key." }}Unexpected error.
object
object
Example
{ "error": { "code": "unauthorized", "message": "Invalid or missing API key." }}