A match in Debuta is created when two users have each liked the other. The Matches API covers the full lifecycle: sending likes and dislikes from the swipe feed, fetching the list of mutual matches for the chat inbox, and coordinating in-app date suggestions at a partner restaurant. Date suggestions themselves are triggered automatically by the server after 5 messages — not by a REST call — but this API lets users respond to them.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/desarrolladorandres2026-gif/Native-tailwind/llms.txt
Use this file to discover all available pages before exploring further.
Endpoints
GET /api/matches
List all mutual matches with last message and unread count.
POST /api/matches/like/:targetId
Like a user. Returns match status immediately.
POST /api/matches/dislike/:targetId
Dislike a user. Removes them from future discover results.
POST /api/matches/:id/accept-date
Accept the active restaurant date suggestion.
POST /api/matches/:id/reject-date
Reject the active date suggestion.
POST /api/matches/:id/suggest-new-place
Request a different restaurant for the date.
Authorization: Bearer <access_token>.
GET /api/matches
Returns every mutual match for the authenticated user, sorted by most recent match date. Each item includes the matched user’s profile, the last message in the conversation, and an unread message count.Response 200 OK
Array of mutual match objects.
Match document ID.
Profile of the other user in this match.
Most recent message in this conversation, or
null if none yet.Number of unread messages sent by the matched user to the current user.
Total messages exchanged in this match (used to determine date suggestion eligibility).
ISO 8601 timestamp of when the mutual match was created.
Active date suggestion object if one has been generated, otherwise
null. See date suggestion fields below.Example
POST /api/matches/like/:targetId
Sends a like from the current user totargetId. If targetId has already liked the current user, a mutual match is created and both users receive a match:nuevo Socket.io event. If no mutual like exists yet, the target user receives a like:recibido Socket.io event instead.
Path parameters
The MongoDB
_id of the user to like.Response 200 OK
true if this like created a mutual match.The ID of the Match document (new or pre-existing).
Any active date recommendation on this match document.
Error responses
| Status | Body | Description |
|---|---|---|
400 | { "message": "No puedes darte like a ti mismo" } | targetId equals the current user’s ID |
400 | { "message": "Ya le diste like a este usuario" } | Duplicate like attempted |
Example
POST /api/matches/dislike/:targetId
Records a dislike againsttargetId. The target user will no longer appear in the current user’s discovery feed. No Socket.io event is emitted for dislikes.
Path parameters
The MongoDB
_id of the user to dislike.Response 200 OK
Error responses
| Status | Description |
|---|---|
400 | Already interacted with this user |
400 | Cannot dislike yourself |
Example
POST /api/matches/:id/accept-date
Accepts the active restaurant date suggestion on a match. The server records which user accepted viauser1Acepta / user2Acepta flags. When both users have accepted, recomendacion.estado changes to "aceptada" and a cita:confirmada Socket.io event is emitted to the restaurant’s associated partner account. The other user also receives a cita:estado-actualizado event immediately.
Path parameters
The Match document ID (returned in
GET /api/matches as id).Response 200 OK
Error responses
| Status | Description |
|---|---|
400 | No active date suggestion on this match |
403 | Current user is not part of this match |
404 | Match not found |
Example
POST /api/matches/:id/reject-date
Marks the current date suggestion as"rechazada". Neither user can act on the suggestion after rejection until a new one is proposed.
Path parameters
The Match document ID.
Response 200 OK
Example
POST /api/matches/:id/suggest-new-place
Replaces the current date suggestion with a randomly selected active restaurant that is different from the current one. Both users receive acita:nueva-sugerencia Socket.io event with the full new restaurant payload.
Path parameters
The Match document ID.
Response 200 OK
Error responses
| Status | Description |
|---|---|
403 | Current user is not part of this match |
404 | Match not found, or no other restaurants available |
Example
Date suggestion object
Therecomendacion field appears on match objects whenever a date has been suggested.
ID of the suggested restaurant.
ID of the restaurant’s partner (associated user account).
Current status:
"pendiente", "aceptada", or "rechazada".Whether the first user in the match has accepted.
Whether the second user in the match has accepted.
Human-readable suggested date/time, e.g.
"Sábado 8:00 PM".ISO 8601 timestamp of when the suggestion was generated.
Date suggestions are not triggered via REST. The server automatically generates a
cita:sugerencia Socket.io event and saves a recomendacion to the match document
when the total message count in the conversation reaches 5. Use this REST API only
to respond to a suggestion (accept, reject, or swap venue) after it has been created.