# Pereval — Documentation des plateformes # Documentation des plateformes Pereval relie les applications, sites et bots de rencontres. Les membres découvrent des profils d’autres services et discutent dans leur application habituelle. L’intégration de base est gratuite. Au début, les profils externes peuvent être rares ou absents. Le bac à sable permet de tester sans dépendre de la taille du réseau. **[SDK et bibliothèques](/fr/docs/sdk/)** · Go · PHP · Symfony · JavaScript / TypeScript · Python ## Par où commencer Choisissez le guide pour votre [application de swipe](/fr/docs/guide-app/), votre [site avec recherche](/fr/docs/guide-site/) ou votre [bot](/fr/docs/guide-bot/). La [référence de l’API](/fr/docs/reference/) détaille les champs et les exemples. ## De la demande au lancement [Demandez un accès](/fr/apply/). Après validation, créez une clé de test dans votre [espace pro](/fr/cabinet/). [Essayez l’API](/fr/docs/quickstart/), passez en revue les [tests](/fr/docs/testing/) et [demandez l’accès à la production](/fr/contact/). ## Intégration dans votre produit Recueillez les [profils et consentements](/fr/docs/members/). Affichez le [fil](/fr/docs/feed-matches/) et gérez les likes, les matchs, les [messages](/fr/docs/messages/) et les [événements](/fr/docs/webhooks/). ## Principes du réseau Vous gardez votre interface et la relation avec vos membres. Recueillez leur accord et permettez la suppression des profils. Une suspension interrompt les nouveaux contacts et les événements sans effacer les données. Respectez les [règles du réseau](/fr/docs/safety/). Les [services supplémentaires](/fr/docs/services/) sont facultatifs. ## Version du protocole Cette documentation décrit la version **1.0.1**. Vérifiez les fonctions disponibles avec `GET /v1/capabilities`. Un `404` ne confirme aucune fonctionnalité. Si `videos: false`, n’envoyez pas de vidéo. Voir l’[historique](/fr/docs/changelog/). # Tester l’API dans le bac à sable Avec curl, testez le parcours du premier profil au premier message. Utilisez uniquement des données de test. ## 1. Créer les clés [Demandez l’accès](/fr/apply/). Après validation, créez une clé de test dans l’[espace pro](/fr/cabinet/). Copiez-la immédiatement. Conservez `api_key` et `webhook_secret` uniquement sur le serveur. Avant tout test, vérifiez que `mode` vaut `sandbox`. ```bash export PEREVAL_API_KEY=pv_test_... ``` ```bash curl -fsS -H "Authorization: Bearer $PEREVAL_API_KEY" https://api.pereval.dating/v1/capabilities ``` ## 2. Envoyer un profil Envoyez un profil de test avec une photo publique en HTTPS. Utilisez votre identifiant stable dans le chemin et conservez le `network_id` reçu. La modération peut prendre un peu de temps. ```bash curl -X PUT https://api.pereval.dating/v1/members/user-123 \ -H "Authorization: Bearer $PEREVAL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "consent": {"network": true, "cross_language": true, "given_at": "2026-10-24T12:00:00Z", "text_version": "2026-10-24"}, "display_name": "Anna", "birth_year": 1994, "gender": "female", "age_min": 28, "age_max": 40, "languages": ["ru"], "city": {"name": "Moscow", "country": "RU", "lat": 55.75, "lon": 37.62}, "bio": "Mountains, jazz and good coffee", "photos": ["https://pereval.dating/sandbox/6.svg"], "intents": ["serious", "casual"] }' ``` ```json { "network_id": "6f1c2b4e-8a3d-4c55-9b1e-2f0a7d9c1e44" } ``` ## 3. Charger le fil Indiquez la provenance des profils. Pour la page suivante, passez `next_cursor` dans `cursor`. Le champ `remaining_today` donne le nombre de nouveaux profils encore disponibles sur 200 par jour UTC. Envoyez un refus uniquement lors d’un choix explicite, jamais au changement de page. ```bash curl https://api.pereval.dating/v1/members/user-123/feed?limit=20 \ -H "Authorization: Bearer $PEREVAL_API_KEY" ``` ```json { "items": [ { "network_id": "1b9e…", "partner": { "id": "…", "name": "Dating Plus" }, "display_name": "Elena", "age": 31, "gender": "female", "city": "Moscow", "distance_km": 4, "languages": ["en"], "bio": "Люблю горы и кофе", "bio_original": "I love mountains and coffee", "bio_translated": true, "photos": ["https://…"], "photo_verified": true, "verified_by": "partner", "intents": ["serious", "casual", "friendship"] } ], "remaining_today": 180, "next_cursor": "eyJ…" } ``` ```bash curl -X POST https://api.pereval.dating/v1/dislikes \ -H "Authorization: Bearer $PEREVAL_API_KEY" \ -H "Content-Type: application/json" \ -d '{"from": "user-123", "to": "5c2a…"}' ``` ## 4. Envoyer un like Utilisez l’identifiant réseau d’un profil du fil. Le profil de test répond au like. Conservez l’identifiant du match fourni par `match.created`. ```bash curl -X POST https://api.pereval.dating/v1/likes \ -H "Authorization: Bearer $PEREVAL_API_KEY" \ -H "Content-Type: application/json" \ -d '{"from": "user-123", "to": "1b9e…"}' ``` ## 5. Recevoir les événements Vérifiez la signature sur le corps brut et ne traitez chaque identifiant d’événement qu’une fois. Testez avec `ping` depuis l’espace pro. Vous pouvez aussi récupérer les [événements](/fr/docs/webhooks/) en utilisant `next_after` comme prochaine valeur de `after`. ```php # SDK et bibliothèques - [Go](#go-123) - [PHP](#php-74--curl) - [JS/TS](#javascript--typescript--nodejs-20) - [Python](#python-310) - [Symfony](#symfony--component) - [Bundle](#symfony--bundle) Obtenez une clé de test dans le [tableau de bord](/fr/cabinet/). Conservez-la uniquement sur le serveur dans `PEREVAL_API_KEY`. Avant toute écriture, vérifiez que `mode` vaut `sandbox`. ## Go 1.23+ [pkg.go.dev](https://pkg.go.dev/github.com/pereval-dating/pereval-go) · [Code source](https://github.com/pereval-dating/pereval-go) ```sh go get github.com/pereval-dating/pereval-go@v1.1.0 ``` ```go package main import ( "context" "fmt" "log" "os" "github.com/pereval-dating/pereval-go" ) func main() { client, err := pereval.New( "https://api.pereval.dating", os.Getenv("PEREVAL_API_KEY"), ) if err != nil { log.Fatal(err) } ctx := context.Background() caps, err := client.Capabilities.Get(ctx) if err != nil { log.Fatal(err) } fmt.Println(caps.Mode, caps.ProtocolVersion) } ``` ## PHP 7.4+ · cURL [Packagist](https://packagist.org/packages/pereval-dating/pereval-php) · [Code source](https://github.com/pereval-dating/pereval-php) ```sh composer require pereval-dating/pereval-php ``` ```php capabilities->get(); echo $caps['mode'], ' ', $caps['protocol_version'], PHP_EOL; ``` ## JavaScript / TypeScript · Node.js 20+ [npm](https://www.npmjs.com/package/pereval-dating) · [Code source](https://github.com/pereval-dating/pereval-js) ```sh npm install pereval-dating ``` ```js // check.mjs import { Client } from "pereval-dating"; const client = new Client(process.env.PEREVAL_API_KEY); const caps = await client.capabilities.get(); console.log(caps.mode, caps.protocol_version); ``` ## Python 3.10+ [PyPI](https://pypi.org/project/pereval-dating/) · [Code source](https://github.com/pereval-dating/pereval-python) ```sh python -m pip install pereval-dating ``` ```python import os from pereval import Client with Client(os.environ["PEREVAL_API_KEY"]) as client: caps = client.capabilities.get() print(caps["mode"], caps["protocol_version"]) ``` ## Symfony · Component [Packagist](https://packagist.org/packages/pereval-dating/pereval-symfony) · [Code source](https://github.com/pereval-dating/pereval-symfony) Le composant permet d’enregistrer le client dans votre conteneur. Choisissez le bundle pour configurer automatiquement les services Symfony. Une seule de ces options suffit. ```sh composer require pereval-dating/pereval-symfony ``` ```php use Pereval\Symfony\PerevalServices; PerevalServices::client($container, '%env(PEREVAL_API_KEY)%'); ``` ## Symfony · Bundle [Packagist](https://packagist.org/packages/pereval-dating/pereval-bundle) · [Code source](https://github.com/pereval-dating/pereval-bundle) ```sh composer require pereval-dating/pereval-bundle ``` Si nécessaire, enregistrez le bundle dans `config/bundles.php`, puis vérifiez la clé. ```php Pereval\Bundle\PerevalBundle::class => ['all' => true], ``` ```sh php bin/console pereval:check --expect=sandbox ``` ## Pour aller plus loin Les [applications de démonstration](https://github.com/pereval-dating/pereval-examples) illustrent les échanges de profils, de mentions « J’aime » et de messages entre deux plateformes. La vérification des signatures fonctionne sans clé. Avec une seule clé de test, suivez le [guide de prise en main](/fr/docs/quickstart/). # AI Agent Integration Kit Copiez le [modèle de consigne pour agent IA](/fr/docs/ai-agents/) et ajoutez les détails de votre projet. ## Essayer la démo sans compte Connectez un client ci-dessous et demandez-lui d’appeler `dating_flow_demo`. La démo retrace un scénario avec des données fictives, du profil jusqu’au message et à l’événement reçu par la plateforme. Elle est en lecture seule. ### Cursor Ajoutez le serveur dans le fichier `.cursor/mcp.json` du projet. Si des serveurs sont déjà configurés, ajoutez l’entrée dans `mcpServers`. Ouvrez ensuite Cursor Settings → Tools & MCP. ```json { "mcpServers": { "pereval-demo": { "url": "https://api.pereval.dating/mcp/demo" } } } ``` ### Claude Code Exécutez la commande dans le dossier du projet et vérifiez la connexion dans Claude Code avec `/mcp`. ```sh claude mcp add --transport http pereval-demo https://api.pereval.dating/mcp/demo ``` ### Codex Exécutez les commandes dans le dossier du projet et vérifiez la connexion dans Codex avec `/mcp`. ```sh codex mcp add pereval-demo --url https://api.pereval.dating/mcp/demo codex mcp list ``` ## Tester votre intégration dans le bac à sable Utilisez une clé de test de l’espace pro avec `https://api.pereval.dating/mcp`. Configurez `Authorization: Bearer ` dans les paramètres locaux du client. Gardez cette clé hors des prompts, du dépôt et du code côté client. Avant toute modification, appelez `capabilities` et vérifiez que `mode` vaut `sandbox`. Donnez à l’agent un exemple pour votre environnement technique. Utilisez des profils fictifs et vérifiez les signatures des webhooks sur le corps brut de la requête. - [Obtenir une clé de test et lancer la première requête](/fr/docs/quickstart/) - [SDK et bibliothèques](/fr/docs/sdk/) - [Exemples exécutables](https://github.com/pereval-dating/pereval-examples) - [Spécification OpenAPI](/openapi.yaml) - [Plan de la documentation](/llms.txt) · [llms-full.txt](/fr/llms-full.txt) # Modèle de consigne pour agent IA Configurez Cursor, Claude Code ou Codex à l’aide du [AI Agent Integration Kit](/fr/docs/agent-kit/). ## Exemple de consigne Précisez dans cet exemple le langage, le framework, la base et le modèle de votre application. Gardez les clés hors de la consigne. ```text Connecte notre produit à Pereval depuis le serveur. Lis https://pereval.dating/fr/llms-full.txt et /openapi.yaml. Pile : . Comptes locaux : . Recueille des consentements séparés. Synchronise les profils, leurs modifications et l’activité. Suis le guide adapté au produit. Implémente le fil, les likes, les matchs et les messages. Vérifie la signature sur le corps brut ou conserve next_after en cas d’interrogation régulière. Traite les événements dans l’ordre et une seule fois. Teste les doublons et les suppressions. Gère les blocages, les signalements et la modération. Utilise des données de test uniquement. Lis PEREVAL_API_KEY et PEREVAL_WEBHOOK_SECRET sur le serveur. Aucune clé dans le client. ``` ## Conseils Relisez surtout les [événements](/fr/docs/webhooks/), les [erreurs](/fr/docs/errors/) et les [tests](/fr/docs/testing/). Exigez des tests pour les doublons, les effacements et l’absence de consentement. ## Services facultatifs Activez les [services](/fr/docs/services/) uniquement sur demande explicite de la plateforme. Gardez la même référence lors des reprises. # Connecter une application de swipe Ajoutez des profils du réseau aux cartes de votre application. Les actions et le chat restent dans votre interface. ## Données à conserver Associez le compte local à `network_id`. Conservez `match_id` par conversation et le curseur `next_after` si vous récupérez les événements. ## Consentement et profil Recueillez l’[accord](/fr/docs/members/) dans votre application et transmettez le profil depuis le serveur via `PUT /v1/members/{external_id}`. Synchronisez les modifications et l’activité. ## Cartes à parcourir Intégrez les profils à votre [fil](/fr/docs/feed-matches/). Indiquez leur provenance et donnez accès au texte original. Envoyez un refus quand la personne passe volontairement un profil. Chargez la suite avec `next_cursor`. ```bash curl "https://api.pereval.dating/v1/members/user-123/feed?limit=20" \ -H "Authorization: Bearer $PEREVAL_API_KEY" ``` ```bash curl -X POST https://api.pereval.dating/v1/dislikes \ -H "Authorization: Bearer $PEREVAL_API_KEY" \ -H "Content-Type: application/json" \ -d '{"from": "user-123", "to": ""}' ``` ## Like et discussion Envoyez `POST /v1/likes`. Traitez `like.received` et ouvrez une seule discussion par `match_id` sur `match.created`. Acheminez les [messages](/fr/docs/messages/) vers la bonne conversation. ## Validation Vérifiez qu’un doublon ne crée pas une deuxième discussion, qu’un refus masque le profil et que les [blocages et suppressions](/fr/docs/safety/) sont effectifs. # Connecter un site avec recherche Enrichissez vos résultats avec des profils d’autres plateformes. Ne créez pas de refus au changement de page. ## Données à conserver Conservez la correspondance avec `network_id`, la valeur `match_id` par conversation et `next_after` pour les événements. ## Consentement et profil Après [accord](/fr/docs/members/), envoyez le profil via `PUT /v1/members/{external_id}`. Gardez les clés sur le serveur uniquement. ## Page de résultats Transmettez les [filtres](/fr/docs/feed-matches/) au fil. Vous pouvez restreindre l’âge, choisir une intention compatible ou une langue. Identifiez les profils du réseau. ```bash curl "https://api.pereval.dating/v1/members/user-123/feed?limit=20&age_min=28&age_max=35&intent=serious&language=ru" \ -H "Authorization: Bearer $PEREVAL_API_KEY" ``` ## Page suivante Passez `next_cursor` dans `cursor` avec les mêmes filtres. Son absence indique la fin. Si la recherche change, repartez sans curseur. Un curseur invalide produit `422`. ## Quota quotidien Le champ `remaining_today` indique le nombre de nouveaux profils disponibles sur 200 par jour UTC. Les profils déjà affichés restent accessibles. ## Validation Vérifiez la pagination sans refus involontaire, le quota, les likes reçus et la [discussion après un match](/fr/docs/messages/). # Connecter un bot de rencontres Même sans URL de webhook publique, un bot peut afficher des profils et récupérer les événements. Conservez les clés sur son serveur. ## Données à conserver Associez l’identifiant local à `network_id`. Conservez `match_id` pour chaque discussion et le dernier curseur traité `next_after` pour la plateforme. ## Profil Demandez le [consentement](/fr/docs/members/) dans le bot et envoyez le profil via `PUT /v1/members/{external_id}`. Ne transmettez ni numéro de téléphone ni coordonnées de messagerie. ## Cartes de profil Demandez une carte. Indiquez la provenance et signalez les traductions. « J’aime » appelle `POST /v1/likes` et « Suivant » appelle `POST /v1/dislikes`. Un refus masque le profil pendant 30 jours. ```bash curl "https://api.pereval.dating/v1/members/user-123/feed?limit=1" \ -H "Authorization: Bearer $PEREVAL_API_KEY" ``` ## Événements sans webhook Récupérez les [événements](/fr/docs/webhooks/) avec `after=0` et enregistrez `next_after` après traitement. Ouvrez une discussion sur `match.created` et rattachez les messages au bon match. ```bash curl "https://api.pereval.dating/v1/events?after=$NEXT_AFTER&limit=100" \ -H "Authorization: Bearer $PEREVAL_API_KEY" ``` ## Validation Redémarrez le bot et vérifiez qu’il reprend sans doublon. Testez les réponses, le blocage, le signalement et l’effacement dans le [bac à sable](/fr/docs/testing/). # Fonctionnement du réseau Pereval transmet les profils et les messages entre plateformes indépendantes. L’inscription, l’interface et l’assistance restent propres à chaque plateforme. ## Identifiants Le champ `partner_id` identifie la plateforme, `external_id` le compte local, `network_id` le membre du réseau et `match_id` la conversation. Conservez ces identifiants tels quels. ## Circulation des données Transmettez les [profils](/fr/docs/members/) après accord. Chargez le [fil](/fr/docs/feed-matches/). Deux likes réciproques créent un match. Les deux plateformes reçoivent des [événements](/fr/docs/webhooks/) et peuvent transmettre les messages. ## Qui apparaît dans le fil ? Les profils viennent d’autres plateformes. Le genre est opposé, les âges sont compatibles et une intention est commune. Il faut une langue commune ou deux accords de traduction. À proximité, le rayon par défaut est de 50 km ou, sans coordonnées, la ville et le pays doivent correspondre. Le mode mondial exige deux accords. Les profils inactifs depuis plus de 30 jours, déjà aimés, bloqués ou refusés depuis moins de 30 jours sont exclus. ## Traduction Utilisez `bio_original`, `bio_translated`, `text_original` et `translated`. Laissez toujours accès à l’[original](/fr/docs/messages/). ## Données conservées N’envoyez pas de coordonnées de contact. Les positions sont arrondies. Les [règles](/fr/docs/safety/) précisent les délais et les modalités de suppression. ## Fiabilité Les changements et événements sont enregistrés ensemble. Les webhooks sont retentés pendant trois jours et les événements restent disponibles sept jours. Consultez les [règles de reprise](/fr/docs/errors/). # Modes d’intégration Choisissez le mode d’intégration selon votre serveur. L’interface reste dans votre produit. ## API de serveur à serveur Votre serveur appelle l’[API REST](/fr/docs/reference/) et reçoit les [événements](/fr/docs/webhooks/) par webhook ou interrogation régulière. Commencez dans le [bac à sable](/fr/docs/quickstart/). ## Générer un client OpenAPI La [spécification OpenAPI 3.1](/openapi.yaml) inclut les webhooks. Dans l’exemple, remplacez au besoin `php` par `go`, `python`, `typescript-fetch` ou un autre générateur. ```bash npx @openapitools/openapi-generator-cli generate \ -i https://pereval.dating/openapi.yaml \ -g php -o ./pereval-client ``` ## Assistance par IA Utilisez le [modèle de consigne pour agent IA](/fr/docs/ai-agents/). Vérifiez le résultat avec des données de test. ## MCP Commencez par le [AI Agent Integration Kit](/fr/docs/agent-kit/). Le MCP partenaire utilise Streamable HTTP sur `POST /mcp` et la même clé Bearer que l’API REST. La méthode `tools/list` affiche les outils disponibles pour votre clé. ## Besoin d’aide ? Utilisez le [formulaire de contact](/fr/contact/). Ne transmettez aucune clé. # Services supplémentaires et tarifs L’intégration de base, les likes ordinaires, les matchs et les messages sont gratuits. Les quatre services démarrent à 0 RUB. Une commande gratuite exige aussi une confirmation. ## Services disponibles Le `boost` augmente la priorité pendant 1 à 1 440 minutes. Une commande de `superlike` comprend 1 à 100 actions. Les services `incognito-day` et `rewind-day` couvrent 1 à 365 jours de 24 heures. Ces droits sont liés à l’`external_id` du membre. ## Activation explicite Vérifiez `GET /v1/capabilities`. Le champ `commerce_enabled` ne garantit pas l’autorisation de commander. Les superlikes et annulations existants restent inchangés jusqu’à l’activation explicite du compte de dépenses en production. Recevoir des profils mis en avant est gratuit. ## Devis, confirmation et droits Lisez les tarifs, la devise et `fulfillment_ready` dans `GET /v1/commerce/catalog`. Les crédits TEST sont distincts des RUB. Un devis de `POST /v1/commerce/quotes` reste valable cinq minutes. Confirmez via `POST /v1/commerce/orders` avec le jeton Bearer et la clé distincte `X-Commerce-Key`. Après une interruption, réutilisez les mêmes `external_order_ref` et `quote_id`. Consultez les droits via `GET /v1/members/{external_id}/entitlements`. ```sh # Backend only. Use the quote UUID returned by the first request. curl -X POST 'https://api.pereval.dating/v1/commerce/quotes' \ -H "Authorization: Bearer $PEREVAL_API_KEY" \ -H 'Content-Type: application/json' \ -d '{"member":"user-123","sku":"boost","quantity":40}' curl -X POST 'https://api.pereval.dating/v1/commerce/orders' \ -H "Authorization: Bearer $PEREVAL_API_KEY" \ -H "X-Commerce-Key: $PEREVAL_COMMERCE_KEY" \ -H 'Content-Type: application/json' \ -d '{"quote_id":"","external_order_ref":"boost-order-42"}' ``` ## Activation et diffusion du boost Le boost commence dès la confirmation, même sans public. Un achat supplémentaire prolonge sa durée. Une fois lancé, il ne peut plus être annulé à volonté. Masquer le profil ne suspend pas le décompte. Les filtres et blocages restent actifs, sans garantie de vues. Le mode incognito empêche le démarrage. Configurez la réception via `swipe` ou `search`. Conservez `X-Feed-Request-Ref` pendant la pagination. Les placements supplémentaires représentent au plus 20 % du flux stable. Le compteur `api_placements` ne mesure pas les vues réelles. ```json PUT /v1/commerce/delivery { "format": "search", "enabled": true } ``` ## Superlikes et annulations Après activation, transmettez `X-Action-Ref` pour les superlikes et les annulations. Conservez cette référence lors des reprises, avec `action_ref` pour MCP. Seul un superlike réussi consomme une unité. ## Expiration du mode incognito Le profil reste masqué. Les nouvelles recherches sont bloquées jusqu’au renouvellement ou au retour explicite au mode normal. ## Erreurs et événements Traitez `402 entitlement_required`, `402 insufficient_test_credits` (TEST), `403 commerce_forbidden`, `409 commerce_conflict`, `409 quote_expired`, `409 boost_incompatible_with_incognito`, `422 invalid_commerce_request`, `503 commerce_unavailable` et `503 live_payments_unavailable`. Corrigez la cause avant une nouvelle commande. Consultez les [événements de boost](/fr/docs/webhooks/) et la [référence](/fr/docs/reference/#commerce). # Profils et consentements Synchronisez les profils après accord puis à chaque modification pertinente. Distinguez le masquage d’un profil de sa suppression définitive. ## Recueillir le consentement Expliquez avant l’inscription ce que les autres plateformes verront et comment quitter le réseau. Le partage exige `consent.network`. Conservez l’heure réelle `given_at` et la version affichée `text_version`. Redemandez l’accord après un changement important. ### Monde entier Le champ `world` permet les rencontres mondiales avec accord réciproque. Le champ `cross_language` autorise les rencontres sans langue commune. Demandez ces accords séparément. Le champ de profil `show_distance`, désactivé par défaut, contrôle l’affichage de la distance. ```json "consent": { "network": true, "cross_language": true, "world": false, "given_at": "2026-10-24T12:00:00Z", "text_version": "2026-10-24" } ``` ## Intentions Utilisez `serious` pour une relation sérieuse, `casual` pour des rencontres sans engagement et `friendship` pour l’amitié. La catégorie `arrangement` exige une autorisation et un champ `arrangement_role` valant `provider` ou `seeker`. Si c’est la seule intention commune, les rôles doivent être opposés. Affichez le rôle uniquement dans cette catégorie. Les rencontres rémunérées sont toujours interdites. ## Mettre à jour le profil Appelez `PUT /v1/members/{external_id}` pour tout changement des photos, de la vérification, du profil, du lieu, des critères, des langues ou des accords. Réutilisez le même identifiant local. ## Premier envoi Envoyez au maximum 100 profils consentants par requête avec `PUT /v1/members`. Vérifiez chaque résultat et conservez la correspondance avec l’identifiant local. ```json PUT /v1/members { "items": [ { "external_id": "user-123", "consent": { … }, "display_name": "Anna", … }, { "external_id": "user-124", "consent": { … }, "display_name": "Olga", … } ] } ``` ```json { "items": [ { "external_id": "user-123", "network_id": "6f1c2b4e-…" }, { "external_id": "user-124", "error": { "code": "invalid", "message": "birth_year: members must be 18+" } } ] } ``` ## Critères des profils Le champ `display_name` contient 1 à 50 caractères, sans nom de famille ni coordonnées. Âge minimum 18 ans, `gender` vaut `male` ou `female`. Respectez `18 ≤ age_min ≤ age_max`. Dans `languages`, utilisez les codes ISO 639-1 à deux lettres, langue principale en premier. La présentation `bio` est limitée à 1 000 caractères. Indiquez la ville et le pays ou la position. Voir la [référence](/fr/docs/reference/). ## Vérification des photos Transmettez `method`, `provider` et `verified_at` uniquement après un contrôle réel. Affichez le résultat renvoyé. Pour `photos_changed`, vérifiez les nouvelles photos. ```json "verification": { "method": "selfie", "provider": "own", "verified_at": "2026-10-20T14:03:00Z" } ``` ```json { "network_id": "…", "photo_verified": false, "verification": "photos_changed" } ``` ## Contrôle photo par le réseau Créez une session avec `POST /v1/photo-checks`. Ouvrez l’URL reçue dans les 30 minutes avec accès à la caméra. Limite de dix sessions par personne et par jour. Traitez `photo_check.updated` et contrôlez chaque photo. En cas de statut `disputed`, la modération tranche. Associez le résultat uniquement aux photos concernées. ```http POST /v1/photo-checks { "ref": "u_123", "lang": "en", "return_url": "https://your.app/verified", "photos": [ { "id": "ph1", "url": "https://cdn.your.app/ph1.jpg" }, { "id": "ph2", "url": "https://cdn.your.app/ph2.jpg" } ] } ``` ```json { "id": "…", "ref": "u_123", "status": "partial", "attempts": 1, "checked_at": "2026-10-30T09:14:00Z", "dispute_until": "2026-10-31T09:14:00Z", "photos": [ { "id": "ph1", "url": "https://cdn.your.app/ph1.jpg", "verdict": "match" }, { "id": "ph2", "url": "https://cdn.your.app/ph2.jpg", "verdict": "no_match" } ] } ``` ```json "verification": { "provider": "pereval", "check_id": "…" } ``` ## Changer de ville La ville du profil peut changer une fois par jour. En cas de `409 location_change_limited`, le profil reste inchangé. Renvoyez les autres modifications avec le lieu précédent. Pour chercher en voyage, passez `lat` et `lon` au fil. ## Photos Fournissez 1 à 9 URL HTTPS publiques et durables, sans coordonnées sur les photos. Actualisez le profil si les URL changent. Le réseau peut mettre les images en cache. ## Vidéos Si les capacités indiquent `videos: false`, n’envoyez aucun clip. Si la fonction est active, ajoutez aux photos obligatoires jusqu’à trois MP4 publics de 15 secondes et 20 Mo chacun avec une image d’aperçu. ```json "videos": [ { "url": "https://cdn.example/u/1.mp4", "poster": "https://cdn.example/u/1.jpg" } ] ``` ## Modération Les profils nouveaux ou modifiés peuvent être contrôlés avant diffusion. Consultez la raison de `member.rejected`, demandez une correction et synchronisez à nouveau. ## Activité Signalez l’activité réelle via `POST /v1/members/{id}/active` ou par lots de 1 000 identifiants maximum. Les identifiants inconnus sont ignorés. Après plus de 30 jours d’inactivité, le profil disparaît du fil. ```json POST /v1/activity { "external_ids": ["user-123", "user-124", "user-125"] } ``` ## Suspendre la participation Avec `consent.network: false`, masquez le profil en conservant les discussions. Demandez l’accord avant de renvoyer `true`. ## Suppression différée Si le compte est récupérable pendant 30 jours, désactivez-le. L’événement `match.frozen` suspend les messages. Traitez `match.unfrozen` en cas de réactivation. ``` POST /v1/members/{external_id}/deactivate ``` ## Suppression Envoyez `DELETE /v1/members/{external_id}?reason=account_deleted` pour une suppression de compte ou `?reason=left_network` pour un départ. Le profil, les likes, les refus et les blocages disparaissent. Les matchs se ferment et l’autre membre garde l’historique sans nom ni photos. Un retour crée un nouveau profil. Voir les [durées de conservation](/fr/docs/safety/). # Fil, likes et matchs Affichez les profils compatibles des autres plateformes et ouvrez la conversation après un like réciproque. ## Fil La requête `GET /v1/members/{external_id}/feed?limit=20` renvoie au plus 50 profils. Identifiez leur provenance et proposez l’original si `bio_translated` est actif. Affichez `distance_km` seulement si la valeur existe. ### Monde entier Le mode `scope=world` exige l’accord des deux personnes. Séparez la recherche mondiale des profils à proximité. ### Filtres Le rayon `radius_km` va de 1 à 300, avec 50 par défaut. Les champs `lat` et `lon` changent seulement le centre de recherche. Autres filtres : `city`, `country`, `age_min`, `age_max`, `height_min`, `height_max`, `verified_only`, `intent`, `language` et `gender`. Choisissez une intention du profil. Passez `next_cursor` dans `cursor` avec les mêmes filtres. La limite est de 200 profils distincts par jour UTC. Revoir un profil ne consomme pas de quota. ```json { "items": [ … ], "remaining_today": 180, "next_cursor": "…" } ``` ## Like Avec `matched: false`, le like est enregistré. Avec `matched: true`, vous recevez l’identifiant du match. Répéter le même like ne génère pas d’événement. Il peut être retiré avant un match. Le superlike accepte jusqu’à 200 caractères sans coordonnées et cinq actions par jour. Voir les [services](/fr/docs/services/). ```json POST /v1/likes { "from": "user-123", "to": "1b9e…" } ``` ```json POST /v1/likes { "from": "user-123", "to": "1b9e…", "super": true, "message": "Hi! Into hiking?" } ``` ```json DELETE /v1/likes/1b9e…?from=user-123 ``` ## Refus Un refus explicite masque le profil pendant 30 jours. Envoyez au maximum 100 paires par requête. Tourner la page ou actualiser le fil ne constitue pas un refus. ```json POST /v1/dislikes { "from": "user-123", "to": "5c2a…" } ``` ```json POST /v1/dislikes { "items": [ { "from": "user-123", "to": "5c2a…" }, { "from": "user-123", "to": "8d4f…" } ] } ``` ## Likes reçus L’événement `like.received` contient le profil de l’expéditeur. Récupérez jusqu’à 100 likes par requête et retirez les likes annulés à réception de `like.withdrawn`. ``` GET /v1/members/{external_id}/likes?limit=50 ``` ```json { "items": [ { "from": { "network_id": "…", "display_name": "Elena", … }, "liked_at": "2026-10-24T12:00:00Z" } ] } ``` ## Match À réception de `match.created`, associez `match_id`, le compte local et son interlocuteur pour les [messages](/fr/docs/messages/). ## Matchs ouverts Utilisez `GET /v1/members/{external_id}/matches` pour récupérer les matchs ouverts et les rapprocher de vos données après une interruption. ## Mettre fin à une conversation La commande `clear` masque l’historique d’un seul côté. La clôture conserve les messages et bloque les nouveaux envois. Avec `erase=true`, l’effacement concerne les deux parties et produit `match.erased`. En cas de signalement, une copie de modération est conservée 90 jours. ```json POST /v1/matches/{match_id}/clear { "as": "user-123" } ``` ``` DELETE /v1/matches/{match_id}?by=user-123 ``` ``` DELETE /v1/matches/{match_id}?by=user-123&erase=true&cooldown_days=30 ``` ## Boost et mode incognito Consultez les [conditions](/fr/docs/services/) avant activation. Le boost est incompatible avec le mode incognito. # Messages et traduction Après un match, les membres discutent depuis leur application. Pereval transmet les messages et fournit les traductions disponibles. ## Envoyer un message Envoyez de 1 à 4 000 caractères dans un match ouvert. Photos et messages vocaux ne sont pas pris en charge. Pendant les sept premiers jours, un membre peut ouvrir 20 conversations par jour. Les réponses dans les conversations existantes ne comptent pas. En cas de `429 first_messages_limit`, attendez le lendemain. ```json POST /v1/matches/{match_id}/messages { "from": "user-123", "text": "Привет! Как прошли выходные?" } ``` ```json { "id": "…", "from": "me", "text": "Привет! Как прошли выходные?", "translated": false, "lang": "ru", "created_at": "2026-10-24T12:00:00Z" } ``` ## Recevoir un message L’événement `message.created` arrive après la tentative de traduction. Ne traitez chaque identifiant qu’une fois et rattachez le message à la bonne conversation. ```json { "id": "evt_…", "type": "message.created", "data": { "match_id": "…", "to": "john-77", "message": { "id": "…", "from": "6f1c2b4e-…", "text": "Hi! How was your weekend?", "text_original": "Привет! Как прошли выходные?", "translated": true, "lang": "en", "created_at": "2026-10-24T12:00:00Z", "suspicious": false, "flags": [] } } } ``` ## Traduction automatique Pereval détecte la langue du texte et tient compte des langues de l’auteur pour les réponses courtes. Si la langue détectée ne figure pas dans `languages` du destinataire, la traduction vise sa première langue. Signalez `translated: true`, affichez `text` et proposez `text_original`. En cas d’échec, affichez l’original. ## Indices de fraude Le message est livré même avec `suspicious: true`. Affichez un avertissement. Les `flags` possibles incluent `link`, `phone`, `messenger`, `money` et, avec un autre indice, `mass_text`. Proposez de [signaler ou bloquer](/fr/docs/safety/). ```json "message": { "id": "…", "text": "Text me on Telegram, it's easier", "suspicious": true, "flags": ["messenger"], … } ``` ## Accusés de lecture Envoyez l’identifiant du dernier message lu inclus. La réponse est `204`. L’autre plateforme reçoit `message.read`. ```json POST /v1/matches/{match_id}/read { "as": "user-123", "up_to": "" } ``` ## Historique Les messages les plus récents arrivent en premier. Le paramètre `as` indique le lecteur. Les messages envoyés portent `read_at` une fois lus. Construisez l’historique à partir des événements. Le réseau conserve les messages jusqu’à 90 jours après envoi. Respectez les événements de suppression. ``` GET /v1/matches/{match_id}/messages?as=user-123&limit=50 ``` # Événements et webhooks Enregistrez une URL de webhook dans l’espace pro ou récupérez les événements vous-même. Un événement peut arriver plusieurs fois. ```json { "id": "evt_6f1c2b4e-8a3d-4c55-9b1e-2f0a7d9c1e44", "type": "match.created", "created_at": "2026-10-24T12:00:00Z", "data": { "…": "…" } } ``` ## Types d’événements Gérez `like.received`, `like.withdrawn`, `match.created`, `message.created`, `message.read`, `match.closed`, `match.frozen`, `match.unfrozen`, `match.erased`, `member.reported`, `member.suspended`, `member.rejected` et `photo_check.updated`. Testez la livraison avec `ping`. Consultez les champs dans la [référence](/fr/docs/reference/#events). ## Vérifier la signature Calculez le HMAC-SHA256 sur le corps brut avec le `webhook_secret` de l’environnement. Comparez `sha256=` à `X-Network-Signature` en temps constant. Répondez `401` si la signature est invalide. Les exemples suivants couvrent PHP, Python, Node.js et Go dans cet ordre. ```php { const expected = "sha256=" + crypto.createHmac("sha256", process.env.PEREVAL_WEBHOOK_SECRET).update(req.body).digest("hex"); const got = req.get("X-Network-Signature") ?? ""; if (got.length !== expected.length || !crypto.timingSafeEqual(Buffer.from(got), Buffer.from(expected))) { return res.sendStatus(401); } const event = JSON.parse(req.body.toString("utf8")); handle(event); res.sendStatus(204); }); ``` ```go func perevalHook(w http.ResponseWriter, r *http.Request) { body, err := io.ReadAll(io.LimitReader(r.Body, 1<<20)) if err != nil { http.Error(w, "bad body", http.StatusBadRequest) return } mac := hmac.New(sha256.New, []byte(os.Getenv("PEREVAL_WEBHOOK_SECRET"))) mac.Write(body) expected := "sha256=" + hex.EncodeToString(mac.Sum(nil)) if !hmac.Equal([]byte(expected), []byte(r.Header.Get("X-Network-Signature"))) { http.Error(w, "bad signature", http.StatusUnauthorized) return } var event struct { ID string `json:"id"` Type string `json:"type"` Data json.RawMessage `json:"data"` } _ = json.Unmarshal(body, &event) handle(event) w.WriteHeader(http.StatusNoContent) } ``` ## Nouvelles tentatives et doublons Confirmez la prise en charge durable par `2xx` sous 10 secondes. Après un échec, les tentatives ont lieu après 10 secondes, 1, 5 et 30 minutes, 2 et 6 heures puis chaque jour pendant trois jours au maximum. Enregistrez l’`id` et son effet dans une transaction. Respectez l’ordre `seq` par destinataire, même lors des reprises. ```sql CREATE TABLE pereval_events (id text PRIMARY KEY, received_at timestamptz DEFAULT now()); -- in the handler, in the same transaction as your changes: INSERT INTO pereval_events (id) VALUES ($1) ON CONFLICT DO NOTHING; -- 0 rows → already processed ``` ## Récupérer les événements Commencez par `after=0`. Après traitement, enregistrez `next_after` pour la requête suivante. Les événements récupérés sont considérés comme livrés. Respectez 600 requêtes par minute et par plateforme. ``` GET /v1/events?after=&limit=100 ``` ```json { "items": [ { "seq": 41, "id": "evt_…", "type": "message.created", "created_at": "2026-10-24T12:00:00Z", "data": { "…": "…" } } ], "next_after": 41 } ``` ## En cas de panne Les webhooks sont retentés pendant trois jours. Récupérez les événements manquants des sept derniers jours via `GET /v1/events`. ## Événements de boost Traitez `boost.started`, `boost.extended`, `boost.paused`, `boost.resumed` et `boost.completed`. Voir les [services](/fr/docs/services/). ## Effacements et sauvegardes Pour `match.erased`, conservez une marque durable par `match_id` dans la transaction de suppression. Elle doit survivre au nettoyage du journal. Après restauration, réappliquez les effacements avant d’ouvrir les conversations. Un événement tardif ne doit pas recréer une conversation supprimée. # Sécurité et règles Proposez le signalement et le blocage sur le profil et dans le chat. Traitez aussi les signalements concernant vos membres. ## Blocage Le blocage vise deux profils. Il empêche de nouvelles suggestions et ferme le match avec `match.closed` en conservant l’historique. Avec `erase: true`, le match, les messages et les likes sont effacés des deux côtés via `match.erased`. Les autres comptes éventuels de la même personne ne sont pas forcément couverts. ```json POST /v1/blocks { "from": "user-123", "to": "" } ``` ## Signalement Utilisez le motif `reason` adapté : `fake`, `scam`, `spam`, `offensive`, `commercial`, `underage` ou `other`. Décrivez les faits et examinez rapidement les événements `member.reported`. ```json POST /v1/reports { "from": "user-123", "to": "", "reason": "scam", "comment": "Asks me to send money" } ``` ## Fraude dans les conversations En cas d’[indices de fraude](/fr/docs/messages/), avertissez des risques liés aux demandes d’argent et aux invitations à changer immédiatement de messagerie. ## Règles du réseau ### Consentement Recueillez l’[accord](/fr/docs/members/) avant transmission. Permettez la suspension et l’effacement. Indiquez la provenance des profils et signalez les traductions automatiques. Rendez l’original accessible. ### Accès Gardez la clé API sur le serveur. Limitez chaque personne à ses conversations. Effacez la discussion sur `match.erased`, fermez-la sur `match.closed` et retirez le nom et les photos si `peer_deleted: true`. ### Contenu Accès réservé aux adultes de 18 ans et plus. Les faux profils, profils générés, bots, collectes de contacts, tarifs et rencontres rémunérées sont interdits. Traitez les signalements. Une infraction peut entraîner une suspension. ### Conservation Les profils restent pendant la participation, les messages jusqu’à 90 jours après envoi, les événements 7 jours et les refus 30 jours. En cas de signalement, une copie protégée de la conversation effacée reste 90 jours après suppression. Les données personnelles des signalements et contrôles photo restent au maximum 60 jours après dépôt ou création, puis 30 jours au maximum en sauvegarde protégée. Les contestations en cours ne prolongent pas ces délais. L’effacement ne lève pas un blocage et ne valide pas une photo. ### Prix L’intégration de base est gratuite. Les [services supplémentaires](/fr/docs/services/) sont facultatifs. ## Confidentialité N’envoyez ni téléphone ni e-mail dans les profils. Les positions sont arrondies et ne sont pas divulguées aux membres. Après un départ, l’autre personne conserve l’historique sans nom ni photos. Voir le [traitement des données](/fr/privacy/). # Erreurs et limites Utilisez le statut HTTP et le champ stable `error` dans votre code. Le texte de `message` sert au diagnostic et peut changer. ```json { "error": "invalid", "message": "birth_year: members must be 18+" } ``` ## Codes d’erreur - 400 `bad_json`, `bad_id` – vérifiez le JSON et les UUID. - 401 `unauthorized`, 403 `forbidden` – vérifiez l’environnement, l’activation et les droits. - 404 `not_found` – ressource inconnue ou inaccessible. - 409 `match_closed`, `match_frozen`, `matched`, `member_hidden`, `world_consent_required`, `photo_check_gone`, `location_change_limited` – actualisez l’état avant de modifier l’action. - 422 `invalid` – corrigez le champ indiqué. - 429 `rate_limited`, `super_like_limit`, `photo_check_limit`, `first_messages_limit` – respectez le délai concerné. - 500/503 `internal`, 503 `photo_check_off` – erreur temporaire. ## Nouvelles tentatives Après une panne réseau, un délai dépassé, `rate_limited` ou une erreur 5xx, espacez les tentatives sûres de 1, 2 puis 4 secondes. Un nouveau POST de message peut créer un doublon. Vérifiez d’abord l’historique. ## Limites 600 requêtes par minute et par plateforme, 1 Mo par requête. Fil de 50 profils maximum par page et 200 nouveaux profils par jour. Lots de 100 profils ou refus, 1 000 activités. Jusqu’à 100 likes reçus ou messages et 500 événements par page. Messages de 1 à 4 000 caractères, présentation de 1 000 maximum, `external_id` de 1 à 128, 1 à 9 photos. Par jour, un changement de ville, dix contrôles photo et cinq superlikes de 200 caractères maximum. Pendant les sept premiers jours, 20 nouvelles conversations par jour. ## Services facultatifs Réutilisez la référence de commande après expiration du délai. Voir les [erreurs de commande](/fr/docs/services/). # Tester l’intégration Vérifiez l’intégration avec des profils de test avant de l’ouvrir aux membres réels. ## Version et disponibilité Vérifiez `GET /v1/capabilities` avec la clé cible. Depuis la version 1.0.1, `mode` remplace `production`. Attendez `sandbox` ou `live`. Arrêtez si le résultat diffère. Les préfixes `pv_test_`, `pv_live_` et `dn_` sont indicatifs. Un `404` ne confirme rien. La route `/readyz` vérifie uniquement la base. Testez séparément traduction et contrôle photo. Avec `videos: false`, n’envoyez aucune vidéo. ## Environnement de test Après validation, accédez au test dans votre [espace pro](/fr/cabinet/). Le test et la production utilisent `https://api.pereval.dating` avec des clés, URL de webhook, secrets et statistiques distincts. La production exige une activation séparée. ## Bac à sable Les profils de Moscou, Saint-Pétersbourg, Kazan, Iekaterinbourg et Novossibirsk renvoient les likes et répondent aux messages. Ils aiment aussi les nouveaux profils proches. Vérifiez `match.created`, `message.created` et `like.received`. Les données de test restent isolées. ## Tester les webhooks en local Utilisez une URL de test accessible ou récupérez les [événements](/fr/docs/webhooks/). HTTP est réservé aux tests. Vérifiez la signature avec `ping`. ## Vérifications avant le lancement - Conserver les clés sur le serveur uniquement. - Refuser les signatures invalides avec 401 et dédupliquer par identifiant. - Tester le consentement, les modifications, le refus, le like, le match et la traduction. - Vérifier blocages, signalements, suspension et effacement des deux côtés. - Simuler une panne, récupérer les événements et vérifier la séparation des données de production. - [Demander l’accès à la production](/fr/contact/). ## Services facultatifs Testez les devis, confirmations et reprises avec des crédits TEST. Vérifiez l’expiration et la confidentialité avant [activation](/fr/docs/services/). # Historique de l’API Cette page répertorie les changements du contrat public qui concernent votre intégration. ## 1.0.1 – Mode d’accès Dans `GET /v1/capabilities`, `mode` remplace `production`. Ce changement rompt la compatibilité. Vérifiez avec la clé utilisée que le résultat correspond à `sandbox` ou `live`. Arrêtez en cas de valeur absente, inconnue ou inattendue. Les nouvelles clés commencent par `pv_test_` ou `pv_live_`. Les clés `dn_` actives restent valides. Le préfixe est seulement indicatif. ```json {"protocol_version": "1.0.1", "mode": "sandbox"} ``` ## 1.0.0 – Premier contrat stable Profils, consentements, fil, matchs, messages, traduction, événements, modération et services facultatifs. Le champ `production` décrivait l’environnement du serveur sans préciser le mode de la clé. Les vidéos en production et les appels étaient indisponibles. ## Versions futures La version 1.0.2 indique une correction compatible et 1.1.0 un ajout compatible. Un contrat incompatible comme 2.0.0 prévoit une migration annoncée au moins 60 jours à l’avance. ```yaml openapi: 3.1.0 info: title: Pereval Partner API version: 1.0.1 summary: Connect a dating app to the Pereval network — shared feed, likes, matches and translated chat across apps. description: > Pereval (pereval.dating) connects dating apps and sites into one network. A user stays in **your** app, but sees people from other apps in the network, likes them and chats with them (machine-translated when languages differ). Basic network integration is free for platforms. Optional network services are separate; all four start at zero RUB. Platforms set their own user-facing pricing (see the network rules). API 1.0.1 replaces production in GET /v1/capabilities with mode. Existing keys remain valid. Older 0.x labels describe prelaunch development, not additional public API versions. Check optional capabilities per environment; version alone does not enable them. ## How an integration works 1. Apply on pereval.dating. Once approved, issue an API key in the dashboard — separately for the test and live environments. 2. Your backend pushes the profile of every user who opted in: `PUT /v1/members/{external_id}` (or `PUT /v1/members` in batches). 3. Your app shows `GET /v1/members/{external_id}/feed` next to (or mixed with) your own users. 4. Likes go to `POST /v1/likes`, "seen and skipped" to `POST /v1/dislikes`. A mutual like creates a match; both platforms get `match.created`. 5. Messages go to `POST /v1/matches/{match_id}/messages`; the other side's platform gets `message.created` translated into its user's language. Report reading with `POST /v1/matches/{match_id}/read`. 6. The network notifies you through signed webhooks (see `webhooks`) — or you pull events with `GET /v1/events`. ## Optional network services (API 1.0.0) Boosts, superlikes, incognito and rewind are optional. Basic integration does not require them. All four live SKUs start at zero RUB; TEST credits remain isolated and are not money. Check `commerce_enabled`, `commerce_live_zero_only` and `commerce_pilot` in capabilities. Live entitlement enforcement requires explicit administrative enrollment and a separate spending key; existing live clients retain legacy superlike/rewind behavior until enrollment. Positive RUB payments are not supported in this release. See https://pereval.dating/en/docs/services/ for onboarding. Enrolled partners use `X-Action-Ref` for superlikes/rewind and `X-Commerce-Key` for order commits, including zero-price orders. Retry the same logical action/order with the same reference. Opt-in boost delivery supports swipe/search independently of the buyer's UI. Map-based platforms can buy boosts, but map receiving is not supported. Stable cursors and X-Feed-Request-Ref identify logical searches; promotion metadata counts API placements, never measured human views. ## Conventions - Base URL: `https://api.pereval.dating` for both environments; the key decides which one. Auth: `Authorization: Bearer `. - `external_id` is **your** user id (any string, 1–128 chars). `network_id` is the network's id of a member of another app (UUID). You never see other platforms' internal ids. - All bodies are JSON (UTF-8). Times are RFC 3339 in UTC. - Errors: HTTP status + `{"error": "", "message": ""}`. Codes are stable; messages are not. `503 internal` means the network is temporarily unavailable (even on auth) — retry with a delay, your key is fine. - Photo verification: tell the network how and when you checked that a person matches their photos (`verification`). The `photo_verified` mark is computed by the network: it counts once the network has approved your verification method, and only for photos that are not newer than the check. - Photo check by the network: no verification of your own? `POST /v1/photo-checks` gives a link to a network page where the person shows a gesture and takes a picture; you get a per-photo result and may then claim `verification: {provider: "pereval", check_id}` — it counts even before your own method is approved. Free. - Rate limit: 600 requests/minute per platform (burst 100) → `429 rate_limited`. - Users must opt in. Never push a user who hasn't explicitly enabled "show me in the network". - Languages are ISO 639-1 codes (`de`, not `German`). The network translates between 38 languages — `GET /v1/languages`. - Inspect `GET /v1/capabilities` before enabling optional functionality. Videos are disabled in production until frame moderation exists; nonempty video input is rejected. - Webhooks are at-least-once: deduplicate by event `id`. Pending events retain causal `seq` order per partner/recipient, including retries; different recipients progress independently. Expired (7 days) or permanently failed events are not replayed forever: reconcile matches/history after an outage. - Suspending a platform immediately hides its members from feed/likes and prohibits new likes/messages in either direction. Queued webhooks pause without deletion; normal 7-day event retention still applies. Resumption does not remove member-level freezes or reopen closed/erased matches. - Personal report materials have an absolute 60-day active-database limit from original submission; photo-check materials and metadata have the same limit from original check creation, including unresolved disputes. Disputes, appeals, updates and decisions do not extend it. Expiry is neither photo approval nor an unban. Operators must review before expiry. Message, erased-chat archive and outbox retention are unchanged. Closed backups are retained for at most 30 further days; purge before the snapshot is mandatory to keep the total within 90 days. Backup guarantees depend on the infrastructure pre-snapshot cleanup/deadline gate. contact: name: Pereval partner support url: https://pereval.dating/en/contact/ license: name: Open protocol — implement freely url: https://pereval.dating/en/docs/ servers: - url: https://api.pereval.dating description: Test and live — the API key selects the environment security: - bearer: [] tags: - name: Members description: Push, update and remove your users' network profiles. - name: Feed description: People from other apps who fit your user. - name: Likes & matches description: Likes and dislikes across apps; a mutual like creates a match that opens chat. - name: Messages description: Text chat inside a match, machine-translated when the recipient doesn't speak the sender's language. - name: Safety description: Blocks and reports. Reports reach the reported member's platform; serious ones suspend the member network-wide. - name: Languages description: Languages the network translates profiles and messages into. - name: Photo check description: > The network's photo check for platforms without their own: the person takes it on a network page (consent, a requested gesture, a camera picture); the network compares the picture with each profile photo. - name: Events description: Pull events yourself — for platforms without a webhook URL and for recovery after an outage. - name: MCP description: > Model Context Protocol JSON-RPC 2.0 for AI agents. Same Bearer key as REST. POST /mcp — methods initialize, tools/list, tools/call, ping. Protocol version 2024-11-05. paths: /v1/members/{external_id}/boost: get: summary: Current own boost and remaining time; voluntary cancellation is not supported security: - External1_PartnerKey: [] parameters: - name: external_id in: path required: true schema: type: string responses: "200": description: Boost state content: application/json: schema: $ref: "#/components/schemas/External1_Boost" "404": description: Own boost not found "503": description: Pilot unavailable operationId: commerceBoost tags: - Commerce /v1/commerce/delivery: put: summary: Declare receiving support independently of purchases security: - External1_PartnerKey: [] requestBody: required: true content: application/json: schema: type: object required: - format - enabled properties: format: enum: - swipe - search - none enabled: type: boolean responses: "200": description: Configured format version 1 "422": description: Unsupported/inconsistent format; map receiving is not implemented "503": description: Pilot unavailable operationId: commerceDelivery tags: - Commerce /v1/commerce/catalog: get: summary: Catalog in the enrolled account currency security: - External1_PartnerKey: [] responses: "200": description: Success content: application/json: schema: type: object properties: currency: type: string enum: - TEST - RUB test_only: type: boolean items: type: array items: $ref: "#/components/schemas/External1_Product" required: - currency - test_only - items "401": description: See commerce-pilot.md for error codes content: application/json: schema: $ref: "#/components/schemas/External1_Error" "402": description: See commerce-pilot.md for error codes content: application/json: schema: $ref: "#/components/schemas/External1_Error" "403": description: See commerce-pilot.md for error codes content: application/json: schema: $ref: "#/components/schemas/External1_Error" "404": description: See commerce-pilot.md for error codes content: application/json: schema: $ref: "#/components/schemas/External1_Error" "409": description: See commerce-pilot.md for error codes content: application/json: schema: $ref: "#/components/schemas/External1_Error" "422": description: See commerce-pilot.md for error codes content: application/json: schema: $ref: "#/components/schemas/External1_Error" "429": description: See commerce-pilot.md for error codes content: application/json: schema: $ref: "#/components/schemas/External1_Error" "503": description: See commerce-pilot.md for error codes content: application/json: schema: $ref: "#/components/schemas/External1_Error" operationId: commerceCatalog tags: - Commerce /v1/commerce/balance: get: summary: TEST credits or zero-only RUB balance security: - External1_PartnerKey: [] responses: "200": description: Success content: application/json: schema: type: object properties: currency: type: string enum: - TEST - RUB test_only: type: boolean balance: type: integer format: int64 minimum: 0 required: - currency - test_only - balance "401": description: See commerce-pilot.md for error codes content: application/json: schema: $ref: "#/components/schemas/External1_Error" "402": description: See commerce-pilot.md for error codes content: application/json: schema: $ref: "#/components/schemas/External1_Error" "403": description: See commerce-pilot.md for error codes content: application/json: schema: $ref: "#/components/schemas/External1_Error" "404": description: See commerce-pilot.md for error codes content: application/json: schema: $ref: "#/components/schemas/External1_Error" "409": description: See commerce-pilot.md for error codes content: application/json: schema: $ref: "#/components/schemas/External1_Error" "422": description: See commerce-pilot.md for error codes content: application/json: schema: $ref: "#/components/schemas/External1_Error" "429": description: See commerce-pilot.md for error codes content: application/json: schema: $ref: "#/components/schemas/External1_Error" "503": description: See commerce-pilot.md for error codes content: application/json: schema: $ref: "#/components/schemas/External1_Error" operationId: commerceBalance tags: - Commerce /v1/commerce/quotes: post: summary: Create a five-minute price snapshot; no debit security: - External1_PartnerKey: [] responses: "200": description: Success content: application/json: schema: $ref: "#/components/schemas/External1_Quote" "401": description: See commerce-pilot.md for error codes content: application/json: schema: $ref: "#/components/schemas/External1_Error" "402": description: See commerce-pilot.md for error codes content: application/json: schema: $ref: "#/components/schemas/External1_Error" "403": description: See commerce-pilot.md for error codes content: application/json: schema: $ref: "#/components/schemas/External1_Error" "404": description: See commerce-pilot.md for error codes content: application/json: schema: $ref: "#/components/schemas/External1_Error" "409": description: See commerce-pilot.md for error codes content: application/json: schema: $ref: "#/components/schemas/External1_Error" "422": description: See commerce-pilot.md for error codes content: application/json: schema: $ref: "#/components/schemas/External1_Error" "429": description: See commerce-pilot.md for error codes content: application/json: schema: $ref: "#/components/schemas/External1_Error" "503": description: See commerce-pilot.md for error codes content: application/json: schema: $ref: "#/components/schemas/External1_Error" requestBody: required: true content: application/json: schema: type: object properties: member: type: string minLength: 1 maxLength: 256 sku: type: string minLength: 1 maxLength: 80 quantity: type: integer minimum: 1 maximum: 1000000 required: - member - sku - quantity operationId: commerceQuote tags: - Commerce /v1/commerce/orders: post: summary: Atomically purchase entitlement; durable replay by external_order_ref security: - External1_PartnerKey: [] External1_SpendKey: [] responses: "200": description: Success content: application/json: schema: $ref: "#/components/schemas/External1_Order" "401": description: See commerce-pilot.md for error codes content: application/json: schema: $ref: "#/components/schemas/External1_Error" "402": description: See commerce-pilot.md for error codes content: application/json: schema: $ref: "#/components/schemas/External1_Error" "403": description: See commerce-pilot.md for error codes content: application/json: schema: $ref: "#/components/schemas/External1_Error" "404": description: See commerce-pilot.md for error codes content: application/json: schema: $ref: "#/components/schemas/External1_Error" "409": description: See commerce-pilot.md for error codes content: application/json: schema: $ref: "#/components/schemas/External1_Error" "422": description: See commerce-pilot.md for error codes content: application/json: schema: $ref: "#/components/schemas/External1_Error" "429": description: See commerce-pilot.md for error codes content: application/json: schema: $ref: "#/components/schemas/External1_Error" "503": description: See commerce-pilot.md for error codes content: application/json: schema: $ref: "#/components/schemas/External1_Error" requestBody: required: true content: application/json: schema: type: object properties: quote_id: type: string format: uuid external_order_ref: type: string minLength: 1 maxLength: 128 required: - quote_id - external_order_ref operationId: commerceOrder tags: - Commerce /v1/members/{external_id}/entitlements: get: summary: List own subject entitlements security: - External1_PartnerKey: [] responses: "200": description: Success content: application/json: schema: type: object properties: items: type: array items: $ref: "#/components/schemas/External1_Grant" required: - items "401": description: See commerce-pilot.md for error codes content: application/json: schema: $ref: "#/components/schemas/External1_Error" "402": description: See commerce-pilot.md for error codes content: application/json: schema: $ref: "#/components/schemas/External1_Error" "403": description: See commerce-pilot.md for error codes content: application/json: schema: $ref: "#/components/schemas/External1_Error" "404": description: See commerce-pilot.md for error codes content: application/json: schema: $ref: "#/components/schemas/External1_Error" "409": description: See commerce-pilot.md for error codes content: application/json: schema: $ref: "#/components/schemas/External1_Error" "422": description: See commerce-pilot.md for error codes content: application/json: schema: $ref: "#/components/schemas/External1_Error" "429": description: See commerce-pilot.md for error codes content: application/json: schema: $ref: "#/components/schemas/External1_Error" "503": description: See commerce-pilot.md for error codes content: application/json: schema: $ref: "#/components/schemas/External1_Error" parameters: - name: external_id in: path required: true schema: type: string operationId: commerceEntitlements tags: - Commerce /v1/members/{external_id}/incognito: get: operationId: commerceGetIncognito tags: - Commerce parameters: - name: external_id in: path required: true schema: type: string summary: Read the member's current incognito setting security: - External1_PartnerKey: [] responses: "200": description: Success content: application/json: schema: type: object properties: enabled: type: boolean required: - enabled "401": description: Invalid partner credentials "404": description: Member does not exist or is inactive "503": description: Commerce is unavailable put: summary: Explicitly enable incognito with a valid right or freely disable it security: - External1_PartnerKey: [] responses: "200": description: Success content: application/json: schema: type: object properties: enabled: type: boolean required: - enabled "401": description: See commerce-pilot.md for error codes content: application/json: schema: $ref: "#/components/schemas/External1_Error" "402": description: See commerce-pilot.md for error codes content: application/json: schema: $ref: "#/components/schemas/External1_Error" "403": description: See commerce-pilot.md for error codes content: application/json: schema: $ref: "#/components/schemas/External1_Error" "404": description: See commerce-pilot.md for error codes content: application/json: schema: $ref: "#/components/schemas/External1_Error" "409": description: See commerce-pilot.md for error codes content: application/json: schema: $ref: "#/components/schemas/External1_Error" "422": description: See commerce-pilot.md for error codes content: application/json: schema: $ref: "#/components/schemas/External1_Error" "429": description: See commerce-pilot.md for error codes content: application/json: schema: $ref: "#/components/schemas/External1_Error" "503": description: See commerce-pilot.md for error codes content: application/json: schema: $ref: "#/components/schemas/External1_Error" requestBody: required: true content: application/json: schema: type: object properties: enabled: type: boolean required: - enabled parameters: - name: external_id in: path required: true schema: type: string operationId: commerceIncognito tags: - Commerce /healthz: get: security: [] operationId: health summary: Process liveness responses: "200": description: Process is running /readyz: get: security: [] operationId: ready summary: Database readiness, not a check of external moderation or AI availability responses: "200": description: Database responds within two seconds "503": description: Database unavailable (not_ready) /v1/capabilities: get: operationId: capabilities summary: Runtime protocol and feature configuration responses: "200": description: Configuration, not proof that external dependencies are healthy content: application/json: schema: type: object required: - protocol_version - mode - client_message_id - videos - photo_checks - profile_moderation - commerce_enabled - commerce_live_zero_only - commerce_pilot properties: protocol_version: type: string const: 1.0.1 mode: type: string enum: - sandbox - live description: Access enforced for the authenticated key. Sandbox uses test data. Live uses real data. If mode is missing or unknown, stop and verify access. commerce_enabled: type: boolean description: Full network commerce is enabled; does not imply this partner is enrolled commerce_live_zero_only: type: boolean description: Live checkout accepts zero RUB only; no monetary payment processor commerce_pilot: type: boolean description: TEST-only development pilot; false in production client_message_id: type: boolean const: true videos: type: boolean description: False in the production executable photo_checks: type: boolean description: Facecheck URL is configured profile_moderation: type: boolean description: Profile moderation is configured "401": description: Missing invalid or suspended platform key: null /mcp: post: tags: - MCP operationId: mcp summary: Model Context Protocol (JSON-RPC) description: > Same API key as the REST API. Methods: `initialize`, `tools/list`, `tools/call`, `ping`. Tools: `upsert_member`, `get_feed`, `like`, `dislike`, `send_message`, `list_events`, `list_languages`. A `tools/call` result is JSON in `result.content[].text`. RPC errors use JSON-RPC `error`; tool failures set `isError: true` and keep HTTP 200. Missing key — HTTP 401. requestBody: required: true content: application/json: schema: type: object required: - jsonrpc - method properties: jsonrpc: type: string enum: - "2.0" id: description: number, string or null (null = notification, no response) method: type: string example: tools/list params: type: object responses: "200": description: JSON-RPC result or error "401": description: Missing or invalid API key /v1/members: put: tags: - Members operationId: upsertMembers summary: Add or update members in a batch description: > Up to 100 members per request, each validated on its own — one bad profile doesn't block the rest. Use it for the first upload of users who turned the network on. requestBody: required: true content: application/json: schema: type: object required: - items properties: items: type: array minItems: 1 maxItems: 100 items: allOf: - type: object required: - external_id properties: external_id: type: string minLength: 1 maxLength: 128 description: Your user id - $ref: "#/components/schemas/MemberInput" responses: "200": description: Per-item results in the same order content: application/json: schema: type: object required: - items properties: items: type: array items: type: object required: - external_id properties: external_id: type: string network_id: type: string format: uuid description: Present when stored photo_verified: type: boolean description: Whether the verification mark counts — see the single upsert verification: $ref: "#/components/schemas/VerificationStatus" error: type: object description: Present when this item was rejected properties: code: type: string enum: - invalid - location_change_limited message: type: string "422": $ref: "#/components/responses/Invalid" /v1/members/{external_id}: parameters: - $ref: "#/components/parameters/ExternalID" put: tags: - Members operationId: upsertMember summary: Add or update a member description: > Idempotent upsert by `external_id`. Call it when a user opts in and whenever their profile, photos, preferences or consents change. **Hidden members.** `consent.network: false` hides the member instead of removing them: the same `network_id`, matches, conversations, dislikes and blocks stay; the member is not in anyone's feed and gets no feed (`409 member_hidden`); they can only like back someone who already liked them (that is a match), no super likes. Messages in existing matches flow both ways. Photos are optional while hidden. Send `consent.network: true` again and the member is visible with all their history. Use this when the user turns the network off; use DELETE only to erase their network data (an explicit "delete my data from the network" or account deletion). Coordinates are rounded to 0.01° (~1 km) by the network; send city-level precision anyway. The city may change once a day: a new profile city or country sooner than 24 h after the previous change returns `409 location_change_limited`. The bio's language is detected by the network; the bio is translated on demand into the main languages of members who are reading the feed. **Moderation.** A new profile, or one with changed photos, name or bio, is checked before it appears in feeds — usually within seconds. Explicit photos, insults or obscenity, contact details (phone, link, messenger handle) and photos that cannot be downloaded are not allowed. On rejection you get `member.rejected` with the reason; the profile is hidden and cannot like until you send a corrected one (resending the same profile does not trigger a new check). Photos and text that already passed are not checked again. requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/MemberInput" example: consent: network: true cross_language: true world: false given_at: 2026-10-24T12:00:00Z text_version: 2026-10-24 display_name: Anna birth_year: 1994 gender: female age_min: 28 age_max: 40 languages: - ru - en city: name: Moscow country: RU lat: 55.75 lon: 37.62 bio: Hiking, jazz and good coffee photos: - https://cdn.example-dating.app/u/123/1.jpg photo_verified: true height_cm: 168 responses: "200": description: Stored content: application/json: schema: type: object required: - network_id properties: network_id: type: string format: uuid description: The member's id in the network. Stable across updates. photo_verified: type: boolean description: "Whether the verification mark counts: other apps see it and `verified_only` keeps the person" verification: $ref: "#/components/schemas/VerificationStatus" "400": $ref: "#/components/responses/BadJSON" "401": $ref: "#/components/responses/Unauthorized" "409": description: "`location_change_limited` — the city can change once a day" content: application/json: schema: $ref: "#/components/schemas/Error" "422": $ref: "#/components/responses/Invalid" "429": $ref: "#/components/responses/RateLimited" delete: tags: - Members operationId: removeMember summary: Erase a member from the network description: > Call when the user deletes their account or asks to delete their data from the network (to just turn the network off, send `consent.network: false` — see the upsert). Their open matches are closed: the other platforms get `match.closed` with `reason` (`account_deleted` or `left_network`) and `peer_deleted: true` — show the chat as "Account deleted" / "Left the network", read-only. the messages stay with the other person (like Telegram); the profile (name, photos, bio, city), likes, dislikes and blocks are erased. If the user comes back, it is a new member. parameters: - name: reason in: query description: "`account_deleted` or `left_network` (default) — goes to the other side in `match.closed`" schema: type: string enum: - left_network - account_deleted default: left_network responses: "204": description: Removed "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" /v1/members/{external_id}/deactivate: parameters: - $ref: "#/components/parameters/ExternalID" post: tags: - Members operationId: deactivateMember summary: The user is deleting their account (can restore within 30 days) description: > Deferred account deletion: the member disappears from feeds and "liked you", their matches are frozen — the other platforms get `match.frozen` and should show "Account deleted"; nobody can write (`409 match_frozen`). Nothing is erased. Call `/restore` if the user comes back, or `DELETE /v1/members/{external_id}?reason=account_deleted` when the 30 days are over; if you don't, the network erases the member itself after 30 days. responses: "204": description: Deleting (idempotent) "403": $ref: "#/components/responses/Forbidden" "404": $ref: "#/components/responses/NotFound" /v1/members/{external_id}/reinstate: parameters: - $ref: "#/components/parameters/ExternalID" post: tags: - Members operationId: reinstateMember summary: Bring back a member the network hid after reports description: > Your moderator reviewed the reports (`member.reported`) and found nothing wrong. The open reports are closed, the member is back in feeds and their frozen matches resume (`match.unfrozen` to the other platforms). A member who is deleting their account can't be reinstated (`403`). responses: "204": description: Reinstated (idempotent) "403": $ref: "#/components/responses/Forbidden" "404": $ref: "#/components/responses/NotFound" /v1/members/{external_id}/restore: parameters: - $ref: "#/components/parameters/ExternalID" post: tags: - Members operationId: restoreMember summary: The user restored their account description: Everything is back as it was; the frozen matches resume (`match.unfrozen` to the other platforms). responses: "204": description: Restored (idempotent) "403": $ref: "#/components/responses/Forbidden" "404": $ref: "#/components/responses/NotFound" /v1/members/{external_id}/active: parameters: - $ref: "#/components/parameters/ExternalID" post: tags: - Members operationId: touchMember summary: Mark a member as active now description: Feeds prefer recently active people and hide those inactive for 30+ days. For many users use `POST /v1/activity`. responses: "204": description: Updated "404": $ref: "#/components/responses/NotFound" /v1/activity: post: tags: - Members operationId: touchMembers summary: Mark many members as active description: Up to 1000 external ids — e.g. everyone who opened the app in the last few minutes. Unknown ids are skipped. requestBody: required: true content: application/json: schema: type: object required: - external_ids properties: external_ids: type: array minItems: 1 maxItems: 1000 items: type: string responses: "200": description: How many members were found and updated content: application/json: schema: type: object properties: updated: type: integer "422": $ref: "#/components/responses/Invalid" /v1/members/{external_id}/feed: parameters: - $ref: "#/components/parameters/ExternalID" get: tags: - Feed operationId: getFeed summary: People from other apps for this member description: > Members of **other** platforms only (you show your own users yourself). A candidate appears when: opposite gender; each one's age is inside the other's range; within 50 km or `radius_km` (or the same city and country when coordinates are missing); they share a language, or both consented to cross-language chat; they share an intent; active in the last 30 days; not liked, not disliked in the last 30 days; no block either way. Most recently active first. Filters only narrow what the viewer's profile already allows. `age_min`/`age_max` intersect the viewer's range (an empty intersection is an empty feed and `200`, not an error; `age_min` > `age_max` in the query is `422`). `intent` must be one of the viewer's intents, or `422`. `language` is an ISO 639-1 code and still requires a shared language or both consents to cross-language chat. `gender`, if sent, must be the opposite of the viewer, or `422`. Pages use `cursor` from the previous response's `next_cursor`. The same request without `cursor` returns the same people. A member sees at most 200 distinct new people a day (UTC) — `remaining_today`. Repeating people already shown today does not spend it. At zero, new people stop and people already shown today still come back. A dislike hides a profile for 30 days; it is not how you turn the page. A member hidden after reports or deleting their account gets no feed (`403`). `bio` is translated into the viewer's main language when the viewer doesn't speak its language — show the "translated" mark and let the user see `bio_original`. Translations are made on demand: the first time a profile is shown to someone with a new main language it may come in the original (`bio_translated: false`), and later feeds carry the translation. `scope=world` drops the distance condition: people from any city and country, but only those with `consent.world`. The viewer needs that consent too, otherwise `409 world_consent_required`. Language and intent conditions still apply. The 200 a day limit is shared by both scopes. Show the city and `country` on the card. Viewer filters: `radius_km` widens or narrows the nearby search (ignored with `scope=world`); `verified_only=true` keeps only `photo_verified` profiles (— marks the network counts, see `verification`); `height_min`/`height_max` keep people within that height — people who didn't specify their height still pass, so a height filter never empties the feed by itself. Store your users' filters yourself and send them with every request. `lat`+`lon` (and optional `city`/`country`) search nearby around that point instead of the viewer's profile city — the profile city does not change. `distance_km` is present only when that person turned on `show_distance`. parameters: - name: X-Feed-Request-Ref in: header required: false description: Logical search reference for opt-in boost delivery; preserve across retries/pages, change for a new search. schema: type: string maxLength: 128 - name: limit in: query schema: type: integer minimum: 1 maximum: 50 default: 20 - name: scope in: query schema: type: string enum: - nearby - world default: nearby - name: radius_km in: query description: Search radius for `scope=nearby` schema: type: integer minimum: 1 maximum: 300 default: 50 - name: verified_only in: query description: Only people with `photo_verified` schema: type: boolean default: false - name: height_min in: query description: Minimum height, cm; people without a height pass schema: type: integer minimum: 120 maximum: 230 - name: height_max in: query description: Maximum height, cm, not less than `height_min`; people without a height pass schema: type: integer minimum: 120 maximum: 230 - name: lat in: query description: Search centre latitude for `scope=nearby`; requires `lon`. Does not change the viewer's city. schema: type: number minimum: -90 maximum: 90 - name: lon in: query description: Search centre longitude for `scope=nearby`; requires `lat` schema: type: number minimum: -180 maximum: 180 - name: city in: query description: Place name for the same-city fallback when a profile has no coordinates schema: type: string - name: country in: query description: ISO 3166-1 alpha-2 with `city` schema: type: string - name: age_min in: query description: Narrows the viewer's age range. Empty intersection with the profile returns an empty feed, not 422. schema: type: integer minimum: 18 maximum: 100 - name: age_max in: query description: Narrows the viewer's age range. Must be ≥ age_min when both are set. schema: type: integer minimum: 18 maximum: 100 - name: intent in: query description: One intent from the viewer's profile. Candidates must have it too. schema: type: string enum: - serious - casual - friendship - arrangement - name: language in: query description: ISO 639-1. Candidates must list it. Does not bypass the shared-language rule. schema: type: string minLength: 2 maxLength: 2 - name: gender in: query description: Must be the opposite of the viewer. schema: type: string enum: - male - female - name: cursor in: query description: Opaque next page, from the previous next_cursor. Invalid cursor is 422. schema: type: string responses: "200": description: Candidates content: application/json: schema: type: object required: - items - remaining_today properties: items: type: array items: $ref: "#/components/schemas/Profile" remaining_today: type: integer description: How many new people this member can still be shown today (UTC). Repeats do not decrease it. next_cursor: type: string description: Pass as cursor for the next page. Absent on the last page. "404": $ref: "#/components/responses/NotFound" "409": description: "`world_consent_required` — `scope=world` for a member without `consent.world`; `member_hidden` — the member is hidden (`consent.network: false`)" content: application/json: schema: $ref: "#/components/schemas/Error" "422": $ref: "#/components/responses/Invalid" /v1/likes: post: tags: - Likes & matches operationId: like summary: Like a member of another app description: > The liked member's platform gets `like.received`. If the like is mutual a match is created and both platforms get `match.created`. Liking a member of your own app through the network is not allowed (`403`). - You can only like someone your user could see: a block either way, the other environment (test vs live), or a hidden member who hasn't liked your user → `404`, as if the profile didn't exist. - A repeated like changes nothing and sends no event; upgrading a like to a super like sends `like.received` again. - While your user's profile is in moderation, their likes are stored but the recipient gets `like.received` only after the profile passes; if it is rejected, shown likes are withdrawn (`like.withdrawn`, `rejected`). **Super like**: `super: true` with an optional `message` (up to 200 characters, no contact details — `422`). The recipient sees it right away, before any match: `like.received` has `super: true` and the sender's profile carries `super_like` with the message in the recipient's language; in the feed and in incoming likes such a person comes first. Show it clearly highlighted. When a match happens, the message becomes the first message of the chat (`message.created` to the recipient's platform). At most 5 super likes a day per member — then `429 super_like_limit`; a regular like upgraded to a super like counts too. How many your users get (and whether they pay) is up to you. parameters: - name: X-Action-Ref in: header required: false description: Required for superlikes after commerce enrollment, including zero-price entitlements. Same reference only for the same action payload. schema: type: string maxLength: 128 requestBody: required: true content: application/json: schema: type: object required: - from - to properties: from: type: string description: Your user's external_id to: type: string format: uuid description: network_id from the feed super: type: boolean default: false message: type: string maxLength: 200 description: "Super like only: shown before the match, becomes the first message after it" responses: "200": description: Like stored content: application/json: schema: type: object required: - matched properties: matched: type: boolean match_id: type: string format: uuid description: Present when matched "403": $ref: "#/components/responses/Forbidden" "404": $ref: "#/components/responses/NotFound" "409": description: "`member_hidden` — a hidden member can only like back someone who liked them, without a super like" "422": $ref: "#/components/responses/Invalid" "429": description: "`super_like_limit` — more than 5 super likes in 24 h" /v1/likes/{network_id}: delete: tags: - Likes & matches operationId: unlike summary: Take a like (or super like) back before it became a match description: The liked member's platform gets `like.withdrawn`. After a match — `409 matched`; close the match instead. parameters: - name: X-Action-Ref in: header required: false description: Required after commerce enrollment. Replays of the same undo must use the same reference. schema: type: string maxLength: 128 - name: network_id in: path required: true schema: type: string format: uuid - name: from in: query required: true schema: type: string description: Your user's external_id responses: "204": description: Like removed "404": $ref: "#/components/responses/NotFound" "409": description: "`matched` — the like already became a match" /v1/dislikes/{network_id}: delete: tags: - Likes & matches operationId: undislike summary: Bring a skipped profile back description: Removes the dislike — the profile may appear in the feed again. parameters: - name: X-Action-Ref in: header required: false description: Required after commerce enrollment. Replays of the same undo must use the same reference. schema: type: string maxLength: 128 - name: network_id in: path required: true schema: type: string format: uuid - name: from in: query required: true schema: type: string description: Your user's external_id responses: "204": description: Dislike removed "404": $ref: "#/components/responses/NotFound" /v1/dislikes: post: tags: - Likes & matches operationId: dislike summary: Your user saw a profile and didn't like it description: > Send it when your user swiped left or scrolled past a profile without liking. Only your app knows what the user actually saw, so the network never treats a served feed as seen. The profile leaves the user's feed for 30 days. One pair or a batch of up to 100. requestBody: required: true content: application/json: schema: oneOf: - $ref: "#/components/schemas/Pair" - type: object required: - items properties: items: type: array minItems: 1 maxItems: 100 items: $ref: "#/components/schemas/Pair" responses: "204": description: Stored "403": $ref: "#/components/responses/Forbidden" "404": $ref: "#/components/responses/NotFound" /v1/members/{external_id}/likes: parameters: - $ref: "#/components/parameters/ExternalID" get: tags: - Likes & matches operationId: listLikes summary: Who liked this member and waits for an answer description: Without mutual likes, dislikes and blocks. Rebuilds "Liked you" when events were lost. parameters: - name: limit in: query schema: type: integer minimum: 1 maximum: 100 default: 50 responses: "200": description: Incoming likes, newest first content: application/json: schema: type: object required: - items properties: items: type: array items: type: object required: - from - liked_at properties: from: $ref: "#/components/schemas/Profile" liked_at: type: string format: date-time "404": $ref: "#/components/responses/NotFound" /v1/members/{external_id}/matches: parameters: - $ref: "#/components/parameters/ExternalID" get: tags: - Likes & matches operationId: listMatches summary: Open matches of a member responses: "200": description: Matches, newest first content: application/json: schema: type: object required: - items properties: items: type: array items: type: object required: - match_id - created_at - with properties: match_id: type: string format: uuid created_at: type: string format: date-time with: $ref: "#/components/schemas/Profile" frozen: type: boolean description: Omitted when false freeze_reason: type: string enum: - account_deleting - suspended - partner_suspended description: Present when frozen /v1/matches/{match_id}: parameters: - $ref: "#/components/parameters/MatchID" delete: tags: - Likes & matches operationId: unmatch summary: Close or erase a match (unmatch) description: > Without `erase` the match is closed and both keep the history (`match.closed`, `reason: unmatched`). With `erase=true` the match, its messages and both likes are deleted for both — the other platform gets `match.erased` and should remove the chat; the two won't meet in each other's feeds for `cooldown_days`. If either of them reported the other, a hidden copy of the chat is kept for moderation for 90 days. To hide the history only for your user, use `POST /v1/matches/{match_id}/clear`. parameters: - name: by in: query required: true schema: type: string description: external_id of your user who unmatches - name: erase in: query schema: type: boolean default: false description: Delete the match, messages and likes for both - name: cooldown_days in: query schema: type: integer minimum: 0 maximum: 365 default: 30 description: with `erase`. Days before they can see each other in the feed again; for "never" block instead responses: "204": description: Closed (`match.closed`) or erased (`match.erased`) "404": $ref: "#/components/responses/NotFound" "422": $ref: "#/components/responses/Invalid" /v1/matches/{match_id}/clear: parameters: - $ref: "#/components/parameters/MatchID" post: tags: - Messages operationId: clearHistory summary: Delete the chat history for one side description: > "Delete chat" for your user only: the history before now is no longer returned to them; the other person keeps everything, the match stays, and new messages go both ways as usual. requestBody: required: true content: application/json: schema: type: object required: - as properties: as: type: string description: external_id of your user responses: "204": description: Cleared "404": $ref: "#/components/responses/NotFound" /v1/matches/{match_id}/messages: parameters: - $ref: "#/components/parameters/MatchID" post: tags: - Messages operationId: sendMessage summary: Send a message description: > The network detects the language from the text; short replies ("ok", "haha", emoji) are attributed to one of the sender's languages, the main one first. If the recipient doesn't speak it, the message is translated in the background into the recipient's main language, and the recipient's platform gets `message.created` once the translation is ready. If translation fails the message is still delivered in the original language (`translated: false`). Cheap scam signals are checked: links, phone numbers and invitations to other messengers early in a chat, talk about money, the same text sent to many people. The message is delivered anyway, with `suspicious` and `flags`, so the recipient's app can show a warning. Members in their first 7 days can start at most 20 conversations a day (`429 first_messages_limit`); replying in existing conversations is unlimited. optional `client_message_id` is sender-scoped (not match-scoped), at most 128 UTF-8 bytes, without surrounding whitespace. Repeating the same ID, match and trimmed text returns the original message, including after match closure; changing match/text returns `409 idempotency_conflict`. Ownership/auth are checked before replay. A suspended platform key is never authorized by a replay. After message retention or explicit match erasure, the original is no longer available: this is not a permanent idempotency reservation. Persist the returned message ID; recover a timed-out response through author history. requestBody: required: true content: application/json: schema: type: object required: - from - text properties: from: type: string description: Sender's external_id text: type: string minLength: 1 maxLength: 4000 client_message_id: type: string minLength: 1 maxLength: 128 description: Optional sender-scoped retry ID; maximum 128 UTF-8 bytes, no surrounding whitespace responses: "200": description: Sent content: application/json: schema: $ref: "#/components/schemas/Message" "404": $ref: "#/components/responses/NotFound" "409": description: match_closed, match_frozen (including partner suspension), or idempotency_conflict content: application/json: schema: $ref: "#/components/schemas/Error" "422": $ref: "#/components/responses/Invalid" "429": description: "`first_messages_limit` — a new member started too many conversations today, or `rate_limited`" content: application/json: schema: $ref: "#/components/schemas/Error" get: tags: - Messages operationId: listMessages summary: Conversation history as seen by a member description: > Newest first by (created_at, id). Messages from the other side are in the viewer's language with the original and scam flags; own messages carry `read_at` and, when supplied, `client_message_id` for retry reconciliation. The `before` message must belong to this match. Closure preserves history; erasure removes it. parameters: - name: as in: query required: true schema: type: string description: external_id of the viewer - name: before in: query schema: type: string format: uuid description: Message id — returns older messages (pagination cursor) - name: limit in: query schema: type: integer minimum: 1 maximum: 100 default: 50 responses: "200": description: Messages content: application/json: schema: type: object required: - items properties: items: type: array items: $ref: "#/components/schemas/Message" "404": $ref: "#/components/responses/NotFound" /v1/matches/{match_id}/read: parameters: - $ref: "#/components/parameters/MatchID" post: tags: - Messages operationId: markRead summary: Your user read the conversation description: Marks the other side's messages up to `up_to` (inclusive) as read; the other platform gets `message.read`. requestBody: required: true content: application/json: schema: type: object required: - as - up_to properties: as: type: string description: external_id of the reader up_to: type: string format: uuid description: Id of the last message read responses: "204": description: Marked "404": $ref: "#/components/responses/NotFound" /v1/blocks: post: tags: - Safety operationId: block summary: Block a member description: > Both disappear from each other's feeds for good. Without `erase` an open match between them is closed (`match.closed`, `reason: blocked`), the history stays. With `erase: true` the match, messages and likes are deleted for both (`match.erased`, `reason: blocked`); if either reported the other, a hidden copy is kept for moderation for 90 days. requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/Pair" responses: "204": description: Blocked "404": $ref: "#/components/responses/NotFound" /v1/reports: post: tags: - Safety operationId: report summary: Report a member description: > The reported member's platform gets `member.reported`. A report with `reason: underage` or `commercial`, or reports from 3 different people, suspends the member from the network until review (`member.suspended`): they are out of feeds and their matches are frozen (`match.frozen` with `reason: suspended`, `409 match_frozen` for both). Their platform brings them back with `POST /v1/members/{external_id}/reinstate`. requestBody: required: true content: application/json: schema: type: object required: - from - to - reason properties: from: type: string to: type: string format: uuid reason: type: string enum: - fake - scam - spam - offensive - underage - commercial - other description: "`commercial` — offers sex for money; suspends the member at once" comment: type: string maxLength: 1000 responses: "204": description: Reported "404": $ref: "#/components/responses/NotFound" "422": $ref: "#/components/responses/Invalid" /v1/languages: get: tags: - Languages operationId: listLanguages summary: Translation languages description: > ISO 639-1 codes the network translates between. Members may list other ISO 639-1 codes in `languages`, but a member whose main language is not in this list reads others in the original. responses: "200": description: Languages content: application/json: schema: type: object required: - translated properties: translated: type: array items: type: string description: ISO 639-1 codes example: translated: - ru - en - uk - be - kk - de - fr - es - it - pt - nl - pl - cs - sk - ro - hu - bg - sr - hr - el - tr - sv - da - fi - he - ar - fa - hi - ja - ko - zh - vi - th - id - ka - hy - az - uz "401": $ref: "#/components/responses/Unauthorized" /v1/photo-checks: post: tags: - Photo check operationId: createPhotoCheck summary: Start a photo check description: > Creates a check session with the person's profile photos (the network downloads them right away) and returns the `url` of the network's check page. Open it for the person — in the browser, a new tab or a webview with camera access; it can't be embedded in an iframe. The link is valid for 30 minutes and allows up to 5 attempts. On the page the person agrees to the comparison, shows the requested gesture and takes a picture with the camera; the network compares it with each photo. The result comes as `photo_check.updated` (after each attempt, a dispute and the moderator's decision) and in `GET /v1/photo-checks/{id}`; the page also posts `{type: "pereval.photo_check", status}` to the window that opened it. The picture is never shown to you or other people and no facial features are stored: it is deleted right after a passed check, kept for 24 hours after a failed one (so the person can dispute the result) and until the moderator's decision if disputed, but never beyond 60 days in the active database from original check creation, including unresolved disputes. Personal metadata, references and source photos are also subject to that absolute limit. Updates, appeals and disputes do not restart it; expiry never approves a photo or removes a sanction. Operators must review before expiry. Public access ends at the earlier public token expiry independently of retained evidence. The consent names your platform and the network, which compares photos on your behalf. requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/PhotoCheckInput" example: ref: u_123 lang: en return_url: https://your.app/verified photos: - id: ph1 url: https://cdn.your.app/ph1.jpg - id: ph2 url: https://cdn.your.app/ph2.jpg responses: "201": description: Session created — open `url` for the person content: application/json: schema: $ref: "#/components/schemas/PhotoCheck" "401": $ref: "#/components/responses/Unauthorized" "422": $ref: "#/components/responses/Invalid" "429": description: "`photo_check_limit` — more than 10 checks for this person (`ref`) a day; or `rate_limited`" content: application/json: schema: $ref: "#/components/schemas/Error" "503": description: "`photo_check_off` — the comparison service is temporarily unavailable; retry later" content: application/json: schema: $ref: "#/components/schemas/Error" /v1/photo-checks/{id}: get: tags: - Photo check operationId: getPhotoCheck summary: Photo check result parameters: - name: id in: path required: true schema: type: string format: uuid responses: "200": description: The check (without `url`) content: application/json: schema: $ref: "#/components/schemas/PhotoCheck" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" /v1/events: get: tags: - Events operationId: pullEvents summary: Pull events description: > Events of your environment in `seq` order after the given cursor; pulled events count as delivered. If your platform has no webhook URL, the network doesn't push — you pull. Events are kept for 7 days. The `data` of each event is the same as in the webhook of that type. parameters: - name: after in: query schema: type: integer default: 0 description: "`next_after` from the previous response (0 — from the oldest kept event)" - name: limit in: query schema: type: integer minimum: 1 maximum: 500 default: 100 responses: "200": description: Events content: application/json: schema: type: object required: - items - next_after properties: items: type: array items: type: object required: - seq - id - type - created_at - data properties: seq: type: integer id: type: string type: type: string created_at: type: string format: date-time data: type: object next_after: type: integer description: Pass as `after` next time webhooks: boost.started: post: operationId: onBoostStarted summary: Boost started description: Durable boost lifecycle event, not a human impression. Reconcile current state with the member boost endpoint. requestBody: content: application/json: schema: allOf: - $ref: "#/components/schemas/EventEnvelope" - properties: type: const: boost.started data: type: object required: - member - generation - remaining_ms properties: member: type: string description: Your member external_id generation: type: string format: uuid remaining_ms: type: integer minimum: 0 responses: 2XX: description: Accepted boost.extended: post: operationId: onBoostExtended summary: Boost extended description: Durable boost lifecycle event, not a human impression. Reconcile current state with the member boost endpoint. requestBody: content: application/json: schema: allOf: - $ref: "#/components/schemas/EventEnvelope" - properties: type: const: boost.extended data: type: object required: - member - generation - remaining_ms properties: member: type: string description: Your member external_id generation: type: string format: uuid remaining_ms: type: integer minimum: 0 responses: 2XX: description: Accepted boost.paused: post: operationId: onBoostPaused summary: Boost paused description: Durable boost lifecycle event, not a human impression. Reconcile current state with the member boost endpoint. requestBody: content: application/json: schema: allOf: - $ref: "#/components/schemas/EventEnvelope" - properties: type: const: boost.paused data: type: object required: - member - generation - remaining_ms properties: member: type: string description: Your member external_id generation: type: string format: uuid remaining_ms: type: integer minimum: 0 responses: 2XX: description: Accepted boost.resumed: post: operationId: onBoostResumed summary: Boost resumed description: Durable boost lifecycle event, not a human impression. Reconcile current state with the member boost endpoint. requestBody: content: application/json: schema: allOf: - $ref: "#/components/schemas/EventEnvelope" - properties: type: const: boost.resumed data: type: object required: - member - generation - remaining_ms properties: member: type: string description: Your member external_id generation: type: string format: uuid remaining_ms: type: integer minimum: 0 responses: 2XX: description: Accepted boost.completed: post: operationId: onBoostCompleted summary: Boost completed description: Durable boost lifecycle event, not a human impression. Reconcile current state with the member boost endpoint. requestBody: content: application/json: schema: allOf: - $ref: "#/components/schemas/EventEnvelope" - properties: type: const: boost.completed data: type: object required: - member - generation - remaining_ms properties: member: type: string description: Your member external_id generation: type: string format: uuid remaining_ms: type: integer minimum: 0 responses: 2XX: description: Accepted like.received: post: operationId: onLikeReceived summary: Someone from another app liked your user description: Show it as an incoming like. Liking back via `POST /v1/likes` creates a match. requestBody: content: application/json: schema: allOf: - $ref: "#/components/schemas/EventEnvelope" - properties: type: const: like.received data: type: object required: - to - from properties: to: type: string description: Your user's external_id from: $ref: "#/components/schemas/Profile" super: type: boolean description: "A super like: `from.super_like` has the message" responses: 2XX: description: Accepted like.withdrawn: post: operationId: onLikeWithdrawn summary: A like your user hasn't answered is gone description: > Remove it from your user's incoming likes. it also comes when the person who liked is no longer available — deleting their account, hidden after reports, their profile rejected by moderation, or removed from the network (`reason`). If they come back (restored, reinstated, profile fixed), your user gets `like.received` again. requestBody: content: application/json: schema: allOf: - $ref: "#/components/schemas/EventEnvelope" - properties: type: const: like.withdrawn data: type: object required: - to - from properties: to: type: string description: Your user's external_id from: type: string format: uuid description: network_id of the person who took the like back reason: type: string enum: - unliked - account_deleting - suspended - rejected - account_deleted - left_network description: "`unliked` — they took the like back themselves" responses: 2XX: description: Accepted match.created: post: operationId: onMatchCreated summary: A match was created requestBody: content: application/json: schema: allOf: - $ref: "#/components/schemas/EventEnvelope" - properties: type: const: match.created data: type: object required: - match_id - member - with properties: match_id: type: string format: uuid member: type: string description: Your user's external_id with: $ref: "#/components/schemas/Profile" responses: 2XX: description: Accepted message.created: post: operationId: onMessageCreated summary: A new message for your user description: Show a warning when `suspicious` is true — `flags` say why. requestBody: content: application/json: schema: allOf: - $ref: "#/components/schemas/EventEnvelope" - properties: type: const: message.created data: type: object required: - match_id - to - message properties: match_id: type: string format: uuid to: type: string description: Your user's external_id message: type: object required: - id - from - text - translated - lang - created_at - suspicious - flags properties: id: type: string format: uuid description: Use it as `up_to` in markRead from: type: string format: uuid description: Sender's network_id client_message_id: type: string description: Sender-scoped retry ID when supplied; deduplicate incoming messages by message.id text: type: string description: In your user's language when translated text_original: type: string translated: type: boolean lang: type: string description: Language of `text` created_at: type: string format: date-time suspicious: type: boolean flags: $ref: "#/components/schemas/Flags" responses: 2XX: description: Accepted message.read: post: operationId: onMessageRead summary: The other side read your user's messages requestBody: content: application/json: schema: allOf: - $ref: "#/components/schemas/EventEnvelope" - properties: type: const: message.read data: type: object required: - match_id - member - by - up_to - read_at properties: match_id: type: string format: uuid member: type: string description: Your user's external_id (the author) by: type: string format: uuid description: network_id of the reader up_to: type: string format: uuid description: Messages up to this one (inclusive) are read read_at: type: string format: date-time responses: 2XX: description: Accepted match.closed: post: operationId: onMatchClosed summary: A match of your user was closed by the other side description: > Make the chat read-only; the history stays. With `peer_deleted: true` (the other person deleted their account or their network data) also replace their name and photo with "Account deleted" / "Left the network". requestBody: content: application/json: schema: allOf: - $ref: "#/components/schemas/EventEnvelope" - properties: type: const: match.closed data: type: object required: - match_id - member - reason properties: match_id: type: string format: uuid member: type: string reason: type: string enum: - unmatched - blocked - left_network - account_deleted peer_deleted: type: boolean description: "The other person is gone from the network: their profile is erased" responses: 2XX: description: Accepted match.erased: post: operationId: onMatchErased summary: A match of your user was erased by the other side description: The other side deleted the pair (or blocked with erase) — remove the chat and its history on your side. requestBody: content: application/json: schema: allOf: - $ref: "#/components/schemas/EventEnvelope" - properties: type: const: match.erased data: type: object required: - match_id - member - reason properties: match_id: type: string format: uuid member: type: string description: Your user's external_id reason: type: string enum: - unmatched - blocked responses: 2XX: description: Accepted match.frozen: post: operationId: onMatchFrozen summary: The other person is deleting their account or was hidden after reports description: > The chat is read-only (`409 match_frozen`). `reason`: `account_deleting` — show "Account deleted"; it may come back with `match.unfrozen` (restored within 30 days) or end with `match.closed` + `peer_deleted`. `suspended` — the network hid them after reports; show "Account unavailable" until `match.unfrozen` (their platform reinstated them) or `match.closed`. `partner_suspended` means either platform is suspended. Restore messaging only after an unfreeze or a fresh bootstrap confirming `frozen: false`; another independent freeze may remain. requestBody: content: application/json: schema: allOf: - $ref: "#/components/schemas/EventEnvelope" - properties: type: const: match.frozen data: type: object required: - match_id - member properties: match_id: type: string format: uuid member: type: string description: Your user's external_id reason: type: string enum: - account_deleting - suspended - partner_suspended description: "partner_suspended " responses: 2XX: description: Accepted match.unfrozen: post: operationId: onMatchUnfrozen summary: The other person restored their account or was reinstated after reports description: The chat is back as it was — their name, photo and messaging. requestBody: content: application/json: schema: allOf: - $ref: "#/components/schemas/EventEnvelope" - properties: type: const: match.unfrozen data: type: object required: - match_id - member properties: match_id: type: string format: uuid member: type: string description: Your user's external_id responses: 2XX: description: Accepted member.reported: post: operationId: onMemberReported summary: Your user was reported by someone from another app requestBody: content: application/json: schema: allOf: - $ref: "#/components/schemas/EventEnvelope" - properties: type: const: member.reported data: type: object properties: member: type: string reason: type: string comment: type: string responses: 2XX: description: Accepted member.suspended: post: operationId: onMemberSuspended summary: Your user was hidden from the network pending review description: > After a report with `underage` or `commercial`, or reports from 3 different people. Their matches are frozen until you review the reports: block the user in your app or bring them back with `POST /v1/members/{external_id}/reinstate`. requestBody: content: application/json: schema: allOf: - $ref: "#/components/schemas/EventEnvelope" - properties: type: const: member.suspended data: type: object properties: member: type: string reason: type: string responses: 2XX: description: Accepted member.rejected: post: operationId: onMemberRejected summary: Your user's profile did not pass the network's moderation description: The profile is hidden from feeds and cannot like until you send a corrected one. requestBody: content: application/json: schema: allOf: - $ref: "#/components/schemas/EventEnvelope" - properties: type: const: member.rejected data: type: object required: - member - reason properties: member: type: string reason: type: string enum: - photo_nudity - offensive_text - contact_info - photo_unavailable - video_invalid - video_too_long - video_unavailable photo: type: string format: uri description: The photo or poster that did not pass (photo_* reasons) video: type: string format: uri description: The clip that did not pass (video_* reasons) responses: 2XX: description: Accepted photo_check.updated: post: operationId: onPhotoCheckUpdated summary: A new result of a photo check description: > After each attempt, when the person disputes the result and when the network moderator decides — go by the latest. Passed (`passed` or `resolved` with the photos matched) — you may claim `verification: {provider: "pereval", check_id}`. requestBody: content: application/json: schema: allOf: - $ref: "#/components/schemas/EventEnvelope" - properties: type: const: photo_check.updated data: $ref: "#/components/schemas/PhotoCheck" responses: 2XX: description: Accepted ping: post: operationId: onPing summary: Test event from the dashboard description: Sent when you click "Send a test event" in the dashboard. Reply 2xx — this checks the URL and the signature. requestBody: content: application/json: schema: allOf: - $ref: "#/components/schemas/EventEnvelope" - properties: type: const: ping data: type: object properties: message: type: string responses: 2XX: description: Accepted components: securitySchemes: bearer: type: http scheme: bearer description: New keys start with `pv_test_` (sandbox) or `pv_live_` (live). Existing `dn_` keys remain valid. Verify mode with GET /v1/capabilities. Keep it on your server — never in a client app. External1_PartnerKey: type: http scheme: bearer External1_SpendKey: type: apiKey in: header name: X-Commerce-Key parameters: ExternalID: name: external_id in: path required: true schema: type: string minLength: 1 maxLength: 128 description: Your user id. MatchID: name: match_id in: path required: true schema: type: string format: uuid schemas: Error: type: object required: - error - message properties: error: type: string enum: - unauthorized - rate_limited - bad_json - bad_id - invalid - not_found - forbidden - match_closed - matched - match_frozen - idempotency_conflict - member_hidden - world_consent_required - location_change_limited - super_like_limit - first_messages_limit - internal message: type: string Pair: type: object required: - from - to properties: from: type: string description: Your user's external_id to: type: string format: uuid description: network_id from the feed erase: type: boolean default: false description: "blocks only: delete the match, messages and likes for both" Flags: type: array description: "Scam signals: `link`, `phone`, `messenger` (early in a chat), `money`, `mass_text` (the same text in several matches, only together with another signal )" items: type: string enum: - link - phone - messenger - money - mass_text MemberInput: type: object required: - consent - display_name - birth_year - gender - age_min - age_max - languages - city - photos properties: consent: type: object required: - network - given_at - text_version properties: network: type: boolean description: The user enabled "show me in the network". `false` hides the member (see the upsert) instead of being rejected cross_language: type: boolean default: false description: The user agreed to chat with people speaking other languages (machine translation) world: type: boolean default: false description: The user wants to meet people from other cities and countries — the `scope=world` feed. Opt-in only, off by default given_at: type: string format: date-time description: When the user actually turned it on text_version: type: string description: Version of the consent text the user saw, e.g. its date display_name: type: string minLength: 1 maxLength: 50 birth_year: type: integer description: Members must be 18+ gender: type: string enum: - male - female description: Matches are always of the opposite gender; there is no "seeking" field (ignored if sent) age_min: type: integer minimum: 18 age_max: type: integer languages: type: array minItems: 1 items: type: string pattern: ^[a-z]{2}$ description: ISO 639-1 description: > First is the main language: profiles and messages are translated into it. Languages listed here are never translated for this member. Translation languages — `GET /v1/languages` (38 in v0.8); other ISO 639-1 codes are accepted, names such as `Russian` are rejected with 422. city: type: object description: Name or coordinates required. Name and country identify the home city. Coordinates are the nearby discovery point and may change during travel. For coordinate-only profiles, a move over 50 km counts as a city change. properties: name: type: string country: type: string description: ISO 3166-1 alpha-2 lat: type: number lon: type: number bio: type: string maxLength: 1000 photos: type: array maxItems: 9 items: type: string format: uri pattern: ^https:// description: Public HTTPS URLs; 1–9 while visible, may be empty while hidden videos: type: array maxItems: 3 description: > Short clips shown on the card next to photos, not instead of them. Omit or send `[]` to clear. production rejects all nonempty video input with 422 until frame moderation exists. Inspect the `videos` capability; the following format is for isolated development only. Each clip is an MP4 up to 15 seconds and 20 MB, plus a poster image. The file stays on your host. There is no mute flag: the viewing app starts clips silent and has one switch for every clip. Posters are moderated like photos. A clip that is not an MP4, is longer, or cannot be downloaded rejects the profile (`video_invalid`, `video_too_long`, `video_unavailable`). items: $ref: "#/components/schemas/Video" photo_verified: type: boolean default: false description: > Before 0.15 — "you verified the person matches the photos". Still accepted: without `verification` it is a claim with an unspecified method made when the network receives it. Send `verification` instead. verification: type: object description: > How and when you checked that the person matches their photos. The network turns it into the `photo_verified` mark that other apps see, if (1) the network has approved your verification method — describe it when you connect, the network reviews it once — and (2) none of the current photos is newer than `verified_at`. Photos the person joins the network with are covered by an earlier check too; a photo added later switches the mark off until you send a newer `verified_at`. The same picture under a new URL is recognised by its content. The network re-checks a sample of verified people and those with fake signals (reports, the same photo on another person, generated images); if your marks fail, the network stops counting them for all your users. Omit (and `photo_verified: false`) — no claim. — or a claim by the network's photo check: `{"provider": "pereval", "check_id": "…"}`. The network verifies that the check is yours, has passed and covers all current photos (each with a `match` or `no_face` verdict, at least one `match`, recognised by URL or content); then the mark counts even if your own method isn't approved, and `verified_at` is the time of the check. `method` and `verified_at` are then ignored. anyOf: - required: - method - verified_at - required: - check_id properties: method: type: string enum: - selfie - video - liveness - document - in_person - other description: selfie — a photo selfie (e.g. with a gesture); video — a video selfie; liveness — an automated liveness check; document — an ID with a face match; in_person — met in person provider: type: string maxLength: 60 description: "Who did the check: a vendor (e.g. Sumsub), `own`, or `pereval` — the network's photo check (with `check_id`)" verified_at: type: string format: date-time description: When the check passed. Not in the future. check_id: type: string format: uuid description: > id of a passed photo-check session of yours, less than 60 days from original creation. An expired/deleted reference returns 422 invalid; do not retry it or automatically create a replacement check. Omit a stale reference on subsequent upserts. Already accepted verification of unchanged photos is independent of case material retention; expiry does not approve any new photos. intents: type: array items: type: string enum: - serious - casual - friendship - arrangement default: - serious - casual - friendship description: > What the member is looking for. Two members are matched only if they share an intent. `arrangement` — a relationship with a well-off partner — is opt-in only, requires your app to have the category enabled, and requires `arrangement_role`. Members whose only shared intent is `arrangement` are matched only with the opposite role. Offering money for sex is forbidden in every category. arrangement_role: type: string enum: - provider - seeker description: "With the arrangement intent: `provider` — ready to support a partner; `seeker` — looking for a well-off partner" last_active_at: type: string format: date-time height_cm: type: integer minimum: 120 maximum: 230 description: Height in cm optional — omit if unknown: null show_distance: type: boolean default: false description: Others may see `distance_km` to this person. Off by default. Does not change the city. Video: type: object description: A short clip on a profile card. The bytes stay on the partner's host. required: - url - poster properties: url: type: string format: uri pattern: ^https:// description: Public MP4, at most 15 seconds and 20 MB poster: type: string format: uri pattern: ^https:// description: Still frame. Shown before playback and by apps that do not play video. Moderated like a photo VerificationStatus: type: string enum: - accepted - none - no_photos - partner_not_approved - photos_changed description: > Why the verification mark counts or not: `accepted`; `none` — no claim; `no_photos`; `partner_not_approved` — the network hasn't approved your verification method yet (never for claims by the network's photo check, ); `photos_changed` — a photo is newer than `verified_at`: check the person again and send a newer `verified_at`. Profile: type: object description: A member of another app as seen by your user. required: - network_id - partner - display_name - age - gender - city - languages - bio - bio_translated - photos - photo_verified - intents properties: network_id: type: string format: uuid partner: type: object properties: id: type: string format: uuid name: type: string description: Name of the platform where the person registered. display_name: type: string age: type: integer gender: type: string enum: - male - female city: type: string country: type: string description: ISO 3166-1 alpha-2 distance_km: type: integer description: only if this person turned on `show_distance`. Kilometres from the search centre (viewer's city, or `lat`/`lon`) languages: type: array items: type: string bio: type: string description: In the viewer's main language when the viewer doesn't speak the original bio_original: type: string bio_translated: type: boolean description: Show a "translated" mark when true photos: type: array items: type: string format: uri videos: type: array description: but disabled in the production executable pending frame moderation. Absent when videos capability is false. items: $ref: "#/components/schemas/Video" photo_verified: type: boolean description: The person's app verified they match the photos, and the network counts it verified_by: type: string enum: - partner description: "Who verified the photos: `partner` — the person's app, with a method approved by the network" intents: type: array items: type: string arrangement_role: type: string description: Shown only to viewers who have the arrangement intent themselves height_cm: type: integer description: Absent when the person didn't specify it super_like: type: object description: This person sent the viewer a super like (feed, incoming likes, like.received) properties: message: type: string description: In the viewer's main language when they don't speak the original message_original: type: string translated: type: boolean lang: type: string flags: $ref: "#/components/schemas/Flags" Message: type: object required: - id - from - text - translated - lang - created_at properties: id: type: string format: uuid from: type: string description: "\"me\" for the viewer's own messages, otherwise the sender's network_id" client_message_id: type: string description: Author history/POST echo when supplied; also included in message.created for reconciliation text: type: string text_original: type: string translated: type: boolean lang: type: string created_at: type: string format: date-time suspicious: type: boolean description: Messages from the other side only flags: $ref: "#/components/schemas/Flags" read_at: type: string format: date-time description: "Own messages only: when the other side read it" PhotoCheckInput: type: object required: - ref - photos properties: ref: type: string minLength: 1 maxLength: 200 description: How you recognise the person in the result, usually their `external_id` photos: type: array minItems: 1 maxItems: 9 items: type: object required: - url properties: id: type: string maxLength: 100 description: Your photo id, unique in the session; default — the position (1, 2, …) url: type: string format: uri pattern: ^https:// description: Public HTTPS URL of a profile photo lang: type: string enum: - ru - en default: en description: Language of the check page return_url: type: string format: uri pattern: ^https:// maxLength: 500 description: "Optional: the page's \"Back\" button" PhotoCheck: type: object required: - id - ref - status - attempts - expires_at - photos - created_at properties: id: type: string format: uuid ref: type: string url: type: string format: uri description: "Only in the `POST` reply: the check page to open for the person" status: type: string enum: - created - passed - partial - failed - disputed - resolved - expired description: > `created` — not taken yet; `passed` — it's the person on every photo with a face; `partial` — some photos don't look like the picture; `failed` — see `reason`; `disputed` — the person disputed, a network moderator decides (usually within 24 hours); `resolved` — the moderator decided (`note` explains); `expired` — the link expired untaken. reason: type: string enum: - no_match - no_face - many_faces - no_gesture - virtual_camera description: Why it failed attempts: type: integer description: Pictures taken (up to 5 per session) expires_at: type: string format: date-time description: Until when the link allows attempts checked_at: type: string format: date-time description: The last picture dispute_until: type: string format: date-time description: "Failed or partial: the person can dispute until then" disputed_at: type: string format: date-time decided_at: type: string format: date-time description: The moderator's decision note: type: string description: The moderator's explanation for the person photos: type: array items: type: object required: - id - url properties: id: type: string url: type: string format: uri verdict: type: string enum: - match - no_match - unsure - no_face description: "`match` — the same person; `no_match` — doesn't look like them; `unsure` — couldn't compare reliably; `no_face` — no face, not counted. Absent — not compared yet" created_at: type: string format: date-time EventEnvelope: type: object description: > Every webhook is a POST with this envelope. Headers: `X-Network-Signature: sha256=` — HMAC-SHA256 of the raw body with your signing secret (verify it, constant-time compare); `X-Network-Event: `. Reply 2xx quickly. Non-2xx or timeout (10 s) → retries after 10 s, 1 min, 5 min, 30 min, 2 h, 6 h, then daily for up to 3 days. Deliveries may repeat — dedupe by `id`. Order holds unless a delivery is retried. Without a webhook URL, pull the same events with `GET /v1/events`. required: - id - type - created_at - data properties: id: type: string description: evt_…, unique type: type: string created_at: type: string format: date-time data: type: object External1_Error: type: object properties: error: type: string message: type: string required: - error - message External1_Product: type: object properties: sku: type: string capability: enum: - superlike - rewind - incognito - boost unit: enum: - action - minute - day unit_price: type: integer format: int64 minimum: 0 min_quantity: type: integer minimum: 1 max_quantity: type: integer minimum: 1 fulfillment_ready: type: boolean version: type: integer minimum: 1 currency: type: string enum: - TEST - RUB required: - sku - capability - unit - unit_price - min_quantity - max_quantity - fulfillment_ready - version - currency External1_Quote: type: object properties: id: type: string format: uuid member_id: type: string format: uuid sku: type: string capability: type: string unit: type: string quantity: type: integer minimum: 1 unit_price: type: integer format: int64 minimum: 0 total: type: integer format: int64 minimum: 0 catalog_version: type: integer expires_at: type: string format: date-time currency: type: string enum: - TEST - RUB required: - id - member_id - sku - capability - unit - quantity - unit_price - total - catalog_version - expires_at - currency External1_Order: type: object properties: id: type: string format: uuid external_order_ref: type: string quote_id: type: string format: uuid total: type: integer format: int64 minimum: 0 created_at: type: string format: date-time currency: type: string enum: - TEST - RUB grant_id: type: string format: uuid valid_from: type: string format: date-time valid_until: type: - string - "null" format: date-time required: - id - external_order_ref - quote_id - total - created_at - currency - grant_id - valid_from - valid_until External1_Grant: type: object properties: id: type: string format: uuid capability: type: string quantity: type: integer minimum: 1 used: type: integer format: int64 minimum: 0 valid_from: type: string format: date-time valid_until: type: - string - "null" format: date-time revoked_at: type: - string - "null" format: date-time required: - id - capability - quantity - used - valid_from - valid_until - revoked_at External1_Boost: type: object required: - generation - state - started_at - remaining_ms - api_placements properties: generation: type: string format: uuid state: enum: - active - paused - completed started_at: type: string format: date-time remaining_ms: type: integer minimum: 0 api_placements: type: integer minimum: 0 responses: BadJSON: description: Body is not valid JSON content: application/json: schema: $ref: "#/components/schemas/Error" Unauthorized: description: Missing, invalid or suspended API key content: application/json: schema: $ref: "#/components/schemas/Error" Invalid: description: Validation failed; `message` says which field content: application/json: schema: $ref: "#/components/schemas/Error" NotFound: description: Member, match or message not found (or not yours) content: application/json: schema: $ref: "#/components/schemas/Error" Forbidden: description: Not allowed (e.g. liking or disliking a member of your own app, or a suspended member) content: application/json: schema: $ref: "#/components/schemas/Error" MatchClosed: description: The match is closed content: application/json: schema: $ref: "#/components/schemas/Error" RateLimited: description: Over 600 requests per minute content: application/json: schema: $ref: "#/components/schemas/Error" ```