Skip to main content

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.

The discovery feed is the core swiping experience in Debuta. This endpoint returns a ranked list of user profiles tailored to the authenticated user’s stored settings — covering geographic radius, age range, gender preference, verification status, and shared interests. Every returned profile includes an afinidad (affinity) score object that the client uses to rank cards in the swipe stack. All filters are read from the user’s settings document, which is configured separately via PUT /api/settings. There is no way to pass ad-hoc filter parameters on this request.

Endpoint

GET /api/users/discover
string
Returns paginated user profiles for the swipe feed. Requires a valid Bearer token.

Authentication

All requests must include a valid JWT in the Authorization header.
Authorization: Bearer <access_token>

How filtering works

1

Load the current user's settings

The server reads the authenticated user’s stored settings document to obtain all filter criteria. Settings are managed via PUT /api/settings.
2

Apply geospatial filtering

A MongoDB $geoNear or $nearSphere query filters candidates to those within max_distance kilometres of the current user’s last known coordinates.
3

Apply preference filters

The following settings are applied as additional query conditions:
SettingTypeDescription
max_distancenumberMaximum radius in kilometres
min_age / max_agenumberAge range derived from birth_date
show_mestringGender(s) to show ("men", "women", "everyone")
verified_onlybooleanRestrict to is_verified: true profiles
has_bio_onlybooleanRestrict to profiles with a non-empty bio
min_photosnumberMinimum number of profile photos required
looking_forstringRelationship intention filter
interests_filterstring[]Require at least one shared interest tag
4

Exclude seen and blocked users

Users the current user has already liked or disliked (recorded in Match.likes) are excluded, as are any users in the blocked list and the current user themselves.
5

Compute affinity scores and return

Each remaining candidate receives an afinidad score computed server-side. The results are sorted by score descending and returned.

Affinity score object

Each profile in the response includes an afinidad object:
afinidad
object
Affinity breakdown for this profile relative to the current user.
score
number
Overall numeric affinity score (higher is better).
amigosFB
boolean
Whether the two users share Facebook mutual friends (if Facebook is linked).
interesesComun
number
Count of shared interest tags between the two profiles.
ciudadComun
boolean
true if both users list the same city.
edadSimilar
boolean
true if the age difference is within the similarity threshold.
resumen
string
Short human-readable summary string, e.g. "3 intereses en común · misma ciudad".

Response

200 OK — Returns an array of UserProfile objects, each augmented with an afinidad field.
[
  {
    "id": "64f1a2b3c4d5e6f7a8b9c0d1",
    "first_name": "Valentina",
    "last_name": "Ríos",
    "username": "valerios",
    "birth_date": "1998-04-12T00:00:00.000Z",
    "profile_picture": {
      "url": "https://res.cloudinary.com/debuta/image/upload/v1/profiles/64f1a2b3.jpg",
      "public_id": "profiles/64f1a2b3"
    },
    "photos": [],
    "bio": "Amo el café de especialidad y los domingos de mercado.",
    "ciudad": "Medellín",
    "is_verified": true,
    "interests": ["café", "senderismo", "fotografía"],
    "looking_for": "relationship",
    "afinidad": {
      "score": 87,
      "amigosFB": false,
      "interesesComun": 2,
      "ciudadComun": true,
      "edadSimilar": true,
      "resumen": "2 intereses en común · misma ciudad"
    }
  }
]

Error responses

StatusDescription
401 UnauthorizedMissing or invalid JWT
403 ForbiddenAccount suspended or incomplete profile
500 Internal Server ErrorDatabase or geospatial query failure

Example

curl -X GET https://api.debuta.app/api/users/discover \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."

Notes

All filter criteria come from the user’s stored settings document. To change what profiles appear in the feed — distance, age range, gender preference, etc. — use PUT /api/settings. There are no query parameters on this endpoint itself.
The afinidad.score field is the primary sort key returned by the server. Display profiles with higher scores earlier in the swipe stack to surface the most compatible matches first.

Build docs developers (and LLMs) love