Authorizations
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.
Authentication using App Api Key
Header:
Authorization: Bearer {api_key}Authenticated Request
curl \
-X GET https://api.moonkey.fun/v1/auth/users/user_24wFP9pDa9YiMJLun94iKykoZs2 \
-H "Authorization: Bearer sk_test_pRqweh3wvWmJAAVYv7Z0T5iPLzFM4ql0muoyQcjOxGeN3p1r"Path Parameters
Unique User ID of the user to update.
Body
First name of the user.
1Middle name of the user.
1Last name of the user.
1List of Emails to attach to the user.
1List of E.164 formatted mobile phone numbers to attach to the user.
1A flexible JSON object for storing custom data about a user. You can store any arbitrary data as key-value pairs.
Update Behavior:
- By default, metadata updates are merged at the top level only
- Send
nullvalues for specific fields to delete those fields (merge mode only) - Send
{}(empty object) to clear all metadata - Send
nullfor the metadata field itself will be ignored (as if metadata was not sent) - Deeply nested objects and arrays are NOT merged - they replace the entire top-level key
- Set
replace_metadata: trueto replace all metadata without merging
Controls how metadata is updated:
- If
false(default): Merges provided metadata with existing metadata at the top level only - If
true: Completely replaces all existing metadata (fields not in the request are removed)
false