Contacts
SDK reference for contacts operations
Overview
Manage user contacts - list, add, remove, search, block, and unblock contacts
- Category:
internal - Auth Required: No
- Supported Modes: standard, delegated, service
Operations
listContacts
Get a list of all accepted contacts for the user with their profile information
Arguments:
limit(number, optional): Maximum number of contacts to return (default: 100)offset(number, optional): Number of contacts to skip for pagination (default: 0)
Returns:
object - List of contacts with pagination info
Example:
getContact
Get detailed information about a specific contact by their ID or username
Arguments:
contactId(string, optional): The contact user ID (MongoDB ObjectId)username(string, optional): The contact username
Returns:
object - Contact information
Example:
addContact
Send a contact request to another user by their username
Arguments:
username(string, required): Username of the user to add as a contact
Returns:
object - Contact request details
Example:
removeContact
Remove a user from your contacts list (unfriend)
Arguments:
contactId(string, optional): The contact user ID to removeusername(string, optional): The contact username to remove
Returns:
object - Removal confirmation
Example:
searchContacts
Search your contacts by username, email, phone, or wallet address
Arguments:
query(string, required): Search query - can be username, email, phone, or wallet addresssearchType(string, optional): Type of search to perform: all, username, email, phone, or wallet (default: all)limit(number, optional): Maximum number of results (default: 20)
Returns:
object - Search results with matching contacts
Example:
blockContact
Block a user (prevents them from contacting you)
Arguments:
contactId(string, optional): The user ID to blockusername(string, optional): The username to block
Returns:
object - Block confirmation
Example:
unblockContact
Unblock a previously blocked user
Arguments:
contactId(string, optional): The user ID to unblockusername(string, optional): The username to unblock
Returns:
object - Unblock confirmation
Example:
getBlockedContacts
Get a list of all users you have blocked
Arguments:
limit(number, optional): Maximum number of results (default: 100)offset(number, optional): Number of items to skip for pagination (default: 0)
Returns:
object - List of blocked users with pagination
Example:
getContactRequests
Get pending contact requests (sent by you or received from others)
Arguments:
type(string, optional): Type of requests to retrieve: all, sent, or received (default: all)status(string, optional): Filter by request status: pending, accepted, or rejected (default: pending)
Returns:
object - List of contact requests
Example: