Get unified inbox
Retrieve all swap requests for the user (both sent and received) in a unified inbox sorted by latest messages with optional filtering and sorting
GET
/api/v1/inbox
curl \
--request GET 'http://localhost:8080/api/v1/inbox?userId=string'
Response examples (500)
{
"error": {
"code": "string",
"message": "string",
"target": "string",
"details": [
{
"code": "string",
"message": "string",
"target": "string"
}
]
}
}
Response examples (401)
{
"error": {
"code": "string",
"message": "string",
"target": "string",
"details": [
{
"code": "string",
"message": "string",
"target": "string"
}
]
}
}
Response examples (403)
{
"error": {
"code": "string",
"message": "string",
"target": "string",
"details": [
{
"code": "string",
"message": "string",
"target": "string"
}
]
}
}
Response examples (200)
[
{
"id": "string",
"swapType": "string",
"swapStatus": "string",
"note": "string",
"requestedAt": "2025-05-04T09:42:00Z",
"updatedAt": "2025-05-04T09:42:00Z",
"sender": {
"id": "string",
"name": "string"
},
"receiver": {
"id": "string",
"name": "string"
},
"bookToSwapWith": {
"id": "string",
"title": "string",
"author": "string",
"condition": "string"
},
"swapOffer": {
"offeredBookTitle": "string",
"offeredGenreName": "string"
},
"askForGiveaway": true,
"unreadMessageCount": 42,
"hasNewMessages": true,
"conversationType": "string",
"unread": true
}
]