Skip to content

Development environment: content is being written, nothing points to production.

Documentation contents

auth

Version 0.1.028 operations

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.

Parameters

No parameters.

Request body application/json

  • emailstringrequired
  • passwordstring (password)required
  • totpstring

    Six digit TOTP code, required when 2FA is enabled

Responses

  • 200

    • userMeUserDtorequired
      • idstring (uuid)required
      • emailstringrequired
      • firstNamestringrequired
      • lastNamestringrequired
      • phonestring | nullrequired
      • platformRolestringrequired
        • enum: "merchant", "konnect_admin", "konnect_support", "konnect_compliance", "konnect_commercial"
      • totpEnabledbooleanrequired
      • emailVerifiedbooleanrequired

        ONB-1: the e-mail address was proven by a code or a link

      • phoneVerifiedbooleanrequired

        ONB-1: the phone number was proven by an SMS code

      • passkeyCountnumberrequired

        Number of passkeys of the account (lot 1.2b)

    • sessionSessionInfoDtorequired
      • authMethodstringrequired
        • enum: "password", "password_totp", "passkey", "google", "apple", "facebook", "social_totp"
      • strongbooleanrequired

        Opened or confirmed by a passkey or a TOTP code

    • membershipsMembershipSummaryDto[]required
      • organisationIdstring (uuid)required
      • organisationNamestringrequired
      • roleIdstring (uuid)required
      • rolestring | nullrequired

        Predefined role key, null for a custom role

      • roleNamestringrequired
      • isOwnerbooleanrequired
      • permissionsstring[]required
      • scopestringrequired
        • enum: "all", "accounts"
      • accountIdsstring[]required

        Payment account ids when scope is "accounts"

Code samples

curl -X POST "$KONNECT_API_URL/auth/login" \
  -H "Content-Type: application/json" \
  -d '{
  "email": "demo@konnect.test",
  "password": "password",
  "totp": "totp"
}'

Example: request body

{
  "email": "demo@konnect.test",
  "password": "password",
  "totp": "totp"
}

Example: 200

{
  "user": {
    "id": "id",
    "email": "buyer@example.com",
    "firstName": "Salma",
    "lastName": "Example",
    "phone": "phone",
    "platformRole": "merchant",
    "totpEnabled": true,
    "emailVerified": true,
    "phoneVerified": true,
    "passkeyCount": 1
  },
  "session": {
    "authMethod": "password",
    "strong": 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/logoutAPI key

Parameters

No parameters.

Responses

  • 204

Code samples

curl -X POST "$KONNECT_API_URL/auth/logout" \
  -H "Authorization: Bearer $KONNECT_API_KEY"

Current user and memberships with role, permissions and scope

GET/auth/meAPI key

Parameters

No parameters.

Responses

  • 200

    • userMeUserDtorequired
      • idstring (uuid)required
      • emailstringrequired
      • firstNamestringrequired
      • lastNamestringrequired
      • phonestring | nullrequired
      • platformRolestringrequired
        • enum: "merchant", "konnect_admin", "konnect_support", "konnect_compliance", "konnect_commercial"
      • totpEnabledbooleanrequired
      • emailVerifiedbooleanrequired

        ONB-1: the e-mail address was proven by a code or a link

      • phoneVerifiedbooleanrequired

        ONB-1: the phone number was proven by an SMS code

      • passkeyCountnumberrequired

        Number of passkeys of the account (lot 1.2b)

    • sessionSessionInfoDtorequired
      • authMethodstringrequired
        • enum: "password", "password_totp", "passkey", "google", "apple", "facebook", "social_totp"
      • strongbooleanrequired

        Opened or confirmed by a passkey or a TOTP code

    • membershipsMembershipSummaryDto[]required
      • organisationIdstring (uuid)required
      • organisationNamestringrequired
      • roleIdstring (uuid)required
      • rolestring | nullrequired

        Predefined role key, null for a custom role

      • roleNamestringrequired
      • isOwnerbooleanrequired
      • permissionsstring[]required
      • scopestringrequired
        • enum: "all", "accounts"
      • accountIdsstring[]required

        Payment account ids when scope is "accounts"

Code samples

curl -X GET "$KONNECT_API_URL/auth/me" \
  -H "Authorization: Bearer $KONNECT_API_KEY"

Example: 200

{
  "user": {
    "id": "id",
    "email": "buyer@example.com",
    "firstName": "Salma",
    "lastName": "Example",
    "phone": "phone",
    "platformRole": "merchant",
    "totpEnabled": true,
    "emailVerified": true,
    "phoneVerified": true,
    "passkeyCount": 1
  },
  "session": {
    "authMethod": "password",
    "strong": 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/reauthAPI key

Parameters

No parameters.

Request body application/json

  • passwordstring (password)
  • totpstring

    Six digit TOTP code

Responses

  • 200

    • reauthenticatedUntilstring (date-time)required

Code samples

curl -X POST "$KONNECT_API_URL/auth/reauth" \
  -H "Authorization: Bearer $KONNECT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "password": "password",
  "totp": "totp"
}'

Example: request body

{
  "password": "password",
  "totp": "totp"
}

Example: 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

Parameters

No parameters.

Request body application/json

  • emailstringrequired

Responses

  • 202

Code samples

curl -X POST "$KONNECT_API_URL/auth/password/forgot" \
  -H "Content-Type: application/json" \
  -d '{
  "email": "demo@konnect.test"
}'

Example: request body

{
  "email": "demo@konnect.test"
}

Set a new password with a reset token; ends every session

POST/auth/password/reset

Parameters

No parameters.

Request body application/json

  • tokenstringrequired
  • passwordstring (password)required
    • minLength: 10

Responses

  • 204

Code samples

curl -X POST "$KONNECT_API_URL/auth/password/reset" \
  -H "Content-Type: application/json" \
  -d '{
  "token": "token",
  "password": "password"
}'

Example: request body

{
  "token": "token",
  "password": "password"
}

Start TOTP enrolment (requires re-authentication)

POST/auth/totp/setupAPI key

Parameters

No parameters.

Responses

  • 200

    • secretstringrequired

      Base32 secret, shown once for manual entry

    • otpauthUrlstringrequired

      otpauth:// URL for a QR code

Code samples

curl -X POST "$KONNECT_API_URL/auth/totp/setup" \
  -H "Authorization: Bearer $KONNECT_API_KEY"

Example: 200

{
  "secret": "secret",
  "otpauthUrl": "otpauthUrl"
}

Confirm TOTP enrolment with a first code

POST/auth/totp/enableAPI key

Parameters

No parameters.

Request body application/json

  • codestringrequired

    Six digit TOTP code

Responses

  • 204

Code samples

curl -X POST "$KONNECT_API_URL/auth/totp/enable" \
  -H "Authorization: Bearer $KONNECT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "code": "code"
}'

