auth
Version 0.1.010 opérations
Log in with email and password (and TOTP when enabled); sets the session cookie
POST/auth/login
401 invalid_credentials, 403 totp_required when 2FA is on and the code is missing or wrong, 429 too_many_attempts.
Paramètres
Aucun paramètre.
Corps de la requête application/json
emailstringobligatoirepasswordstring (password)obligatoiretotpstringSix digit TOTP code, required when 2FA is enabled
Réponses
200
userUserDtoobligatoireidstring (uuid)obligatoireemailstringobligatoirefirstNamestringobligatoirelastNamestringobligatoirephonestring | nullobligatoireplatformRolestringobligatoire- enum: "merchant", "konnect_admin", "konnect_support", "konnect_compliance"
totpEnabledbooleanobligatoire
membershipsMembershipSummaryDto[]obligatoireorganisationIdstring (uuid)obligatoireorganisationNamestringobligatoireroleIdstring (uuid)obligatoirerolestring | nullobligatoirePredefined role key, null for a custom role
roleNamestringobligatoireisOwnerbooleanobligatoirepermissionsstring[]obligatoirescopestringobligatoire- enum: "all", "accounts"
accountIdsstring[]obligatoirePayment account ids when scope is "accounts"
Exemples de code
curl -X POST "$KONNECT_API_URL/auth/login" \
-H "Content-Type: application/json" \
-d '{
"email": "demo@konnect.test",
"password": "password",
"totp": "totp"
}'Exemple : corps de la requête
{
"email": "demo@konnect.test",
"password": "password",
"totp": "totp"
}Exemple : 200
{
"user": {
"id": "id",
"email": "buyer@example.com",
"firstName": "Salma",
"lastName": "Example",
"phone": "phone",
"platformRole": "merchant",
"totpEnabled": true
},
"memberships": [
{
"organisationId": "org_01J9Z3K4EXAMPLE0000000000",
"organisationName": "organisationName",
"roleId": "roleId",
"role": "role",
"roleName": "roleName",
"isOwner": true,
"permissions": [
"payments.view"
],
"scope": "all",
"accountIds": [
"string"
]
}
]
}End the current session and clear the cookie
POST/auth/logoutSession du tableau de bord
Paramètres
Aucun paramètre.
Réponses
204
Exemples de code
curl -X POST "$KONNECT_API_URL/auth/logout" \
-H "Cookie: konnect_session=$KONNECT_SESSION"Current user and memberships with role, permissions and scope
GET/auth/meSession du tableau de bord
Paramètres
Aucun paramètre.
Réponses
200
userUserDtoobligatoireidstring (uuid)obligatoireemailstringobligatoirefirstNamestringobligatoirelastNamestringobligatoirephonestring | nullobligatoireplatformRolestringobligatoire- enum: "merchant", "konnect_admin", "konnect_support", "konnect_compliance"
totpEnabledbooleanobligatoire
membershipsMembershipSummaryDto[]obligatoireorganisationIdstring (uuid)obligatoireorganisationNamestringobligatoireroleIdstring (uuid)obligatoirerolestring | nullobligatoirePredefined role key, null for a custom role
roleNamestringobligatoireisOwnerbooleanobligatoirepermissionsstring[]obligatoirescopestringobligatoire- enum: "all", "accounts"
accountIdsstring[]obligatoirePayment account ids when scope is "accounts"
Exemples de code
curl -X GET "$KONNECT_API_URL/auth/me" \
-H "Cookie: konnect_session=$KONNECT_SESSION"Exemple : 200
{
"user": {
"id": "id",
"email": "buyer@example.com",
"firstName": "Salma",
"lastName": "Example",
"phone": "phone",
"platformRole": "merchant",
"totpEnabled": true
},
"memberships": [
{
"organisationId": "org_01J9Z3K4EXAMPLE0000000000",
"organisationName": "organisationName",
"roleId": "roleId",
"role": "role",
"roleName": "roleName",
"isOwner": true,
"permissions": [
"payments.view"
],
"scope": "all",
"accountIds": [
"string"
]
}
]
}Re-authenticate with the password or a TOTP code; valid for 10 minutes
POST/auth/reauthSession du tableau de bord
Paramètres
Aucun paramètre.
Corps de la requête application/json
passwordstring (password)totpstringSix digit TOTP code
Réponses
200
reauthenticatedUntilstring (date-time)obligatoire
Exemples de code
curl -X POST "$KONNECT_API_URL/auth/reauth" \
-H "Cookie: konnect_session=$KONNECT_SESSION" \
-H "Content-Type: application/json" \
-d '{
"password": "password",
"totp": "totp"
}'Exemple : corps de la requête
{
"password": "password",
"totp": "totp"
}Exemple : 200
{
"reauthenticatedUntil": "2026-10-01T09:30:00.000Z"
}Send a one-time password reset link (always 202, whether the email exists or not)
POST/auth/password/forgot
Paramètres
Aucun paramètre.
Corps de la requête application/json
emailstringobligatoire
Réponses
202
Exemples de code
curl -X POST "$KONNECT_API_URL/auth/password/forgot" \
-H "Content-Type: application/json" \
-d '{
"email": "demo@konnect.test"
}'Exemple : corps de la requête
{
"email": "demo@konnect.test"
}Set a new password with a reset token; ends every session
POST/auth/password/reset
Paramètres
Aucun paramètre.
Corps de la requête application/json
tokenstringobligatoirepasswordstring (password)obligatoire- minLength: 10
Réponses
204
Exemples de code
curl -X POST "$KONNECT_API_URL/auth/password/reset" \
-H "Content-Type: application/json" \
-d '{
"token": "token",
"password": "password"
}'Exemple : corps de la requête
{
"token": "token",
"password": "password"
}Start TOTP enrolment (requires re-authentication)
POST/auth/totp/setupSession du tableau de bord
Paramètres
Aucun paramètre.
Réponses
200
secretstringobligatoireBase32 secret, shown once for manual entry
otpauthUrlstringobligatoireotpauth:// URL for a QR code
Exemples de code
curl -X POST "$KONNECT_API_URL/auth/totp/setup" \
-H "Cookie: konnect_session=$KONNECT_SESSION"Exemple : 200
{
"secret": "secret",
"otpauthUrl": "otpauthUrl"
}Confirm TOTP enrolment with a first code
POST/auth/totp/enableSession du tableau de bord
Paramètres
Aucun paramètre.
Corps de la requête application/json
codestringobligatoireSix digit TOTP code
Réponses
204
Exemples de code
curl -X POST "$KONNECT_API_URL/auth/totp/enable" \
-H "Cookie: konnect_session=$KONNECT_SESSION" \
-H "Content-Type: application/json" \
-d '{
"code": "code"
}'Exemple : corps de la requête
{
"code": "code"
}Turn TOTP off (requires re-authentication and a current code)
POST/auth/totp/disableSession du tableau de bord
Paramètres
Aucun paramètre.
Corps de la requête application/json
codestringobligatoireSix digit TOTP code
Réponses
204
Exemples de code
curl -X POST "$KONNECT_API_URL/auth/totp/disable" \
-H "Cookie: konnect_session=$KONNECT_SESSION" \
-H "Content-Type: application/json" \
-d '{
"code": "code"
}'Exemple : corps de la requête
{
"code": "code"
}Identity of the API key used for the request
GET/auth/api-keyClé API
Paramètres
Aucun paramètre.
Réponses
200
organisationIdstring (uuid)obligatoireapiKeyIdstring (uuid)obligatoire
Exemples de code
curl -X GET "$KONNECT_API_URL/auth/api-key" \
-H "x-api-key: $KONNECT_API_KEY"Exemple : 200
{
"organisationId": "org_01J9Z3K4EXAMPLE0000000000",
"apiKeyId": "apiKeyId"
}