# Pereval — Dokumentation für Plattformen # Dokumentation für Plattformen Pereval verbindet Dating-Apps, Websites und Bots. Mitglieder entdecken Profile anderer Dienste und schreiben einander in ihrer eigenen App. Die Basisintegration ist kostenlos. Zu Beginn können wenige oder keine externen Profile verfügbar sein. In der Sandbox testen Sie unabhängig von der Größe des Netzwerks. **[SDKs und Bibliotheken](/de/docs/sdk/)** · Go · PHP · Symfony · JavaScript / TypeScript · Python ## Einstieg Wählen Sie die Anleitung für Ihre [Swipe-App](/de/docs/guide-app/), Ihre [Website mit Suche](/de/docs/guide-site/) oder Ihren [Bot](/de/docs/guide-bot/). Die [API-Referenz](/de/docs/reference/) enthält die Felder und Beispiele. ## Vom Antrag bis zum Start [Beantragen Sie Zugang](/de/apply/). Nach der Prüfung erstellen Sie im [Partnerbereich](/de/cabinet/) einen Testschlüssel. [Testen Sie die API](/de/docs/quickstart/), prüfen Sie die [Checkliste](/de/docs/testing/) und [beantragen Sie den Produktivzugang](/de/contact/). ## Integration in Ihr Produkt Erfassen Sie [Profile und Einwilligungen](/de/docs/members/). Zeigen Sie den [Feed](/de/docs/feed-matches/) an und verarbeiten Sie Likes, Matches, [Nachrichten](/de/docs/messages/) und [Ereignisse](/de/docs/webhooks/). ## Grundsätze Sie behalten die Benutzeroberfläche und den Kontakt zu Ihren Mitgliedern. Holen Sie Einwilligungen ein und ermöglichen Sie das Löschen von Profilen. Eine Sperre stoppt neue Kontakte und die Ereigniszustellung, löscht aber keine Daten. Beachten Sie die [Netzwerkregeln](/de/docs/safety/). [Zusatzdienste](/de/docs/services/) sind freiwillig. ## Protokollversion Diese Dokumentation beschreibt Version **1.0.1**. Prüfen Sie die tatsächlich verfügbaren Funktionen mit `GET /v1/capabilities`. Bei `404` ist die Unterstützung unbekannt. Bei `videos: false` keine Videos senden. Siehe [Änderungsprotokoll](/de/docs/changelog/). # API in der Sandbox testen Mit curl können Sie den Ablauf vom ersten Profil bis zur Nachricht testen. Verwenden Sie ausschließlich Testdaten. ## 1. Schlüssel erstellen [Beantragen Sie Zugang](/de/apply/). Erstellen Sie nach Freigabe im [Partnerbereich](/de/cabinet/) einen Testschlüssel. Kopieren Sie ihn sofort. Bewahren Sie `api_key` und `webhook_secret` ausschließlich auf dem Server auf. Prüfen Sie vor dem ersten Test, dass `mode` den Wert `sandbox` hat. ```bash export PEREVAL_API_KEY=pv_test_... ``` ```bash curl -fsS -H "Authorization: Bearer $PEREVAL_API_KEY" https://api.pereval.dating/v1/capabilities ``` ## 2. Profil senden Übermitteln Sie ein Testprofil mit öffentlichem HTTPS-Foto. Verwenden Sie Ihre eigene stabile ID im Pfad. Speichern Sie die zurückgegebene `network_id`. Die Moderation kann kurz dauern. ```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. Feed abrufen Kennzeichnen Sie die Herkunft der Profile. Für die nächste Seite übergeben Sie `next_cursor` als `cursor`. `remaining_today` zählt die verbleibenden neuen Profile von höchstens 200 pro UTC-Tag. Senden Sie einen Dislike nur bei ausdrücklicher Ablehnung, nicht beim Blättern. ```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. Like senden Verwenden Sie die Netzwerk-ID eines Profils aus dem Feed. In der Sandbox erwidert es das Like. Speichern Sie die Match-ID aus `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. Ereignisse empfangen Prüfen Sie die Webhook-Signatur am unveränderten Body und verarbeiten Sie jede Ereignis-ID nur einmal. Testen Sie die Zustellung mit `ping` im Partnerbereich. Alternativ rufen Sie die [Ereignisse](/de/docs/webhooks/) ab und übernehmen `next_after` als nächsten Wert von `after`. ```php # SDKs und Bibliotheken - [Go](#go-123) - [PHP](#php-74--curl) - [JS/TS](#javascript--typescript--nodejs-20) - [Python](#python-310) - [Symfony](#symfony--component) - [Bundle](#symfony--bundle) Holen Sie den Testschlüssel im [Dashboard](/de/cabinet/). Speichern Sie ihn nur auf dem Server in `PEREVAL_API_KEY`. Prüfen Sie vor dem Schreiben, ob `mode` auf `sandbox` steht. ## Go 1.23+ [pkg.go.dev](https://pkg.go.dev/github.com/pereval-dating/pereval-go) · [Quellcode](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) · [Quellcode](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) · [Quellcode](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/) · [Quellcode](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) · [Quellcode](https://github.com/pereval-dating/pereval-symfony) Mit der Komponente registrieren Sie den Client in Ihrem eigenen Container. Das Bundle konfiguriert die Dienste in Symfony automatisch. Eine der beiden Varianten genügt. ```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) · [Quellcode](https://github.com/pereval-dating/pereval-bundle) ```sh composer require pereval-dating/pereval-bundle ``` Registrieren Sie das Bundle bei Bedarf in `config/bundles.php` und prüfen Sie den Schlüssel. ```php Pereval\Bundle\PerevalBundle::class => ['all' => true], ``` ```sh php bin/console pereval:check --expect=sandbox ``` ## Nächste Schritte Die [Beispielanwendungen](https://github.com/pereval-dating/pereval-examples) zeigen, wie zwei Plattformen Profile, Likes und Nachrichten austauschen. Die Webhook-Signatur lässt sich ohne Schlüssel prüfen. Mit einem Testschlüssel können Sie die [Sandbox-Anleitung](/de/docs/quickstart/) durchgehen. # AI Agent Integration Kit Kopieren Sie die [Aufgabenvorlage für KI-Agenten](/de/docs/ai-agents/) und ergänzen Sie die Angaben zu Ihrem Projekt. ## Demo ohne Konto ausprobieren Verbinden Sie einen Client und lassen Sie ihn `dating_flow_demo` aufrufen. Die Demo zeigt anhand fiktiver Daten den Ablauf vom Profil über den Feed und das Match bis zur Nachricht und zum Partnerereignis. Die Demo ist schreibgeschützt. ### Cursor Fügen Sie den Server der Datei `.cursor/mcp.json` Ihres Projekts hinzu. Ergänzen Sie einen vorhandenen Abschnitt `mcpServers` um den Eintrag. Öffnen Sie dann Cursor Settings → Tools & MCP. ```json { "mcpServers": { "pereval-demo": { "url": "https://api.pereval.dating/mcp/demo" } } } ``` ### Claude Code Führen Sie den Befehl im Projektverzeichnis aus und prüfen Sie die Verbindung in Claude Code mit `/mcp`. ```sh claude mcp add --transport http pereval-demo https://api.pereval.dating/mcp/demo ``` ### Codex Führen Sie die Befehle im Projektverzeichnis aus und prüfen Sie die Verbindung in Codex mit `/mcp`. ```sh codex mcp add pereval-demo --url https://api.pereval.dating/mcp/demo codex mcp list ``` ## Eigene Integration in der Sandbox testen Verwenden Sie einen Testschlüssel aus dem Partnerbereich mit `https://api.pereval.dating/mcp`. Hinterlegen Sie `Authorization: Bearer ` in den lokalen Client-Einstellungen. Halten Sie den Schlüssel aus Prompts, Repository und Frontend fern. Rufen Sie vor Änderungen `capabilities` auf und prüfen Sie, dass `mode` den Wert `sandbox` hat. Geben Sie dem Agenten ein Beispiel für Ihren Stack. Verwenden Sie fiktive Profile und prüfen Sie Webhook-Signaturen anhand des unveränderten Anfragekörpers. - [Testschlüssel und erste Anfrage](/de/docs/quickstart/) - [SDKs und Bibliotheken](/de/docs/sdk/) - [Lauffähige Beispiele](https://github.com/pereval-dating/pereval-examples) - [OpenAPI-Spezifikation](/openapi.yaml) - [Dokumentationsübersicht](/llms.txt) · [llms-full.txt](/de/llms-full.txt) # Aufgabenvorlage für KI-Agenten Cursor, Claude Code und Codex richten Sie mit dem [AI Agent Integration Kit](/de/docs/agent-kit/) ein. ## Aufgabenstellung Ergänzen Sie im folgenden Beispiel Sprache, Framework, Datenbank und Modell Ihrer Anwendung. Halten Sie Schlüssel außerhalb des Prompts. ```text Verbinde unser Produkt über das Backend mit Pereval. Lies zuerst https://pereval.dating/de/llms-full.txt und /openapi.yaml. Stack: . Lokale Konten: . Erfasse getrennte Einwilligungen. Synchronisiere Profile, Änderungen und Aktivität. Nutze den passenden Leitfaden für App, Website oder Bot. Implementiere Feed, Likes, Matches und Nachrichten. Prüfe die Signatur über den rohen Body oder speichere beim Polling next_after. Verarbeite Ereignisse in Reihenfolge und nur einmal. Teste Duplikate und Löschungen. Implementiere Sperren, Meldungen und Moderation. Verwende nur Testdaten. Lies PEREVAL_API_KEY und PEREVAL_WEBHOOK_SECRET aus der Serverumgebung. Keine Schlüssel im Client. ``` ## Tipps Prüfen Sie besonders [Ereignisse](/de/docs/webhooks/), [Fehler](/de/docs/errors/) und [Tests](/de/docs/testing/). Verlangen Sie Tests für doppelte Ereignisse, Löschungen und fehlende Einwilligung. ## Optionale Dienste Aktivieren Sie [Zusatzdienste](/de/docs/services/) nur auf ausdrücklichen Wunsch der Plattform. Behalten Sie dieselbe Aktionsreferenz bei Wiederholungen bei. # Swipe-App anbinden Ergänzen Sie den Kartenstapel Ihrer App um Profile aus dem Netzwerk. Die Bedienung und der Chat bleiben in Ihrer App. ## Daten speichern Ordnen Sie Ihrer lokalen ID die `network_id` zu. Speichern Sie `match_id` je Gespräch und bei Polling den Cursor `next_after`. ## Einwilligung und Profil Erfassen Sie die [Einwilligung](/de/docs/members/) in Ihrer App und senden Sie das Profil serverseitig mit `PUT /v1/members/{external_id}`. Synchronisieren Sie Änderungen und Aktivität. ## Kartenstapel Mischen Sie Profile in Ihren [Feed](/de/docs/feed-matches/). Zeigen Sie Herkunft und übersetzte Texte mit Zugriff auf das Original. Bei einem bewussten Überspringen senden Sie einen Dislike. Verwenden Sie `next_cursor`, um weitere Karten zu laden. ```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 und Chat Senden Sie `POST /v1/likes`. Verarbeiten Sie `like.received` und erzeugen Sie bei `match.created` genau einen Chat je `match_id`. Leiten Sie [Nachrichten](/de/docs/messages/) an das zugehörige Gespräch weiter. ## Abnahmetest Prüfen Sie, dass ein wiederholtes Ereignis keinen zweiten Chat anlegt, ein Dislike das Profil ausblendet und [Sperren und Löschungen](/de/docs/safety/) wirksam sind. # Website mit Suche anbinden Erweitern Sie Ihre Suchergebnisse mit Profilen anderer Plattformen. Beim Blättern dürfen keine automatischen Ablehnungen entstehen. ## Daten speichern Speichern Sie die Zuordnung zu `network_id`, pro Unterhaltung die `match_id` und für den Ereignisabruf `next_after`. ## Einwilligung und Profil Nach [Zustimmung](/de/docs/members/) senden Sie das Profil mit `PUT /v1/members/{external_id}`. Bewahren Sie Schlüssel ausschließlich auf dem Server auf. ## Ergebnisseite Übertragen Sie die ausgewählten [Filter](/de/docs/feed-matches/) in den Feed-Aufruf. Sie können das Alter eingrenzen und nach einer passenden Absicht oder Sprache filtern. Kennzeichnen Sie Netzwerkprofile. ```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" ``` ## Nächste Seite Übergeben Sie `next_cursor` als `cursor` mit denselben Filtern. Fehlt der Cursor, ist das Ende erreicht. Bei Änderung der Suche starten Sie ohne Cursor. Ein ungültiger Wert führt zu `422`. ## Tageslimit `remaining_today` zählt verfügbare neue Profile. Höchstens 200 verschiedene Profile pro UTC-Tag sind möglich. Bereits gezeigte Profile bleiben abrufbar. ## Abnahmetest Prüfen Sie die Seitennavigation ohne zusätzliche Dislikes, das Tageslimit, eingehende Likes und den [Chat nach einem Match](/de/docs/messages/). # Dating-Bot anbinden Auch ohne öffentliche Webhook-URL kann ein Bot Profile anzeigen und Ereignisse abrufen. Bewahren Sie die Schlüssel auf dem Server des Bots auf. ## Daten speichern Verknüpfen Sie die lokale Benutzer-ID mit `network_id`. Speichern Sie für jeden Chat die `match_id` und für die Plattform den letzten verarbeiteten Cursor `next_after`. ## Profil Bitten Sie im Bot um [Einwilligung](/de/docs/members/) und senden Sie das Profil mit `PUT /v1/members/{external_id}`. Senden Sie keine Telefonnummern oder Messenger-Kontaktdaten. ## Profilkarten Rufen Sie eine Karte ab. Zeigen Sie die Herkunft an und kennzeichnen Sie Übersetzungen. „Like“ sendet `POST /v1/likes`, „Weiter“ einen Dislike über `POST /v1/dislikes`. Dadurch bleibt das Profil 30 Tage verborgen. ```bash curl "https://api.pereval.dating/v1/members/user-123/feed?limit=1" \ -H "Authorization: Bearer $PEREVAL_API_KEY" ``` ## Ereignisse ohne Webhook Rufen Sie [Ereignisse](/de/docs/webhooks/) mit `after=0` ab und speichern Sie nach erfolgreicher Verarbeitung `next_after`. Bei `match.created` öffnen Sie eine Unterhaltung. Ordnen Sie eingehende Nachrichten anhand der Match-ID zu. ```bash curl "https://api.pereval.dating/v1/events?after=$NEXT_AFTER&limit=100" \ -H "Authorization: Bearer $PEREVAL_API_KEY" ``` ## Abnahmetest Starten Sie den Bot neu und prüfen Sie, dass er ohne Duplikate fortfährt. Testen Sie Antworten, Blockieren, Melden und Löschen in der [Sandbox](/de/docs/testing/). # So funktioniert das Netzwerk Pereval vermittelt Profile und Nachrichten zwischen selbstständigen Plattformen. Anmeldung, Benutzeroberfläche und Support bleiben bei der jeweiligen Plattform. ## Kennungen `partner_id` bezeichnet die Plattform, `external_id` das Konto bei Ihnen, `network_id` eine Person im Netzwerk und `match_id` eine Unterhaltung. Behandeln Sie alle IDs als undurchsichtige Werte. ## Datenfluss Senden Sie [Profile](/de/docs/members/) nach Einwilligung. Rufen Sie den [Feed](/de/docs/feed-matches/) ab. Ein gegenseitiges Like führt zum Match. Beide Plattformen erhalten [Ereignisse](/de/docs/webhooks/) und können Nachrichten zustellen. ## Wer erscheint im Feed? Andere Plattform, anderes Geschlecht, beidseitig passendes Alter, gemeinsame Absicht und eine gemeinsame Sprache oder beiderseitige Zustimmung zur Übersetzung sind Voraussetzung. In der Nähe gilt der gewählte Radius, standardmäßig 50 km, ohne Koordinaten dieselbe Stadt und dasselbe Land. Weltweit müssen beide zustimmen. Inaktive Profile nach 30 Tagen, bereits gelikte, blockierte und in den letzten 30 Tagen abgelehnte Profile entfallen. ## Übersetzung Beachten Sie `bio_original`, `bio_translated`, `text_original` und `translated`. Machen Sie das [Original](/de/docs/messages/) immer zugänglich. ## Gespeicherte Daten Übermitteln Sie keine Kontaktdaten. Koordinaten werden gerundet gespeichert. Fristen und Löschabläufe stehen in den [Netzwerkregeln](/de/docs/safety/). ## Zuverlässigkeit Änderungen und Ereignisse werden zusammen gespeichert. Webhooks werden bis zu drei Tage erneut zugestellt, Ereignisse bleiben sieben Tage abrufbar. Beachten Sie die [Wiederholungsregeln](/de/docs/errors/). # Integrationsmöglichkeiten Wählen Sie den Integrationsweg passend zu Ihrem Backend. Die Oberfläche bleibt in Ihrem Produkt. ## Server-zu-Server-API Ihr Backend ruft die [REST-API](/de/docs/reference/) auf und empfängt [Ereignisse](/de/docs/webhooks/) per Webhook oder Polling. Beginnen Sie mit der [Sandbox](/de/docs/quickstart/). ## Client aus OpenAPI generieren Die [OpenAPI-3.1-Spezifikation](/openapi.yaml) enthält auch Webhooks. Ersetzen Sie im Beispiel `php` bei Bedarf durch `go`, `python`, `typescript-fetch` oder einen anderen Generator. ```bash npx @openapitools/openapi-generator-cli generate \ -i https://pereval.dating/openapi.yaml \ -g php -o ./pereval-client ``` ## KI-Unterstützung Nutzen Sie die [Aufgabenvorlage für KI-Agenten](/de/docs/ai-agents/). Prüfen Sie das Ergebnis mit Testdaten. ## MCP Beginnen Sie mit dem [AI Agent Integration Kit](/de/docs/agent-kit/). Partner-MCP verwendet Streamable HTTP an `POST /mcp` und denselben Bearer-Schlüssel wie REST. Mit `tools/list` sehen Sie die für Ihren Schlüssel freigegebenen Werkzeuge. ## Hilfe Nutzen Sie das [Kontaktformular](/de/contact/). Senden Sie keine Schlüssel mit. # Zusatzdienste und Preise Die Basisintegration, normale Likes, Matches und Nachrichten sind kostenlos. Alle vier Zusatzdienste starten bei 0 RUB. Auch kostenlose Aufträge erfordern eine ausdrückliche Bestätigung. ## Verfügbare Dienste `boost` erhöht die Priorität für 1–1440 Minuten. `superlike` umfasst 1–100 Aktionen je Bestellung. `incognito-day` und `rewind-day` gelten für 1–365 Tage zu je 24 Stunden. Die Rechte sind an die jeweilige `external_id` gebunden. ## Aktivierung Prüfen Sie `GET /v1/capabilities`. `commerce_enabled` allein bestätigt keine Freigabe für Bestellungen. Bis zur ausdrücklichen Aktivierung eines Ausgabenkontos bleiben bisherige Superlikes und Rücknahmen im Produktivbetrieb unverändert. Der Empfang beworbener Profile ist kostenlos. ## Angebot, Bestätigung und Rechte Lesen Sie Preise, Währung und `fulfillment_ready` aus `GET /v1/commerce/catalog`. TEST-Guthaben und RUB sind getrennt. Ein Angebot von `POST /v1/commerce/quotes` gilt fünf Minuten. Bestätigen Sie mit `POST /v1/commerce/orders`, Bearer-Schlüssel und separatem `X-Commerce-Key`. Bei einem Timeout wiederholen Sie dieselbe `external_order_ref` mit derselben `quote_id`. Fragen Sie Rechte unter `GET /v1/members/{external_id}/entitlements` ab. ```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"}' ``` ## Boost und Auslieferung Der Boost startet sofort nach Bestätigung, auch ohne Publikum. Ein weiterer Kauf verlängert die Dauer. Nach Beginn ist keine freiwillige Stornierung möglich. Ausblenden stoppt die Zeit nicht. Filter und Sperren bleiben wirksam, Aufrufe sind nicht garantiert. Bei aktivem Inkognito ist kein Start möglich. Empfang über `swipe` oder `search` konfigurieren. Behalten Sie `X-Feed-Request-Ref` beim Blättern bei. Bis zu 20 % des stabilen API-Stroms sind Zusatzplatzierungen. `api_placements` zählt keine bestätigten Ansichten. ```json PUT /v1/commerce/delivery { "format": "search", "enabled": true } ``` ## Superlikes und Rücknahmen Nach Aktivierung ist für Superlikes und Rücknahmen `X-Action-Ref` erforderlich. Nutzen Sie bei Wiederholungen dieselbe Referenz, bei MCP `action_ref`. Nur erfolgreiche Superlikes verbrauchen eine Einheit. ## Inkognito nach Ablauf Das Profil bleibt verborgen. Neue Suchen sind bis zur Verlängerung oder ausdrücklichen Rückkehr in den normalen Modus gesperrt. ## Fehler und Ereignisse Prüfen Sie `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` und `503 live_payments_unavailable`. Beheben Sie die Ursache vor einem neuen Auftrag. Beachten Sie [Boost-Ereignisse](/de/docs/webhooks/) und die [API-Referenz](/de/docs/reference/#commerce). # Profile und Einwilligungen Synchronisieren Sie Profile nach der Zustimmung und bei jeder relevanten Änderung. Trennen Sie das Ausblenden eines Profils von der endgültigen Löschung. ## Einwilligung einholen Erklären Sie vor der Teilnahme, welche Profile und Nachrichten andere Plattformen sehen und wie die Teilnahme endet. Für die Freigabe ist `consent.network` nötig. Speichern Sie den tatsächlichen Zeitpunkt `given_at` und die angezeigte `text_version`. Holen Sie bei wesentlichen Änderungen erneut die Einwilligung ein. ### Weltweit `world` erlaubt weltweite Kontakte bei beidseitiger Zustimmung. `cross_language` erlaubt Kontakte ohne gemeinsame Sprache. Fragen Sie beide Optionen getrennt ab. `show_distance` im Profil steuert, ob andere die Entfernung sehen. Es ist standardmäßig deaktiviert. ```json "consent": { "network": true, "cross_language": true, "world": false, "given_at": "2026-10-24T12:00:00Z", "text_version": "2026-10-24" } ``` ## Absichten `serious` bedeutet feste Beziehung, `casual` unverbindliche Treffen und `friendship` Freundschaft. Für `arrangement` braucht die Plattform eine Freigabe und das Profil eine `arrangement_role` von `provider` oder `seeker`. Ist dies die einzige gemeinsame Absicht, müssen sich die Rollen ergänzen. Zeigen Sie die Rolle nur in dieser Kategorie. Bezahlte Treffen sind immer verboten. ## Profil aktualisieren Rufen Sie `PUT /v1/members/{external_id}` bei Änderungen an Fotos, Verifizierung, Profil, Ort, Suchkriterien, Sprachen oder Einwilligungen auf. Verwenden Sie dieselbe lokale ID. ## Erster Import Senden Sie mit `PUT /v1/members` höchstens 100 Profile mit Einwilligung pro Anfrage. Prüfen Sie jedes Ergebnis einzeln und speichern Sie die Zuordnung zur lokalen ID. ```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+" } } ] } ``` ## Anforderungen an Profile `display_name` umfasst 1–50 Zeichen ohne Nachnamen oder Kontaktdaten. Mindestalter 18, `gender` ist `male` oder `female`. Es gilt `18 ≤ age_min ≤ age_max`. Geben Sie in `languages` zweistellige ISO-639-1-Codes an, die Hauptsprache zuerst. `bio` umfasst höchstens 1000 Zeichen. Geben Sie Stadt und Land oder Koordinaten an. Details in der [Referenz](/de/docs/reference/). ## Fotoverifizierung Übermitteln Sie `method`, `provider` und `verified_at` nur für tatsächlich geprüfte Fotos. Zeigen Sie den Status aus der Antwort. Bei `photos_changed` müssen die neuen Fotos erneut geprüft werden. ```json "verification": { "method": "selfie", "provider": "own", "verified_at": "2026-10-20T14:03:00Z" } ``` ```json { "network_id": "…", "photo_verified": false, "verification": "photos_changed" } ``` ## Fotoprüfung durch das Netzwerk Erstellen Sie eine Sitzung per `POST /v1/photo-checks`. Öffnen Sie die zurückgegebene URL innerhalb von 30 Minuten im Browser mit Kamerazugriff. Pro Person sind zehn Sitzungen täglich möglich. Verarbeiten Sie `photo_check.updated` und prüfen Sie jedes Foto. Bei `disputed` entscheidet die Moderation. Verwenden Sie die erfolgreiche Prüfung nur für die zugehörigen Fotos. ```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": "…" } ``` ## Stadt wechseln Die Profilstadt kann einmal täglich geändert werden. Bei `409 location_change_limited` bleibt das Profil unverändert. Senden Sie übrige Änderungen mit dem bisherigen Ort. Für die Suche auf Reisen verwenden Sie `lat` und `lon` im Feed. ## Fotos Senden Sie 1–9 dauerhaft öffentlich abrufbare HTTPS-URLs ohne Kontaktdaten im Bild. Aktualisieren Sie das Profil bei einem URL-Wechsel. Das Netzwerk kann Bilder zwischenspeichern. ## Videos Bei `videos: false` in den Capabilities keine Clips senden. Bei Freigabe sind neben Pflichtfotos bis zu drei öffentliche MP4-Dateien von je 15 Sekunden und 20 MB mit Vorschaubild möglich. ```json "videos": [ { "url": "https://cdn.example/u/1.mp4", "poster": "https://cdn.example/u/1.jpg" } ] ``` ## Moderation Neue oder geänderte Profile können vor der Anzeige geprüft werden. Werten Sie den Grund in `member.rejected` aus, lassen Sie die Person die Daten korrigieren und synchronisieren Sie erneut. ## Aktivität Melden Sie echte Aktivität über `POST /v1/members/{id}/active` oder in Gruppen bis 1000 IDs. Unbekannte IDs werden übersprungen. Nach mehr als 30 Tagen Inaktivität verschwindet das Profil aus dem Feed. ```json POST /v1/activity { "external_ids": ["user-123", "user-124", "user-125"] } ``` ## Teilnahme pausieren Mit `consent.network: false` blenden Sie das Profil aus und behalten bestehende Gespräche. Holen Sie vor erneuter Freigabe die Zustimmung ein und senden Sie `true`. ## Aufgeschobene Löschung Bei einer Wiederherstellungsfrist von 30 Tagen deaktivieren Sie das Konto. `match.frozen` sperrt Nachrichten. Berücksichtigen Sie bei einer Wiederherstellung `match.unfrozen`. ``` POST /v1/members/{external_id}/deactivate ``` ## Löschung Senden Sie `DELETE /v1/members/{external_id}?reason=account_deleted` bei Kontolöschung oder `?reason=left_network` beim Austritt. Profil, Likes, Dislikes und Sperren werden entfernt. Matches schließen, die Gegenseite behält den Verlauf ohne Namen und Fotos. Bei erneutem Beitritt entsteht ein neues Profil. Siehe [Aufbewahrungsfristen](/de/docs/safety/). # Feed, Likes und Matches Zeigen Sie passende Profile anderer Plattformen und ermöglichen Sie eine Unterhaltung nach einem gegenseitigen Like. ## Feed `GET /v1/members/{external_id}/feed?limit=20` liefert bis zu 50 Profile. Kennzeichnen Sie die Herkunft und bieten Sie bei `bio_translated` den Originaltext an. Zeigen Sie `distance_km` nur, wenn das Feld vorhanden ist. ### Weltweit Für `scope=world` müssen beide Personen zugestimmt haben. Trennen Sie die weltweite Suche von der Suche in der Nähe. ### Filter `radius_km` liegt zwischen 1 und 300, standardmäßig 50. `lat` und `lon` ändern nur den Suchmittelpunkt. Weitere Filter sind `city`, `country`, `age_min`, `age_max`, `height_min`, `height_max`, `verified_only`, `intent`, `language` und `gender`. Verwenden Sie nur eigene Absichten. Übergeben Sie `next_cursor` als `cursor` bei gleichen Filtern. Pro UTC-Tag sind 200 verschiedene Profile möglich. Wiederholungen verbrauchen kein weiteres Kontingent. ```json { "items": [ … ], "remaining_today": 180, "next_cursor": "…" } ``` ## Like `matched: false` speichert das Like, `matched: true` liefert die Match-ID. Ein identisches Like löst kein weiteres Ereignis aus. Vor dem Match lässt sich ein Like zurücknehmen. Ein Superlike erlaubt bis zu 200 Zeichen ohne Kontaktdaten und höchstens fünf Aktionen täglich. Beachten Sie die [Zusatzdienste](/de/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 ``` ## Dislike Ein bewusster Dislike blendet das Profil 30 Tage aus. Senden Sie bis zu 100 Paare je Anfrage. Blättern oder Aktualisieren ist keine Ablehnung. ```json POST /v1/dislikes { "from": "user-123", "to": "5c2a…" } ``` ```json POST /v1/dislikes { "items": [ { "from": "user-123", "to": "5c2a…" }, { "from": "user-123", "to": "8d4f…" } ] } ``` ## Eingehende Likes `like.received` enthält das Profil des Absenders. Laden Sie bei Bedarf bis zu 100 Likes pro Anfrage nach und entfernen Sie zurückgenommene Likes bei `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 Speichern Sie bei `match.created` die Zuordnung zwischen `match_id`, lokalem Konto und Gegenüber für [Nachrichten](/de/docs/messages/). ## Offene Matches `GET /v1/members/{external_id}/matches` liefert die offenen Matches. Gleichen Sie damit Ihren Bestand nach einer Unterbrechung ab. ## Chat beenden `clear` verbirgt den Verlauf für eine Seite. Das Schließen verhindert neue Nachrichten und erhält den Verlauf. `erase=true` löscht für beide Seiten und erzeugt `match.erased`. Bei Meldungen verbleibt eine Moderationskopie für 90 Tage. ```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 und Inkognito Prüfen Sie die [Dienstbedingungen](/de/docs/services/) vor der Aktivierung. Ein Boost ist mit Inkognito unvereinbar. # Nachrichten und Übersetzung Nach einem Match können Mitglieder direkt in ihren Apps schreiben. Pereval übermittelt die Nachrichten und stellt verfügbare Übersetzungen bereit. ## Nachricht senden Senden Sie 1–4000 Zeichen Text für ein offenes Match. Fotos und Sprachnachrichten sind nicht vorgesehen. In den ersten sieben Tagen darf ein Mitglied täglich 20 neue Gespräche beginnen. Antworten in laufenden Gesprächen sind davon ausgenommen. Bei `429 first_messages_limit` warten Sie bis zum nächsten Tag. ```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" } ``` ## Nachrichten empfangen `message.created` wird nach dem Übersetzungsversuch zugestellt. Verarbeiten Sie die Ereignis-ID einmal und ordnen Sie die Nachricht der richtigen Unterhaltung zu. ```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": [] } } } ``` ## Automatische Übersetzung Pereval erkennt die Sprache des Textes und berücksichtigt bei kurzen Antworten die Sprachen des Absenders. Ist die erkannte Sprache nicht in den `languages` des Empfängers enthalten, wird in die erste angegebene Sprache übersetzt. Kennzeichnen Sie `translated: true`, zeigen Sie `text` und bieten Sie `text_original` an. Bei Ausfall erscheint das Original. ## Betrugshinweise Bei `suspicious: true` kommt die Nachricht trotzdem an. Zeigen Sie eine Warnung. `flags` kann `link`, `phone`, `messenger`, `money` und zusammen mit anderen Signalen `mass_text` enthalten. Bieten Sie [Melden und Blockieren](/de/docs/safety/) an. ```json "message": { "id": "…", "text": "Text me on Telegram, it's easier", "suspicious": true, "flags": ["messenger"], … } ``` ## Lesebestätigungen Übermitteln Sie die ID der letzten gelesenen Nachricht einschließlich dieser Nachricht. Die Antwort ist `204`. Die Gegenseite erhält `message.read`. ```json POST /v1/matches/{match_id}/read { "as": "user-123", "up_to": "" } ``` ## Verlauf Der Verlauf beginnt mit der neuesten Nachricht. `as` bestimmt die Perspektive. Eigene Nachrichten enthalten nach dem Lesen `read_at`. Speichern Sie den Verlauf anhand der Ereignisse. Das Netzwerk hält Nachrichten bis zu 90 Tage ab Versand vor. Beachten Sie Löschereignisse. ``` GET /v1/matches/{match_id}/messages?as=user-123&limit=50 ``` # Ereignisse und Webhooks Hinterlegen Sie eine Webhook-URL im Partnerbereich oder rufen Sie Ereignisse selbst ab. Die Zustellung kann mehrfach erfolgen. ```json { "id": "evt_6f1c2b4e-8a3d-4c55-9b1e-2f0a7d9c1e44", "type": "match.created", "created_at": "2026-10-24T12:00:00Z", "data": { "…": "…" } } ``` ## Ereignistypen Verarbeiten Sie `like.received`, `like.withdrawn`, `match.created`, `message.created`, `message.read`, `match.closed`, `match.frozen`, `match.unfrozen`, `match.erased`, `member.reported`, `member.suspended`, `member.rejected` und `photo_check.updated`. Testen Sie die Zustellung mit `ping`. Felder und Beispiele finden Sie in der [API-Referenz](/de/docs/reference/#events). ## Signatur prüfen Berechnen Sie HMAC-SHA256 über den unveränderten Body mit dem `webhook_secret` der Umgebung. Vergleichen Sie `sha256=` in konstanter Zeit mit `X-Network-Signature`. Antworten Sie bei ungültiger Signatur mit `401`. Beispiele für PHP, Python, Node.js und Go folgen in dieser Reihenfolge. ```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) } ``` ## Wiederholungen und Duplikate Bestätigen Sie die dauerhafte Annahme innerhalb von 10 Sekunden mit `2xx`. Bei Fehlern folgen Versuche nach 10 Sekunden, 1, 5 und 30 Minuten, 2 und 6 Stunden, danach täglich bis zu drei Tage. Speichern Sie `id` und Wirkung atomar. Beachten Sie `seq` pro Empfänger, auch bei Wiederholungen. ```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 ``` ## Ereignisse abrufen Beginnen Sie mit `after=0`. Speichern Sie nach der Verarbeitung `next_after` für den nächsten Aufruf. Abgerufene Ereignisse gelten als zugestellt. Beachten Sie das Limit von 600 Anfragen pro Minute und Plattform. ``` 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 } ``` ## Bei Serverausfällen Webhooks werden bis zu drei Tage erneut zugestellt. Rufen Sie fehlende Ereignisse aus den letzten sieben Tagen per `GET /v1/events` ab. ## Boost-Ereignisse Berücksichtigen Sie `boost.started`, `boost.extended`, `boost.paused`, `boost.resumed` und `boost.completed`. Siehe [Zusatzdienste](/de/docs/services/). ## Löschungen und Sicherungskopien Speichern Sie bei `match.erased` eine dauerhafte Löschmarkierung für `match_id` in derselben Transaktion wie die Löschung. Sie muss die Protokollbereinigung überstehen. Spielen Sie nach einer Wiederherstellung alle Löschungen nach, bevor Sie Chats freigeben. Verspätete Ereignisse dürfen keine gelöschten Chats wiederherstellen. # Sicherheit und Regeln Bieten Sie Melden und Blockieren direkt im Profil und im Chat an. Verarbeiten Sie auch Meldungen über Ihre eigenen Mitglieder. ## Blockieren Eine Sperre betrifft zwei Profile. Sie verhindert weitere Vorschläge und schließt das Match mit `match.closed`. Der Verlauf bleibt erhalten. Mit `erase: true` werden Match, Nachrichten und Likes beidseitig gelöscht. Das Ereignis lautet `match.erased`. Eine Sperre erfasst nicht zwangsläufig weitere Konten derselben Person. ```json POST /v1/blocks { "from": "user-123", "to": "" } ``` ## Melden Wählen Sie als `reason` je nach Anlass `fake`, `scam`, `spam`, `offensive`, `commercial`, `underage` oder `other`. Beschreiben Sie den Vorfall. Prüfen Sie eingehende `member.reported` zeitnah. ```json POST /v1/reports { "from": "user-123", "to": "", "reason": "scam", "comment": "Asks me to send money" } ``` ## Betrugsversuche im Chat Zeigen Sie bei [Betrugshinweisen](/de/docs/messages/) eine Warnung vor Geldforderungen und einem vorschnellen Wechsel in andere Messenger. ## Netzwerkregeln ### Einwilligung Holen Sie vor der Übertragung die [Einwilligung](/de/docs/members/) ein. Ermöglichen Sie das Pausieren und Löschen. Kennzeichnen Sie die Herkunft und maschinelle Übersetzungen. Das Original muss abrufbar sein. ### Zugriff Bewahren Sie den API-Schlüssel auf dem Server auf. Beschränken Sie den Zugriff auf die eigenen Unterhaltungen. Löschen Sie bei `match.erased` die Unterhaltung, schließen Sie bei `match.closed` den Chat und entfernen Sie bei `peer_deleted: true` Namen und Fotos. ### Inhalte Nur Erwachsene ab 18 Jahren. Keine Fakes, generierten Profile, Bots, Kontaktsammlungen, Preislisten oder bezahlten Treffen. Bearbeiten Sie Meldungen. Verstöße können zur Sperre führen. ### Aufbewahrung Profile bleiben für die Dauer der Teilnahme gespeichert, Nachrichten bis zu 90 Tage ab Versand, Ereignisse 7 Tage und Dislikes 30 Tage. Bei einer Meldung bleibt eine geschützte Moderationskopie des gelöschten Chats 90 Tage ab Löschung erhalten. Für persönliche Daten aus Meldungen und Fotoprüfungen gelten höchstens 60 Tage ab Eingang oder Erstellung, danach höchstens 30 Tage in geschützten Backups. Auch offene Einsprüche verlängern die Fristen nicht. Die Löschung hebt keine Sperre auf und bestätigt kein Foto. ### Preise Die Basisintegration ist kostenlos. [Zusatzdienste](/de/docs/services/) sind optional. ## Datenschutz Keine Telefonnummern oder E-Mail-Adressen in Profildaten. Koordinaten werden gerundet gespeichert und nicht an andere Mitglieder weitergegeben. Beim Austritt bleibt der Verlauf der Gegenseite ohne Namen und Fotos bestehen. Weitere Informationen zur [Datenverarbeitung](/de/privacy/). # Fehler und Limits Verwenden Sie für die Programmlogik den HTTP-Status und das stabile Feld `error`. Der Text in `message` dient der Diagnose und kann sich ändern. ```json { "error": "invalid", "message": "birth_year: members must be 18+" } ``` ## Fehlercodes - 400 `bad_json`, `bad_id` – JSON und UUID prüfen. - 401 `unauthorized`, 403 `forbidden` – Umgebung, Freigabe und Berechtigungen prüfen. - 404 `not_found` – Ressource unbekannt oder nicht zugänglich. - 409 `match_closed`, `match_frozen`, `matched`, `member_hidden`, `world_consent_required`, `photo_check_gone`, `location_change_limited` – Status aktualisieren und Aktion anpassen. - 422 `invalid` – genanntes Feld korrigieren. - 429 `rate_limited`, `super_like_limit`, `photo_check_limit`, `first_messages_limit` – jeweiliges Zeitfenster beachten. - 500/503 `internal`, 503 `photo_check_off` – vorübergehender Fehler. ## Erneute Versuche Wiederholen Sie sichere Anfragen bei Netzfehlern, Timeout, `rate_limited` oder 5xx mit steigenden Pausen von 1, 2, 4 Sekunden. Bei Nachrichten kann ein erneuter POST Duplikate erzeugen. Prüfen Sie zuerst den Verlauf. ## Limits 600 Anfragen pro Minute je Plattform, 1 MB je Anfrage. Feed bis 50 Profile je Seite und 200 neue pro Tag. Profile und Dislikes in Gruppen bis 100, Aktivität bis 1000. Eingehende Likes und Verlauf bis 100, Ereignisse bis 500 je Seite. Nachrichten 1–4000 Zeichen, Profiltext bis 1000, `external_id` 1–128, Fotos 1–9. Pro Tag ein Stadtwechsel, zehn Fotoprüfungen und fünf Superlikes mit bis zu 200 Zeichen. In den ersten sieben Tagen täglich 20 neue Gespräche. ## Zusatzdienste Nutzen Sie bei einem Timeout dieselbe Bestellreferenz. Siehe [Fehler bei Bestellungen](/de/docs/services/). # Integration testen Prüfen Sie die Integration mit Testprofilen, bevor Sie echten Mitgliedern Zugang geben. ## Version und Verfügbarkeit Prüfen Sie mit dem Zielschlüssel `GET /v1/capabilities`. Seit 1.0.1 ersetzt `mode` das Feld `production`. Erwarten Sie `sandbox` oder `live`. Stoppen Sie bei Abweichungen. `pv_test_`, `pv_live_` und ältere `dn_` sind nur Hinweise. `404` bestätigt keine Unterstützung. `/readyz` prüft nur die Datenbank. Testen Sie Übersetzung und Fotoprüfung getrennt. Senden Sie bei `videos: false` keine Clips. ## Testumgebung Nach Freigabe finden Sie im [Partnerbereich](/de/cabinet/) den Testzugang. Test und Produktion nutzen `https://api.pereval.dating`, aber eigene Schlüssel, Webhook-URLs, Signaturgeheimnisse und Statistiken. Die Produktion wird separat freigeschaltet. ## Sandbox Testprofile aus Moskau, Sankt Petersburg, Kasan, Jekaterinburg und Nowosibirsk erwidern Likes und antworten auf Nachrichten. Neue Profile in der Nähe erhalten Likes. Prüfen Sie `match.created`, `message.created` und `like.received`. Testdaten erreichen keine echten Nutzer. ## Webhooks lokal testen Verwenden Sie einen erreichbaren Testendpunkt oder rufen Sie [Ereignisse](/de/docs/webhooks/) ab. HTTP ist nur im Testbetrieb erlaubt. Prüfen Sie die Signatur mit `ping`. ## Checkliste vor dem Start - Schlüssel nur auf dem Server speichern. - Ungültige Signaturen mit 401 ablehnen und Duplikate nach ID erkennen. - Einwilligung, Profiländerung, Ablehnung, Like, Match und Übersetzung testen. - Sperren, Meldungen, Pausieren und Löschen auf beiden Seiten prüfen. - Ausfälle simulieren, Ereignisse nachholen und getrennte Produktivdaten prüfen. - [Produktivzugang beantragen](/de/contact/). ## Zusatzdienste Testen Sie Angebote, Bestätigungen und Wiederholungen mit TEST-Guthaben. Prüfen Sie Ablauf und Datenschutz vor der [Aktivierung](/de/docs/services/). # API-Änderungen Hier stehen Änderungen des öffentlichen API-Vertrags, die Ihre Integration betreffen. ## 1.0.1 – Zugriffsmodus In `GET /v1/capabilities` ersetzt `mode` das bisherige Feld `production`. Diese Änderung ist inkompatibel. Prüfen Sie mit dem tatsächlichen Schlüssel auf `sandbox` oder `live`. Bei fehlendem, unerwartetem oder unbekanntem Wert stoppen Sie die Integration. Neue Schlüssel beginnen mit `pv_test_` oder `pv_live_`. Aktive `dn_`-Schlüssel bleiben gültig. Das Präfix ist nur ein Hinweis. ```json {"protocol_version": "1.0.1", "mode": "sandbox"} ``` ## 1.0.0 – Erster stabiler Vertrag Profile, Einwilligungen, Feed, Matches, Nachrichten, Übersetzungen, sichere Ereigniszustellung, Moderation und optionale Dienste. `production` bezeichnete die Serverumgebung, nicht den Zugriffsmodus des Schlüssels. Produktionsvideo und Anrufe waren nicht verfügbar. ## Künftige Versionen 1.0.2 bezeichnet eine kompatible Korrektur, 1.1.0 eine kompatible Erweiterung. Für einen inkompatiblen Vertrag wie 2.0.0 ist eine Migration mit mindestens 60 Tagen Vorlauf vorgesehen. ```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" ```