Example: request body

{
  "code": "code"
}

Turn TOTP off (requires re-authentication and a current code)

POST/auth/totp/disableAPI key

Parameters

No parameters.

Request body application/json

  • codestringrequired

    Six digit TOTP code

Responses

  • 204

Code samples

curl -X POST "$KONNECT_API_URL/auth/totp/disable" \
  -H "Authorization: Bearer $KONNECT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "code": "code"
}'

Example: request body

{
  "code": "code"
}

Identity of the API key used for the request

GET/auth/api-keyAPI key

Parameters

No parameters.

Responses

  • 200

    • organisationIdstring (uuid)required
    • apiKeyIdstring (uuid)required

Code samples

curl -X GET "$KONNECT_API_URL/auth/api-key" \
  -H "x-api-key: $KONNECT_API_KEY"

Example: 200

{
  "organisationId": "org_01J9Z3K4EXAMPLE0000000000",
  "apiKeyId": "apiKeyId"
}

Mobile app: log in with email and password (and TOTP when enabled)

POST/auth/mobile/login

401 invalid_credentials, 403 totp_required when 2FA is on and the code is missing or wrong, 429 too_many_attempts.

Parameters

No parameters.

Request body application/json

  • deviceNamestring
    • maxLength: 100
  • emailstringrequired
  • passwordstring (password)required
  • totpstring

    Six digit TOTP code, required when 2FA is enabled

Responses

  • 200

    • accessTokenstringrequired

      Send as Authorization: Bearer <accessToken>; lives one hour

    • accessTokenExpiresAtstring (date-time)required
    • refreshTokenstringrequired

      Single use: each refresh answers the next one

    • refreshTokenExpiresAtstring (date-time)required
    • meMeDtorequired
      • userMeUserDtorequired
        • idstring (uuid)required
        • emailstringrequired
        • firstNamestringrequired
        • lastNamestringrequired
        • phonestring | nullrequired
        • platformRolestringrequired
          • enum: "merchant", "konnect_admin", "konnect_support", "konnect_compliance", "konnect_commercial"
        • totpEnabledbooleanrequired
        • emailVerifiedbooleanrequired

          ONB-1: the e-mail address was proven by a code or a link

        • phoneVerifiedbooleanrequired

          ONB-1: the phone number was proven by an SMS code

        • passkeyCountnumberrequired

          Number of passkeys of the account (lot 1.2b)

      • sessionSessionInfoDtorequired
        • authMethodstringrequired
          • enum: "password", "password_totp", "passkey", "google", "apple", "facebook", "social_totp"
        • strongbooleanrequired

          Opened or confirmed by a passkey or a TOTP code

      • membershipsMembershipSummaryDto[]required
        • organisationIdstring (uuid)required
        • organisationNamestringrequired
        • roleIdstring (uuid)required
        • rolestring | nullrequired

          Predefined role key, null for a custom role

        • roleNamestringrequired
        • isOwnerbooleanrequired
        • permissionsstring[]required
        • scopestringrequired
          • enum: "all", "accounts"
        • accountIdsstring[]required

          Payment account ids when scope is "accounts"

