curl --request POST \
--url https://api.moonkey.fun/v1/auth/users/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"limit": 100,
"filters": {
"operator": "OR",
"fields": [
{
"field": "phone_number_match",
"operator": "eq",
"value": "2222222"
}
]
}
}
'{
"users": [
{
"user_id": "user_24wFP9pDa9YiMJLun94iKykoZs2",
"app_id": "app_24ydphdixx2ydhF0E5WUFUKWNqi",
"first_name": "John",
"middle_name": "",
"last_name": "Smith",
"active": true,
"updated_at": 1639873806,
"created_at": 1639873806,
"emails": [
{
"id": "email_24oXBL3PufzHkH1Jzyjc2EXYeo7",
"verified": false,
"email": "[email protected]",
"updated_at": 1639873806,
"created_at": 1639873806
}
],
"phone_numbers": [
{
"id": "pn_24oXBLRv6BoHXbNZoTAZkAFlRsy",
"verified": true,
"phone_number": "+14152222222",
"updated_at": 1643004687,
"created_at": 1639873806
}
],
"wallets": [
{
"id": "wallet_24tdfcVDSJQpK5huDnZaqPP2aiI",
"app_id": "app_24ydphdixx2ydhF0E5WUFUKWNqi",
"user_id": "user_24wFP9pDa9YiMJLun94iKykoZs2",
"public_address": "0xd3EfC42956c546Cf27B5f18062c63B4BF6d72D7c",
"wallet_type": "ethereum",
"is_default": true,
"updated_at": 1640133104,
"created_at": 1640133104
}
],
"totps": [
{
"id": "totp_284EPXPYI5zZoh4pp2mpAQ2PnuY",
"user_id": "user_24wFP9pDa9YiMJLun94iKykoZs2",
"verified": false,
"updated_at": 1650467433,
"created_at": 1650467433
}
]
}
],
"total_count": 10,
"has_more": false
}Search users within an App.
POST /v1/auth/users/search
A successful response returns a list of User objects in users property and also pagination related properties.
curl --request POST \
--url https://api.moonkey.fun/v1/auth/users/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"limit": 100,
"filters": {
"operator": "OR",
"fields": [
{
"field": "phone_number_match",
"operator": "eq",
"value": "2222222"
}
]
}
}
'{
"users": [
{
"user_id": "user_24wFP9pDa9YiMJLun94iKykoZs2",
"app_id": "app_24ydphdixx2ydhF0E5WUFUKWNqi",
"first_name": "John",
"middle_name": "",
"last_name": "Smith",
"active": true,
"updated_at": 1639873806,
"created_at": 1639873806,
"emails": [
{
"id": "email_24oXBL3PufzHkH1Jzyjc2EXYeo7",
"verified": false,
"email": "[email protected]",
"updated_at": 1639873806,
"created_at": 1639873806
}
],
"phone_numbers": [
{
"id": "pn_24oXBLRv6BoHXbNZoTAZkAFlRsy",
"verified": true,
"phone_number": "+14152222222",
"updated_at": 1643004687,
"created_at": 1639873806
}
],
"wallets": [
{
"id": "wallet_24tdfcVDSJQpK5huDnZaqPP2aiI",
"app_id": "app_24ydphdixx2ydhF0E5WUFUKWNqi",
"user_id": "user_24wFP9pDa9YiMJLun94iKykoZs2",
"public_address": "0xd3EfC42956c546Cf27B5f18062c63B4BF6d72D7c",
"wallet_type": "ethereum",
"is_default": true,
"updated_at": 1640133104,
"created_at": 1640133104
}
],
"totps": [
{
"id": "totp_284EPXPYI5zZoh4pp2mpAQ2PnuY",
"user_id": "user_24wFP9pDa9YiMJLun94iKykoZs2",
"verified": false,
"updated_at": 1650467433,
"created_at": 1650467433
}
]
}
],
"total_count": 10,
"has_more": false
}Auth Platform API includes all the Auth related features. All Users, Phone Numbers, Emails, and OTPs are associated with an App as the container.
Endpoints only accept App's Secret API keys other than certain endpoints that are used client side or via SDK that accept the public_token.
Authorization: Bearer {api_key}curl \
-X GET https://api.moonkey.fun/v1/auth/users/user_24wFP9pDa9YiMJLun94iKykoZs2 \
-H "Authorization: Bearer sk_test_pRqweh3wvWmJAAVYv7Z0T5iPLzFM4ql0muoyQcjOxGeN3p1r"Number of objects to return per response, must be between 10 to 100, defaults to 50.
A cursor for use in pagination. starting_after is an object ID that defines your place in the search result when there are more results to fit into a single response. For instance, if you make a search request with limit of 100 objects, ending with user_123, your subsequent call can include starting_after: user_123 in order to fetch the next page of the search result.
1Filters object to apply to the search.
Show child attributes
Required if filters property is present Logical operator to apply on the fields. Possible values: AND, OR.
1Optional List of field filter objects.
1Show child attributes
Field to filter the search by. Possible values:
user_id - Filter by the unique ID(s) of the user. Compatible with eq and in operators.status - Filter by the status of the user, accepted values: active, pending. Compatible with eq and in operators.full_name_match - Filter by the fuzzy match of the user's full name ({first_name} {last_name}). Compatible with eq operator.phone_number - Filter by associated the phone number(s) of the user. Compatible with eq and in operators.phone_number_id - Filter by the associated phone number ID(s) of the user. Compatible with eq and in operators.phone_number_match - Filter by the fuzzy match of the user's phone number(s). Compatible with eq operator.phone_number_verified - Filter by the verified flag of the user's associated phone number(s). Compatible with eq operator.email - Filter by the email of the user. Compatible with eq and in operators.email_id - Filter by the associated email ID(s) of the user. Compatible with eq and in operators.email_verified - Filter by the verified flag of the user's associated email(s). Compatible with eq operator.email_match - Filter by the fuzzy match of the user's email(s). Compatible with eq operator.wallet_public_address - Filter by the wallet public address of the user. Compatible with eq and in operators.wallet_id - Filter by the associated wallet ID(s) of the user. Compatible with eq and in operators.totp_id - Filter by the associated totp instance ID(s) of the user. Compatible with eq and in operators.totp_verified - Filter by the verified flag of the TOTP instance(s). Compatible with eq operator.idp_provider - Filter by the associated IdP/OAuth provider(s) of the user. Compatible with eq and in operators.user_id, status, full_name_match, phone_number, phone_number_id, phone_number_match, phone_number_verified, email, email_id, email_verified, email_match, wallet_public_address, wallet_id, totp_id, totp_verified, idp_provider 1Required Filter operator to apply for the field. Possible values: eq (translates to equals or = in SQL), between (translates to >= value AND <= second_value in SQL) , lt (translates to less than or < in SQL), gt (translates to greater than or > in SQL), in (translates to IN (value1, value2, ...) in SQL.)
1Optional Value to filter by and to be used with operators eq, between, lt, and gt.
1Optional Value to filter by and to be used with between operator.
1Optional Values to filter by and to be used with in operator.
Search Users (beta) response
Show child attributes
110Show child attributes
1111110Show child attributes
111111A flexible JSON object for storing custom data about a user. You can store any arbitrary data as key-value pairs.
Update Behavior:
null values for specific fields to delete those fields (merge mode only){} (empty object) to clear all metadatanull for the metadata field itself will be ignored (as if metadata was not sent)replace_metadata: true to replace all metadata without merging