QueryFind user by phone number

Find user by phone number

Looks up a user by their phone number in D1. Returns 404 if no user has that number. Unlike /users/by-email this never creates a user — a phone number alone is not enough to provision one.

curl -X GET "https://api.spkey.co/users/by-phone?phoneNumber=%2B1-555-0123" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN (JWT)" \
  -H "X-API-Key: YOUR_API_KEY"
{
  "uuid": "example_string",
  "email": "user@example.com",
  "phoneNumber": "null",
  "created_at": "example_string"
}
GET
/users/by-phone
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
phoneNumberstring
Required

Phone number to look up (exact match)

Min length: 1
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

phoneNumberstring
Required

Phone number to look up (exact match)

Responses

uuidstring
Required
emailstring
Required
phoneNumberstring,null
Required
created_atstring
Required