Code samples

curl -X POST "$KONNECT_API_URL/auth/mobile/login" \
  -H "Content-Type: application/json" \
  -d '{
  "deviceName": "iPhone de Nour",
  "email": "demo@konnect.test",
  "password": "password",
  "totp": "totp"
}'

Example: request body

{
  "deviceName": "iPhone de Nour",
  "email": "demo@konnect.test",
  "password": "password",
  "totp": "totp"
}

Example: 200

{
  "accessToken": "accessToken",
  "accessTokenExpiresAt": "2026-10-01T09:30:00.000Z",
  "refreshToken": "refreshToken",
  "refreshTokenExpiresAt": "2026-10-01T09:30:00.000Z",
  "me": {
    "user": {
      "id": "id",
      "email": "buyer@example.com",
      "firstName": "Salma",
      "lastName": "Example",
      "phone": "phone",
      "platformRole": "merchant",
      "totpEnabled": true,
      "emailVerified": true,
      "phoneVerified": true,
      "passkeyCount": 1
    },
    "session": {
      "authMethod": "password",
      "strong": true
    },
    "memberships": [
      {
        "organisationId": "org_01J9Z3K4EXAMPLE0000000000",
        "organisationName": "organisationName",
        "roleId": "roleId",
        "role": "role",
        "roleName": "roleName",
        "isOwner": true,
        "permissions": [
          "payments.view"
        ],
        "scope": "all",
        "accountIds": [
          "string"
        ]
      }
    ]
  }
}

Mobile app: log in with Google, Apple or Facebook (existing accounts only)

POST/auth/mobile/social

The provider proves an e-mail address; the user with that address signs in. 401 invalid_provider_token, 403 provider_disabled, 422 provider_email_missing, 404 no_account, 403 totp_required (send the same token again with the code), 429 too_many_attempts, 503 provider_unavailable.

Parameters

No parameters.

Request body application/json

  • deviceNamestring
    • maxLength: 100
  • providerstringrequired
    • enum: "google", "apple", "facebook"
  • tokenstringrequired

    Google: the ID token. Apple: the identity token. Facebook: the access token. Never logged.

  • totpstring

    Six digit TOTP code, required when 2FA is enabled

Responses

  • 200

    • accessTokenstringrequired

      Send as Authorization: Bearer <accessToken>; lives one hour

    • accessTokenExpiresAtstring (date-time)required
    • refreshTokenstringrequired

      Single use: each refresh answers the next one

    • refreshTokenExpiresAtstring (date-time)required
    • meMeDtorequired
      • userMeUserDtorequired
        • idstring (uuid)required
        • emailstringrequired
        • firstNamestringrequired
        • lastNamestringrequired
        • phonestring | nullrequired
        • platformRolestringrequired
          • enum: "merchant", "konnect_admin", "konnect_support", "konnect_compliance", "konnect_commercial"
        • totpEnabledbooleanrequired
        • emailVerifiedbooleanrequired

          ONB-1: the e-mail address was proven by a code or a link

        • phoneVerifiedbooleanrequired

          ONB-1: the phone number was proven by an SMS code

        • passkeyCountnumberrequired

          Number of passkeys of the account (lot 1.2b)

      • sessionSessionInfoDtorequired
        • authMethodstringrequired
          • enum: "password", "password_totp", "passkey", "google", "apple", "facebook", "social_totp"
        • strongbooleanrequired

          Opened or confirmed by a passkey or a TOTP code

      • membershipsMembershipSummaryDto[]required
        • organisationIdstring (uuid)required
        • organisationNamestringrequired
        • roleIdstring (uuid)required
        • rolestring | nullrequired

          Predefined role key, null for a custom role

        • roleNamestringrequired
        • isOwnerbooleanrequired
        • permissionsstring[]required
        • scopestringrequired
          • enum: "all", "accounts"
        • accountIdsstring[]required

          Payment account ids when scope is "accounts"

Code samples

curl -X POST "$KONNECT_API_URL/auth/mobile/social" \
  -H "Content-Type: application/json" \
  -d '{
  "deviceName": "iPhone de Nour",
  "provider": "google",
  "token": "token",
  "totp": "totp"
}'

Example: request body

