Endpoint #
GET /rtcl/v1/my/chat
Description #
Returns a paginated list of chat conversations for the authenticated user.
Each conversation includes listing info, sender & recipient details, unread message count, and last message metadata.Authentication
Required
- Valid API authentication (JWT / nonce / API key as configured)
- User must be logged in
Required Headers #
| Header | Required | Description |
|---|---|---|
Authorization | ✅ Yes | JWT token: Bearer <JWT_TOKEN> |
X-API-KEY | ✅ Yes | API key from RTCL settings |
Content-Type | ✅ Yes | application/json |
Query Parameters #
| Parameter | Type | Default | Description |
|---|---|---|---|
| per_page | integer | 20 | Number of conversations per page |
| page | integer | 1 | Current page number |
Success Response (200 OK) #
Response Structure #
{
"data": [ConversationObject],
"pagination": PaginationObject
}
Conversation Object #
{
"con_id": 12,
"listing_id": 101,
"sender_id": 5,
"recipient_id": 2,
"sender_delete": false,
"recipient_delete": false,
"last_message_id": 55,
"sender_review": false,
"recipient_review": false,
"invert_review": false,
"created_at": "2026-01-20 10:30:00",
"updated_at": "2026-01-20 10:45:30",
"message": "Is this still available?",
"is_read": "0",
"source_id": "2",
"last_message": "Is this still available?",
"last_message_created_at": "2026-01-20 10:45:30",
"display_name": "Demo User",
"user_login": "demo_user",
"other_id": "5",
"listing": {
"id": 101,
"title": "Demo Apartment Listing",
"url": "https://example.com/listing/101",
"images": [],
"amount": "<div class=\"price\">$500</div>",
"raw_price": "500",
"location": [],
"category": [
{
"term_id": 10,
"name": "Apartments",
"slug": "apartments",
"taxonomy": "rtcl_category",
"parent": 0,
"count": 3
}
]
},
"unread_count": 1,
"sender": {
"id": 5,
"name": "Demo Sender",
"email": "sender@example.com",
"phone": "",
"whatsapp": "",
"website": "",
"profile_picture": "https://example.com/avatar-sender.jpg"
},
"recipient": {
"id": 2,
"name": "Demo Recipient",
"email": "recipient@example.com",
"phone": "",
"whatsapp": "",
"website": "",
"profile_picture": "https://example.com/avatar-recipient.jpg"
}
}
Field Explanation #
Conversation Fields #
| Field | Description |
|---|---|
| con_id | Unique conversation ID |
| sender_id | Message sender user ID |
| recipient_id | Message recipient user ID |
| sender_delete | Sender deleted conversation or not |
| recipient_delete | Recipient deleted conversation or not |
| last_message_id | Last message ID |
| is_read | Read status of last message |
| source_id | User ID who sent last message |
| unread_count | Total unread messages for logged-in user |
Listing Object #
| Field | Description |
|---|---|
| id | Listing ID |
| title | Listing title |
| url | Public listing URL |
| amount | Formatted price (HTML) |
| raw_price | Numeric price |
| category | Listing categories |
Sender / Recipient Object #
| Field | Description |
|---|---|
| id | User ID |
| name | Display name |
| Demo email | |
| phone | Phone number |
| WhatsApp number | |
| profile_picture | Avatar URL |
Pagination Object #
{
"total": 1,
"per_page": 20,
"current_page": 1,
"total_pages": 1
}
Error Responses #
1. Missing Authorization Header #
{
"status": "error",
"error": "MISSING_AUTHORIZATION_HEADER",
"code": "401",
"error_message": "Authorization header not received. Either authorization header was not sent or it was removed by your server due to security reasons."
}
2. Invalid Authorization Token Type #
{
"status": "error",
"error": "INVALID_AUTHORIZATION_HEADER_TOKEN_TYPE",
"code": "401",
"error_message": "Authorization header must be type of Bearer Token."
}
3. Invalid JWT Format (Segment Fault) #
{
"status": "error",
"error": "SEGMENT_FAULT",
"code": "401",
"error_message": "Incorrect JWT Format."
}
4. Invalid JWT Signature #
{
"status": "error",
"error": "INVALID_TOKEN",
"code": "401",
"error_message": "JWT signature verification failed."
}
5. Not Logged In #
{
"code": "FORBIDDEN",
"message": "You are not logged in."
}
6. REST API Access Disabled #
Returned when REST API is disabled in plugin settings:
{
"code": "DENIED_REST_API",
"message": "Denied api call",
"data": {
"status": 403
}
}
7. Missing or Invalid API Key #
{
"status": "error",
"error": "INVALID_API_KEY",
"code": "401",
"error_message": "Invalid or missing API key."
}