Skip to content

Establish a new authentication inquiry for an application.

POST
/establish
curl --request POST \
--url https://connect-api.sudomimus.com/establish \
--header 'Content-Type: application/json' \
--data '{ "applicationAnchor": "example", "authenticationConstraints": [ { "method": "PASSKEY_USERNAMELESS", "payload": {}, "accessTokenTtlSeconds": 1, "refreshTokenTtlSeconds": 1 } ], "realizeConstraints": [ { "constraintType": "EMAIL", "payload": { "allowedEmails": [ "example" ] }, "accessTokenTtlSeconds": 1, "refreshTokenTtlSeconds": 1 } ], "returnMethods": [ { "type": "CALLBACK", "payload": { "callbackUrl": "example" } } ] }'

Creates a new authentication inquiry under the calling application.

The request MUST carry a client-auth JWT in the Authorization header using the SudomimusClientJWT scheme. The JWT binds the request body bytes via a body_sha256 claim and carries a single-use jti to prevent replay. See the SudomimusClientJWT security scheme below for the full claim contract.

All three narrowing fields (authenticationConstraints, realizeConstraints, returnMethods) are optional. When absent the inquiry imposes no per-inquiry narrowing on that layer. When present the array MUST be non-empty — an empty array is explicitly rejected with HTTP 400.

Media type application/json
object
applicationAnchor
required

Public anchor identifying the integrating application.

string
authenticationConstraints

Optional per-inquiry narrowing of the application’s authentication-rule layer. Absent means no narrowing. If present, the array MUST be non-empty; empty arrays are rejected with 400.

Array<object>
object
method
required

Which authentication method this constraint narrows to.

string
Allowed values: PASSKEY_USERNAMELESS PASSKEY_REASONED EMAIL_VERIFICATION STEAM_TICKET STEAM_OPENID ACCESS_KEY_DIRECT GOOGLE_OAUTH GITHUB_OAUTH DISCORD_OAUTH BATTLENET_OAUTH X_OAUTH
payload
required
One of:

Empty payload — narrows to usernameless (discoverable-credential) passkey login, the “Sign in with a passkey” entry shown before any email is entered. Realize authorization is still decided by Layer 2.

object
accessTokenTtlSeconds

Per-constraint override for access token lifetime. Resolved at realize time.

integer
refreshTokenTtlSeconds

Per-constraint override for refresh token lifetime. Resolved at realize time.

integer
realizeConstraints

Optional per-inquiry narrowing of the application’s realize-rule layer. Absent means no narrowing. If present, the array MUST be non-empty; empty arrays are rejected with 400.

Array<object>
object
constraintType
required

Which realize-rule kind this constraint narrows to.

string
Allowed values: EMAIL STEAM_ID ACCOUNT_ALIAS SECTOR_SUBJECT
payload
required
One of:
object
allowedEmails
required

List of email addresses or glob patterns the realized identity must match. Glob patterns are bounded by server-side limits to prevent regex backtracking attacks.

Array<string>
accessTokenTtlSeconds

Per-constraint override for access token lifetime. Resolved at realize time.

integer
refreshTokenTtlSeconds

Per-constraint override for refresh token lifetime. Resolved at realize time.

integer
returnMethods

Optional per-inquiry return-method declaration. Doubles as the concrete delivery info for CALLBACK (carries the callback URL). Absent means no per-inquiry narrowing (CALLBACK is unreachable for this inquiry because no URL is anchored). If present, the array MUST be non-empty; empty arrays are rejected with 400.

Array
One of: discriminator: type
object
type
required
string
Allowed values: CALLBACK
payload
required
object
callbackUrl
required

Concrete callback URL for this inquiry. The host MUST match one of the application’s allowed callback domains.

string

Inquiry established.

Media type application/json
object
applicationAnchor
required
string
exposureKey
required

Public half of the inquiry key pair; safe to share with the user agent.

string
hiddenKey
required

Private half of the inquiry key pair; must stay on the originating client.

string
Example generated
{
"applicationAnchor": "example",
"exposureKey": "example",
"hiddenKey": "example"
}

Client-auth JWT missing, malformed, expired, or invalid.

Media type application/json

Error response body. The Connect service emits { "reason": "<SymbolDescription>" } for known failure modes. When the reason symbol’s description begins with PRIVATE, the body is empty (zero bytes) and only the HTTP status carries signal — both reason and the body itself are absent in that case.

object
reason

Stable machine-readable reason code.

string
Example generated
{
"reason": "example"
}

Application is disabled. Reason ApplicationDisabled.

Media type application/json

Error response body. The Connect service emits { "reason": "<SymbolDescription>" } for known failure modes. When the reason symbol’s description begins with PRIVATE, the body is empty (zero bytes) and only the HTTP status carries signal — both reason and the body itself are absent in that case.

object
reason

Stable machine-readable reason code.

string
Example generated
{
"reason": "example"
}

Error response.

Media type application/json

Error response body. The Connect service emits { "reason": "<SymbolDescription>" } for known failure modes. When the reason symbol’s description begins with PRIVATE, the body is empty (zero bytes) and only the HTTP status carries signal — both reason and the body itself are absent in that case.

object
reason

Stable machine-readable reason code.

string
Example generated
{
"reason": "example"
}