{
  "deviceName": "iPhone de Nour",
  "provider": "google",
  "token": "token",
  "totp": "totp"
}

Example: 200

{
  "accessToken": "accessToken",
  "accessTokenExpiresAt": "2026-10-01T09:30:00.000Z",
  "refreshToken": "refreshToken",
  "refreshTokenExpiresAt": "2026-10-01T09:30:00.000Z",
  "me": {
    "user": {
      "id": "id",
      "email": "buyer@example.com",
      "firstName": "Salma",
      "lastName": "Example",
      "phone": "phone",
      "platformRole": "merchant",
      "totpEnabled": true,
      "emailVerified": true,
      "phoneVerified": true,
      "passkeyCount": 1
    },
    "session": {
      "authMethod": "password",
      "strong": true
    },
    "memberships": [
      {
        "organisationId": "org_01J9Z3K4EXAMPLE0000000000",
        "organisationName": "organisationName",
        "roleId": "roleId",
        "role": "role",
        "roleName": "roleName",
        "isOwner": true,
        "permissions": [
          "payments.view"
        ],
        "scope": "all",
        "accountIds": [
          "string"
        ]
      }
    ]
  }
}

Mobile app: trade the refresh token for a new access token and the next refresh token

POST/auth/mobile/refresh

401 invalid_refresh_token (unknown, expired or revoked, or the user is no longer active), 401 refresh_token_reused (a used token presented again: every token of its family is revoked).

Parameters

No parameters.

Request body application/json

  • refreshTokenstringrequired

Responses

  • 200

    • accessTokenstringrequired

      Send as Authorization: Bearer <accessToken>; lives one hour

    • accessTokenExpiresAtstring (date-time)required
    • refreshTokenstringrequired

      Single use: each refresh answers the next one

    • refreshTokenExpiresAtstring (date-time)required
    • meMeDtorequired
      • userMeUserDtorequired
        • idstring (uuid)required
        • emailstringrequired
        • firstNamestringrequired
        • lastNamestringrequired
        • phonestring | nullrequired
        • platformRolestringrequired
          • enum: "merchant", "konnect_admin", "konnect_support", "konnect_compliance", "konnect_commercial"
        • totpEnabledbooleanrequired
        • emailVerifiedbooleanrequired

          ONB-1: the e-mail address was proven by a code or a link

        • phoneVerifiedbooleanrequired

          ONB-1: the phone number was proven by an SMS code

        • passkeyCountnumberrequired

          Number of passkeys of the account (lot 1.2b)

      • sessionSessionInfoDtorequired
        • authMethodstringrequired
          • enum: "password", "password_totp", "passkey", "google", "apple", "facebook", "social_totp"
        • strongbooleanrequired

          Opened or confirmed by a passkey or a TOTP code

      • membershipsMembershipSummaryDto[]required
        • organisationIdstring (uuid)required
        • organisationNamestringrequired
        • roleIdstring (uuid)required
        • rolestring | nullrequired

          Predefined role key, null for a custom role

        • roleNamestringrequired
        • isOwnerbooleanrequired
        • permissionsstring[]required
        • scopestringrequired
          • enum: "all", "accounts"
        • accountIdsstring[]required

          Payment account ids when scope is "accounts"

Code samples

curl -X POST "$KONNECT_API_URL/auth/mobile/refresh" \
  -H "Content-Type: application/json" \
  -d '{
  "refreshToken": "refreshToken"
}'

Example: request body

{
  "refreshToken": "refreshToken"
}

Example: 200

{
  "accessToken": "accessToken",
  "accessTokenExpiresAt": "2026-10-01T09:30:00.000Z",
  "refreshToken": "refreshToken",
  "refreshTokenExpiresAt": "2026-10-01T09:30:00.000Z",
  "me": {
    "user": {
      "id": "id",
      "email": "buyer@example.com",
      "firstName": "Salma",
      "lastName": "Example",
      "phone": "phone",
      "platformRole": "merchant",
      "totpEnabled": true,
      "emailVerified": true,
      "phoneVerified": true,
      "passkeyCount": 1
    },
    "session": {
      "authMethod": "password",
      "strong": true
    },
    "memberships": [
      {
        "organisationId": "org_01J9Z3K4EXAMPLE0000000000",
        "organisationName": "organisationName",
        "roleId": "roleId",
        "role": "role",
        "roleName": "roleName",
        "isOwner": true,
        "permissions": [
          "payments.view"
        ],
        "scope": "all",
        "accountIds": [
          "string"
        ]
      }
    ]
  }
}

Mobile app: end the access token and revoke its refresh tokens

POST/auth/mobile/logoutAPI key

Parameters

No parameters.

Request body application/json

  • refreshTokenstring

    Revokes this token family too

