API Reference
AuthenticationPOST

Submit Passkey credential response

Submits the complete browser-generated WebAuthn credential response as a serialized JSON string when a WhatsApp QR flow reports passkey_required. Never write the credential response to logs.

https://api.unifyport.ai/v1/accounts/{account_id}/auth/passkey-response

Headers

X-Api-Key
stringrequired

Workspace API key. The workspace is resolved from this header.

Content-Type
stringrequired

Use application/json when sending a JSON request body.

Path parameters

account_id
stringrequired

Identifier used in the authentication route.

Request body

webauthn_response
stringrequired

Complete browser-generated WebAuthn credential response serialized as a JSON string. Treat it as sensitive and never log it.

minLength: 1

Response body

account_id
string

Provider account this response refers to.

status
string

Current authorization flow status, for example pending_auth, awaiting_qr_scan, awaiting_code, pending, passkey_required, passkey_pending, passkey_confirmation, passkey_confirmation_sent, authorized, or failed.

auth_status
string

Normalized authentication state returned by the Passkey action.

Responses

200
200 OK

Request succeeded. See the example response body.

400
Bad Request

The request body, path, or parameters are invalid.

401
Unauthorized

The X-Api-Key header is missing or invalid.

409
Conflict

The requested operation conflicts with an existing provider account or resource.

500
Internal Server Error

The service encountered an unexpected error.

502
Bad Gateway

The provider adapter or upstream provider could not complete the operation.

Request

curl -X POST https://api.unifyport.ai/v1/accounts/{account_id}/auth/passkey-response \
  -H "X-Api-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "webauthn_response": "{\"id\":\"<CREDENTIAL_ID>\",\"response\":{\"clientDataJSON\":\"<BASE64URL>\"}}"
}'

Response

{
  "data": {
    "account_id": "acc_example",
    "status": "passkey_pending",
    "auth_status": "passkey_pending"
  }
}