Go to developer

Partner 2FA / Start enrollment

Start enrollment

POST/v1/identities/enroll

Creates an enrollment session and returns enrollmentUrl (present as a QR). Poll until completed, then authenticate.

Authentication

SERVER ONLY

Bearer clientId:clientSecretServer secret required.

Request

Request body

Content-Type: application/json · required

  • externalUserIdstringrequired
  • projectIdstring (uuid)required
  • returnUrlstringnullable

Response

201 Enrollment session created

  • enrollmentIdstringrequired
  • enrollmentUrlstringrequired
  • expiresInintegerrequired
  • identityIdstringrequired
  • pollUrlstringrequired
  • statusstringrequired

409 Already enrolled

  • detailsobject
  • errorstringrequired
  • messagestringrequired

Errors

ErrorHTTPMeaningFix
already_enrolled409Identity already enrolledCall get status; use authentication challenge instead Diagnose →
invalid_return_url400returnUrl origin does not match project callbackAlign returnUrl origin with project callback URL Diagnose →

SDK equivalent

Examples

Bash
curl -X POST "https://auth.keyra.ie/v1/identities/enroll" \
  -H "Authorization: Bearer CLIENT_ID:CLIENT_SECRET" \
  -H "Content-Type: application/json" \
  -d '{"projectId":"11111111-1111-1111-1111-111111111111","externalUserId":"user_12345"}'

Response

response.jsonJSON
{
  "enrollmentId": "string",
  "enrollmentUrl": "string",
  "expiresIn": 0,
  "identityId": "string",
  "pollUrl": "string",
  "status": "string"
}