Responses

  • 204

Code samples

curl -X POST "$KONNECT_API_URL/auth/mobile/logout" \
  -H "Authorization: Bearer $KONNECT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "refreshToken": "refreshToken"
}'

Example: request body

{
  "refreshToken": "refreshToken"
}

Passkeys of the signed-in user

GET/auth/passkeysAPI key

Parameters

No parameters.

Responses

  • 200

    • idstring (uuid)required
    • namestringrequired
    • authenticatorstring | nullrequired

      Provider of the passkey when its AAGUID is known (iCloud Keychain, Windows Hello)

    • deviceTypestringrequired

      multiDevice: synced across the devices of the user

      • enum: "singleDevice", "multiDevice"
    • backedUpbooleanrequired
    • transportsstring[]required
    • createdAtstring (date-time)required
    • lastUsedAtstring (date-time) | nullrequired

Code samples

curl -X GET "$KONNECT_API_URL/auth/passkeys" \
  -H "Authorization: Bearer $KONNECT_API_KEY"

Example: 200

[
  {
    "id": "id",
    "name": "name",
    "authenticator": "authenticator",
    "deviceType": "singleDevice",
    "backedUp": true,
    "transports": [
      "string"
    ],
    "createdAt": "2026-10-01T09:30:00.000Z",
    "lastUsedAt": "2026-10-01T09:30:00.000Z"
  }
]

Start adding a passkey (requires re-authentication)

POST/auth/passkeys/registration/optionsAPI key

409 too_many_passkeys, 503 passkeys_misconfigured.

Parameters

No parameters.

Responses

  • 200

    • challengeIdstring (uuid)required

      Send it back with the response; single use, 5 minutes

    • optionsobjectrequired

      Options for navigator.credentials (JSON form), to pass to @simplewebauthn/browser

Code samples

curl -X POST "$KONNECT_API_URL/auth/passkeys/registration/options" \
  -H "Authorization: Bearer $KONNECT_API_KEY"

Example: 200

{
  "challengeId": "challengeId",
  "options": {}
}

Finish adding a passkey; e-mails the user (requires re-authentication)

POST/auth/passkeys/registration/verifyAPI key

400 invalid_challenge or passkey_verification_failed, 401 unknown_passkey or passkey_counter_regression, 503 passkeys_misconfigured. 409 passkey_already_registered.

Parameters

No parameters.

Request body application/json

  • challengeIdstring (uuid)required
  • responseobjectrequired

    The credential returned by the browser (JSON form)

  • namestring
    • maxLength: 64

Responses

  • 201

    • idstring (uuid)required
    • namestringrequired
    • authenticatorstring | nullrequired

      Provider of the passkey when its AAGUID is known (iCloud Keychain, Windows Hello)

    • deviceTypestringrequired

      multiDevice: synced across the devices of the user

      • enum: "singleDevice", "multiDevice"
    • backedUpbooleanrequired
    • transportsstring[]required
    • createdAtstring (date-time)required
    • lastUsedAtstring (date-time) | nullrequired

Code samples

curl -X POST "$KONNECT_API_URL/auth/passkeys/registration/verify" \
  -H "Authorization: Bearer $KONNECT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "challengeId": "challengeId",
  "response": {},
  "name": "MacBook de Leila"
}'

Example: request body

{
  "challengeId": "challengeId",
  "response": {},
  "name": "MacBook de Leila"
}

Example: 201

{
  "id": "id",
  "name": "name",
  "authenticator": "authenticator",
  "deviceType": "singleDevice",
  "backedUp": true,
  "transports": [
    "string"
  ],
  "createdAt": "2026-10-01T09:30:00.000Z",
  "lastUsedAt": "2026-10-01T09:30:00.000Z"
}

Start signing in with a passkey (discoverable credentials, no e-mail needed)

POST/auth/passkeys/login/options

429 too_many_attempts, 503 passkeys_misconfigured.

Parameters

No parameters.

Responses

  • 200

    • challengeIdstring (uuid)required

      Send it back with the response; single use, 5 minutes

    • optionsobjectrequired

      Options for navigator.credentials (JSON form), to pass to @simplewebauthn/browser

Code samples

curl -X POST "$KONNECT_API_URL/auth/passkeys/login/options"

Example: 200

{
  "challengeId": "challengeId",
  "options": {}
}

Sign in with a passkey; sets the session cookie (no TOTP step: strong sign-in)

POST/auth/passkeys/login/verify

400 invalid_challenge or passkey_verification_failed, 401 unknown_passkey or passkey_counter_regression, 503 passkeys_misconfigured. 429 too_many_attempts.

Parameters

No parameters.

Request body application/json

  • challengeIdstring (uuid)required
  • responseobjectrequired

    The credential returned by the browser (JSON form)

