docs
Get startedTroubleshootingPaymentsWebhooksAgent paymentsSwop MCPOviIdentity (swop.id)SwivyRPC (preview)API reference
API reference

OIDC (Sign in with Swop)

Discovery, JWKS, authorize, token, userinfo and logout for an issuer environment.

Preview: not generally available

Swivy runs in staging only. Paths and fields can change before general availability. There is no public base URL yet; preview partners get theirs with their credentials.

Standard OpenID Connect routes, one issuer per environment, keyed by that environment's appId.

11 endpoints, generated from Swivy's OpenAPI document (apps/api/src/openapi.ts).

Fetch the OIDC discovery document

GET/oidc/{appId}/.well-known/openid-configuration

Parameters

appIdstring (path)Required
Environment app identifier

Responses: 200 OIDC discovery document · 404 Issuer environment not found

Fetch the issuer JWKS

GET/oidc/{appId}/jwks

Parameters

appIdstring (path)Required
Environment app identifier

Responses: 200 OIDC JWKS · 404 Issuer environment not found

Request an email code for the hosted OIDC login flow

POST/oidc/{appId}/login/email/request

Parameters

appIdstring (path)Required
Environment app identifier

Request body: Email login payload

emailstringRequired
Format: email.
externalUserIdstring

Responses: 200 Email code issued for OIDC login · 404 Issuer environment not found · 502 Verification email delivery failed

Verify an email code and establish the hosted OIDC session

POST/oidc/{appId}/login/email/verify

Parameters

appIdstring (path)Required
Environment app identifier

Request body: Email verification payload

emailstringRequired
Format: email.
codestringRequired
externalUserIdstring

Responses: 200 Runtime session and hosted OIDC session · 401 Invalid email code · 404 Issuer environment not found

Request a wallet-login challenge for the hosted OIDC login flow

POST/oidc/{appId}/login/wallet/request

Used by the hosted Swivy login page to prove control of an external EVM or Solana wallet before continuing the OIDC authorize flow.

Parameters

appIdstring (path)Required
Environment app identifier

Request body: Wallet login request payload

chainstringRequired
One of `evm`, `solana`.
addressstringRequired
connectorTypestring
Wallet connector label such as injected, privy, coinbase, or phantom.
externalUserIdstring
Optional customer-side stable user identifier to attach to the Swivy identity.

Responses: 200 Wallet login challenge · 404 Issuer environment not found

Verify a wallet-login signature and establish the hosted OIDC session

POST/oidc/{appId}/login/wallet/verify

Parameters

appIdstring (path)Required
Environment app identifier

Request body: Wallet login verification payload

challengeIdstringRequired
chainstringRequired
One of `evm`, `solana`.
addressstringRequired
signaturestringRequired
EVM personal_sign signature, or Solana signature encoded as base58 or base64.

Responses: 200 Runtime session and hosted OIDC session · 401 Invalid wallet signature · 404 Issuer environment not found

POST/oidc/{appId}/authorize/consent

Used by the hosted Swivy authorize UI to record a consent decision and continue the authorization code flow.

Parameters

appIdstring (path)Required
Environment app identifier

Request body: Hosted consent decision payload

client_idstringRequired
redirect_uristringRequired
Format: uri.
scopestringRequired
statestring
noncestring
code_challengestring
code_challenge_methodstring
One of `S256`.
decisionstringRequired
One of `approve`, `deny`.
rememberboolean

Responses: 200 Consent decision redirect target · 400 Invalid consent request · 401 Login required · 404 Issuer environment not found

End the hosted OIDC session

GET/oidc/{appId}/logout

Clears the hosted Swivy OIDC session cookie and revokes the matching runtime session when one is present. Supports a post-logout redirect to a registered client redirect URI.

Parameters

appIdstring (path)Required
Environment app identifier
client_idstring (query)
OIDC client identifier
post_logout_redirect_uristring (query)
Format: uri.
statestring (query)
Opaque client state value echoed to the post-logout redirect

Responses: 200 Hosted logout result or confirmation page · 302 Redirect to the validated post-logout callback URL · 400 Invalid logout request · 404 Issuer environment not found

Run the OIDC authorization code flow

GET/oidc/{appId}/authorize

If a matching Swivy runtime session is not already present, this route can render the hosted email and wallet login page or return login_required. If login exists but consent is still required, it can render the hosted consent page or return consent_required.

Parameters

appIdstring (path)Required
Environment app identifier
response_typestring (query)Required
One of `code`.
client_idstring (query)Required
OIDC client identifier
redirect_uristring (query)Required
Format: uri.
scopestring (query)Required
Space-delimited scopes
statestring (query)
Opaque client state value
noncestring (query)
Nonce echoed into the ID token
code_challengestring (query)
PKCE code challenge
code_challenge_methodstring (query)
One of `S256`.
promptstring (query)
OIDC prompt behavior
login_hintstring (query)
Prefilled email address for the hosted login screen
screen_hintstring (query)
One of `login`, `signup`.

Responses: 200 Hosted OIDC login page · 302 Redirect to the client callback with an authorization code or error · 400 Invalid authorize request or client · 401 Login required · 403 Consent required · 404 Issuer environment not found

Exchange an authorization code for OIDC tokens

POST/oidc/{appId}/token

Supports authorization_code and refresh_token grants plus public PKCE clients, client_secret_post, and client_secret_basic authentication.

Parameters

appIdstring (path)Required
Environment app identifier

Request body: OIDC token exchange payload

grant_typestringRequired
One of `authorization_code`, `refresh_token`.
codestring
redirect_uristring
Format: uri.
refresh_tokenstring
client_idstring
client_secretstring
code_verifierstring

Responses: 200 OIDC token response · 400 Invalid grant or token request · 401 Invalid client · 404 Issuer environment not found

Fetch OIDC userinfo claims

GET/oidc/{appId}/userinfo

Auth: Authorization: Bearer <access_token> (OIDC)

Parameters

appIdstring (path)Required
Environment app identifier

Responses: 200 OIDC userinfo response · 401 Invalid or missing OIDC access token · 404 Issuer environment not found

On this page