AdminFind users by email, phone number or user id

Find users by email, phone number or user id

Returns every users row matching exactly one key: email (case- and whitespace-insensitive), phone (E.164, any accepted international spelling) or userId (lower- or upper-case). Oldest first; more than one row only for legacy duplicates, and the first is the one the app resolves to. Never creates a user. Requires dual auth: X-Admin-API-Key + JWT.

curl -X GET "https://api.spkey.co/admin/users/lookup?email=user%40example.com&phone=%2B1-555-0123&userId=example_string" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN (JWT)" \
  -H "X-API-Key: YOUR_API_KEY"
{
  "by": "email",
  "value": "example_string",
  "total": 3.14,
  "users": [
    {
      "uuid": "example_string",
      "email": "null",
      "phoneNumber": "null",
      "createdAt": "example_string",
      "updatedAt": "example_string"
    }
  ]
}
GET
/admin/users/lookup
GET
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token (JWT)
Bearer Tokenstring
Required

JWT token from SmartphoneKey authentication. Identifies the B2C user or B2B service.

JWT token from SmartphoneKey authentication. Identifies the B2C user or B2B service.
API Key (header: X-API-Key)
X-API-Keystring
Required

API key for B2B organization access. Provided during organization onboarding.

API key for B2B organization access. Provided during organization onboarding.
query
emailstring

Email address; matched case- and whitespace-insensitively

Min length: 1
query
phonestring

Phone number in international form ("+48123456789" or "0048123456789"); matched on its E.164 form

query
userIdstring

b2c user UUID; lower- or upper-case

Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token (JWT). JWT token from SmartphoneKey authentication. Identifies the B2C user or B2B service.

header
X-API-Keystring
Required

API Key for authentication. API key for B2B organization access. Provided during organization onboarding.

Query Parameters

emailstring

Email address; matched case- and whitespace-insensitively

phonestring

Phone number in international form ("+48123456789" or "0048123456789"); matched on its E.164 form

userIdstring

b2c user UUID; lower- or upper-case

Responses

bystring
Required

Which key was searched

Allowed values:emailphoneuserId
valuestring
Required

The key as searched: lowercased email, E.164 phone number, or the UUID

totalnumber
Required

Number of rows returned (capped at 50)

usersarray
Required