Responses

  • 200

    • userMeUserDtorequired
      • idstring (uuid)required
      • emailstringrequired
      • firstNamestringrequired
      • lastNamestringrequired
      • phonestring | nullrequired
      • platformRolestringrequired
        • enum: "merchant", "konnect_admin", "konnect_support", "konnect_compliance", "konnect_commercial"
      • totpEnabledbooleanrequired
      • emailVerifiedbooleanrequired

        ONB-1: the e-mail address was proven by a code or a link

      • phoneVerifiedbooleanrequired

        ONB-1: the phone number was proven by an SMS code

      • passkeyCountnumberrequired

        Number of passkeys of the account (lot 1.2b)

    • sessionSessionInfoDtorequired
      • authMethodstringrequired
        • enum: "password", "password_totp", "passkey", "google", "apple", "facebook", "social_totp"
      • strongbooleanrequired

        Opened or confirmed by a passkey or a TOTP code

    • membershipsMembershipSummaryDto[]required
      • organisationIdstring (uuid)required
      • organisationNamestringrequired
      • roleIdstring (uuid)required
      • rolestring | nullrequired

        Predefined role key, null for a custom role

      • roleNamestringrequired
      • isOwnerbooleanrequired
      • permissionsstring[]required
      • scopestringrequired
        • enum: "all", "accounts"
      • accountIdsstring[]required

        Payment account ids when scope is "accounts"

Code samples

curl -X POST "$KONNECT_API_URL/auth/passkeys/login/verify" \
  -H "Content-Type: application/json" \
  -d '{
  "challengeId": "challengeId",
  "response": {}
}'

Example: request body

{
  "challengeId": "challengeId",
  "response": {}
}

Example: 200

{
  "user": {
    "id": "id",
    "email": "buyer@example.com",
    "firstName": "Salma",
    "lastName": "Example",
    "phone": "phone",
    "platformRole": "merchant",
    "totpEnabled": true,
    "emailVerified": true,
    "phoneVerified": true,
    "passkeyCount": 1
  },
  "session": {
    "authMethod": "password",
    "strong": true
  },
  "memberships": [
    {
      "organisationId": "org_01J9Z3K4EXAMPLE0000000000",
      "organisationName": "organisationName",
      "roleId": "roleId",
      "role": "role",
      "roleName": "roleName",
      "isOwner": true,
      "permissions": [
        "payments.view"
      ],
      "scope": "all",
      "accountIds": [
        "string"
      ]
    }
  ]
}

Start a re-authentication with a passkey

POST/auth/passkeys/reauth/optionsAPI key

409 no_passkey, 503 passkeys_misconfigured.

Parameters

No parameters.

Responses

  • 200

    • challengeIdstring (uuid)required

      Send it back with the response; single use, 5 minutes

    • optionsobjectrequired

      Options for navigator.credentials (JSON form), to pass to @simplewebauthn/browser

Code samples

curl -X POST "$KONNECT_API_URL/auth/passkeys/reauth/options" \
  -H "Authorization: Bearer $KONNECT_API_KEY"

Example: 200

{
  "challengeId": "challengeId",
  "options": {}
}

Re-authenticate with a passkey; valid for 10 minutes, makes the session strong

POST/auth/passkeys/reauth/verifyAPI key

400 invalid_challenge or passkey_verification_failed, 401 unknown_passkey or passkey_counter_regression, 503 passkeys_misconfigured. 429 too_many_attempts.

Parameters

No parameters.

Request body application/json

  • challengeIdstring (uuid)required
  • responseobjectrequired

    The credential returned by the browser (JSON form)

Responses

  • 200

    • reauthenticatedUntilstring (date-time)required

Code samples

curl -X POST "$KONNECT_API_URL/auth/passkeys/reauth/verify" \
  -H "Authorization: Bearer $KONNECT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "challengeId": "challengeId",
  "response": {}
}'

Example: request body

{
  "challengeId": "challengeId",
  "response": {}
}

Example: 200

{
  "reauthenticatedUntil": "2026-10-01T09:30:00.000Z"
}

Rename a passkey

PATCH/auth/passkeys/{passkeyId}API key

404 passkey_not_found.

Parameters

  • passkeyIdstringpathrequired

Request body application/json

  • namestringrequired
    • minLength: 1
    • maxLength: 64

Responses

  • 200

    • idstring (uuid)required
    • namestringrequired
    • authenticatorstring | nullrequired

      Provider of the passkey when its AAGUID is known (iCloud Keychain, Windows Hello)

    • deviceTypestringrequired

      multiDevice: synced across the devices of the user

      • enum: "singleDevice", "multiDevice"
    • backedUpbooleanrequired
    • transportsstring[]required
    • createdAtstring (date-time)required
    • lastUsedAtstring (date-time) | nullrequired

