Direct message or private message between users with sender/receiver information, content, message type, read status, and timestamps. Used for messaging systems, chat applications, and private communication platforms.
https://api.mockly.codes/messages?page=1&limit=10&count=10Configure your request and click Send Request to see the response here.
/messagesGet a collection of messages
/social/messages/messages/:idGet a single message by ID
/social/messages/:id/messages/metaGet resource metadata and schema
/social/messages/metaThe search feature allows you to filter results by searching for text across all or specific fields. Choose between ?q= or ?search= parameter names.
Search across all text fields:
GET https://api.mockly.codes/messages?q=laptopGET https://api.mockly.codes/messages?q=laptop&search_fields=name,descriptionsearch_fields, all text fields are searched// Get 10 messages
fetch('https://api.mockly.codes/messages?count=10')
.then(res => res.json())
.then(data => console.log(data));import requests
response = requests.get(
'https://api.mockly.codes/messages?count=10'
)
data = response.json()curl "https://api.mockly.codes/messages?count=10"fetch('https://api.mockly.codes/messages?nocache=true')idintegerUnique identifier for the message
random_intconversation_idintegerForeign key reference to the conversation this message belongs to
random_intsender_idintegerForeign key reference to the user who sent the message
random_intsender_namestringFull name of the message sender
namereceiver_idintegerForeign key reference to the user who receives the message
random_intreceiver_namestringFull name of the message receiver
namecontentstringMessage text content
sentencetypestringMessage type (e.g., text, image, file, system)
message_typereadbooleanWhether the message has been read by the receiver
booleancreated_atstringTimestamp when the message was sent
past_datedate-timeread_atstringTimestamp when the message was read, null if unread
past_datedate-timecountintegerNumber of items to return (default: 10, max: 100)
seedintegerSeed for reproducible data generation
nocachebooleanBypass cache and generate fresh data on every request