Code samples

curl -X PATCH "$KONNECT_API_URL/auth/passkeys/passkeyId" \
  -H "Authorization: Bearer $KONNECT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Téléphone"
}'

Example: request body

{
  "name": "Téléphone"
}

Example: 200

{
  "id": "id",
  "name": "name",
  "authenticator": "authenticator",
  "deviceType": "singleDevice",
  "backedUp": true,
  "transports": [
    "string"
  ],
  "createdAt": "2026-10-01T09:30:00.000Z",
  "lastUsedAt": "2026-10-01T09:30:00.000Z"
}

Delete a passkey (requires re-authentication)

DELETE/auth/passkeys/{passkeyId}API key

404 passkey_not_found, 409 last_strong_factor.

Parameters

  • passkeyIdstringpathrequired

Responses

  • 204

Code samples

curl -X DELETE "$KONNECT_API_URL/auth/passkeys/passkeyId" \
  -H "Authorization: Bearer $KONNECT_API_KEY"

Public sign up settings: open or not, bot check, phone country code

GET/auth/signup/config

Parameters

No parameters.

Responses

  • 200

    • enabledbooleanrequired
    • captchaCaptchaConfigDtorequired
      • providerstringrequired
        • enum: "turnstile", "disabled"
      • siteKeystring | nullrequired

        Public Turnstile site key

    • defaultCountryCodestringrequired
    • passwordMinLengthnumberrequired

Code samples

curl -X GET "$KONNECT_API_URL/auth/signup/config"

Example: 200

{
  "enabled": true,
  "captcha": {
    "provider": "turnstile",
    "siteKey": "siteKey"
  },
  "defaultCountryCode": "+216",
  "passwordMinLength": 1
}

Create a merchant account (ONB-1); sets the session cookie and sends both codes

POST/auth/signup

400 validation_failed, invalid_phone, disposable_email; 403 captcha_failed, signup_disabled; 409 email_taken; 429 too_many_attempts; 503 captcha_not_configured.

Parameters

No parameters.

Request body application/json

  • firstNamestringrequired
  • lastNamestringrequired
  • emailstringrequired
  • phonestringrequired

    Any format; +216 when no country code

  • passwordstring (password)

    Absent: the account is opened for a passkey, registered right after (lot 1.2b)

    • minLength: 10
  • captchaTokenstring

    Cloudflare Turnstile token of the sign up form

  • localestring

    Language of the codes sent

    • enum: "fr", "en", "ar"
  • acquisitionobject

    Where the visitor came from (ref, utm_source...), journal only

Responses

  • 201

    • meMeDtorequired
      • userMeUserDtorequired
        • idstring (uuid)required
        • emailstringrequired
        • firstNamestringrequired
        • lastNamestringrequired
        • phonestring | nullrequired
        • platformRolestringrequired
          • enum: "merchant", "konnect_admin", "konnect_support", "konnect_compliance", "konnect_commercial"
        • totpEnabledbooleanrequired
        • emailVerifiedbooleanrequired

          ONB-1: the e-mail address was proven by a code or a link

        • phoneVerifiedbooleanrequired

          ONB-1: the phone number was proven by an SMS code

        • passkeyCountnumberrequired

          Number of passkeys of the account (lot 1.2b)

      • sessionSessionInfoDtorequired
        • authMethodstringrequired
          • enum: "password", "password_totp", "passkey", "google", "apple", "facebook", "social_totp"
        • strongbooleanrequired

          Opened or confirmed by a passkey or a TOTP code

      • membershipsMembershipSummaryDto[]required
        • organisationIdstring (uuid)required
        • organisationNamestringrequired
        • roleIdstring (uuid)required
        • rolestring | nullrequired

          Predefined role key, null for a custom role

        • roleNamestringrequired
        • isOwnerbooleanrequired
        • permissionsstring[]required
        • scopestringrequired
          • enum: "all", "accounts"
        • accountIdsstring[]required

          Payment account ids when scope is "accounts"

    • verificationVerificationStateDtorequired
      • emailChannelStateDtorequired
        • verifiedbooleanrequired
        • targetstring | nullrequired

          Masked address or number

        • resendAfterSecondsnumberrequired
      • phoneChannelStateDtorequired
        • verifiedbooleanrequired
        • targetstring | nullrequired

          Masked address or number

        • resendAfterSecondsnumberrequired
    • devCodesany

      Development and tests only (IDENTITY_LINKS_EXPOSED), never in production

Code samples

curl -X POST "$KONNECT_API_URL/auth/signup" \
  -H "Content-Type: application/json" \
  -d '{
  "firstName": "Amira",
  "lastName": "Ben Salah",
  "email": "amira@example.tn",
  "phone": "+216 20 123 456",
  "password": "password",
  "captchaToken": "captchaToken",
  "locale": "fr",
  "acquisition": {}
}'

Example: request body

{
  "firstName": "Amira",
  "lastName": "Ben Salah",
  "email": "amira@example.tn",
  "phone": "+216 20 123 456",
  "password": "password",
  "captchaToken": "captchaToken",
  "locale": "fr",
  "acquisition": {}
}

Example: 201

{
  "me": {
    "user": {
      "id": "id",
      "email": "buyer@example.com",
      "firstName": "Salma",
      "lastName": "Example",
      "phone": "phone",
      "platformRole": "merchant",
      "totpEnabled": true,
      "emailVerified": true,
      "phoneVerified": true,
      "passkeyCount": 1
    },
    "session": {
      "authMethod": "password",
      "strong": true
    },
    "memberships": [
      {
        "organisationId": "org_01J9Z3K4EXAMPLE0000000000",
        "organisationName": "organisationName",
        "roleId": "roleId",
        "role": "role",
        "roleName": "roleName",
        "isOwner": true,
        "permissions": [
          "payments.view"
        ],
        "scope": "all",
        "accountIds": [
          "string"
        ]
      }
    ]
  },
  "verification": {
    "email": "buyer@example.com",
    "phone": {
      "verified": true,
      "target": "target",
      "resendAfterSeconds": 1
    }
  },
  "devCodes": {
    "email": "buyer@example.com",
    "phone": "phone"
  }
}

Whether the e-mail and the phone of the account are verified

GET/auth/verificationsAPI key

Parameters

No parameters.

Responses

  • 200

    • emailChannelStateDtorequired
      • verifiedbooleanrequired
      • targetstring | nullrequired

        Masked address or number

      • resendAfterSecondsnumberrequired
    • phoneChannelStateDtorequired
      • verifiedbooleanrequired
      • targetstring | nullrequired

        Masked address or number

      • resendAfterSecondsnumberrequired

Code samples

curl -X GET "$KONNECT_API_URL/auth/verifications" \
  -H "Authorization: Bearer $KONNECT_API_KEY"

Example: 200

{
  "email": "buyer@example.com",
  "phone": {
    "verified": true,
    "target": "target",
    "resendAfterSeconds": 1
  }
}

Send a new six digit code; the address or number may be corrected first

POST/auth/verifications/{channel}/sendAPI key

400 invalid_phone, disposable_email; 409 already_verified, email_taken; 429 resend_too_soon, too_many_attempts.

Parameters

  • channelstringpathrequired
    • enum: "email", "phone"

Request body application/json

  • emailstring

    Corrected e-mail address (email channel, unverified only)

  • phonestring

    Corrected phone number (phone channel, unverified only)

  • localestring
    • enum: "fr", "en", "ar"

Responses

  • 202

    • channelstringrequired
      • enum: "email", "phone"
    • targetstringrequired

      Masked address or number

    • expiresAtstring (date-time)required
    • resendAfterSecondsnumberrequired
    • devCodestring

      Development and tests only, never in production

Code samples

curl -X POST "$KONNECT_API_URL/auth/verifications/email/send" \
  -H "Authorization: Bearer $KONNECT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "email": "buyer@example.com",
  "phone": "phone",
  "locale": "fr"
}'

Example: request body

{
  "email": "buyer@example.com",
  "phone": "phone",
  "locale": "fr"
}

Example: 202

{
  "channel": "email",
  "target": "target",
  "expiresAt": "2026-10-01T09:30:00.000Z",
  "resendAfterSeconds": 1,
  "devCode": "devCode"
}

Confirm the code received

POST/auth/verifications/{channel}/confirmAPI key

400 invalid_code (attemptsLeft), code_expired; 409 already_verified; 429 too_many_attempts.

Parameters

  • channelstringpathrequired
    • enum: "email", "phone"

Request body application/json

  • codestringrequired

Responses

  • 200

    • emailChannelStateDtorequired
      • verifiedbooleanrequired
      • targetstring | nullrequired

        Masked address or number

      • resendAfterSecondsnumberrequired
    • phoneChannelStateDtorequired
      • verifiedbooleanrequired
      • targetstring | nullrequired

        Masked address or number

      • resendAfterSecondsnumberrequired

Code samples

curl -X POST "$KONNECT_API_URL/auth/verifications/email/confirm" \
  -H "Authorization: Bearer $KONNECT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "code": "123456"
}'

Example: request body

{
  "code": "123456"
}

Example: 200

{
  "email": "buyer@example.com",
  "phone": {
    "verified": true,
    "target": "target",
    "resendAfterSeconds": 1
  }
}