Test the API in the sandbox
To test the API, you need a test key and curl. You’ll submit a test profile, fetch the sandbox feed and test a like, a match, a message and an event. You can receive events via webhook or pull them from the API (step 5). See the integration overview for the full path to launch.
1. Get your keys
Apply. We review every application by hand and then open the dashboard for you — you log in with a code sent to the email you applied with. Keys are not sent by email: your platform issues them in the dashboard itself.
The dashboard has two environments — test and live — each with its own values. Start with test: issue a key and set your webhook URL. The key is shown only once — save it right away.
| What | Example | Where to store it |
|---|---|---|
partner_id |
d097d65b-… |
anywhere |
api_key |
dn_3f9c… |
server only, in secrets |
webhook_secret |
whsec_8a1e… |
on the server — to verify webhook signatures |
Never put the API key in a mobile app or in JavaScript on a web page: all requests to the network go from your server.
export PEREVAL_API_KEY=dn_...
2. Send a profile
The external_id in the path is your user id, any string. The network will refer to this person by the same id in all responses and events.
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://cdn.your-app.ru/u/123/1.jpg"],
"intents": ["serious", "casual"]
}'
Response:
{ "network_id": "6f1c2b4e-8a3d-4c55-9b1e-2f0a7d9c1e44" }
A repeated PUT with the same external_id updates the profile — call it on every profile change. If you already have many users who turned participation on, send them in batches of up to 100 — see first upload.
3. Get the feed
curl https://api.pereval.dating/v1/members/user-123/feed?limit=20 \
-H "Authorization: Bearer $PEREVAL_API_KEY"
{
"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…"
}
Show these profiles together with your own. Mark the profile as coming from the Pereval network, and if bio_translated is set, add an “AI-translated” label and a way to see the original.
The response may include next_cursor. The next page is the same request with cursor. Without a cursor, a repeat returns the same people. This minimum is one page.
If this is a swipe app and the person skipped a profile without a like, send a dislike — the network hides it for 30 days. A search site does not do that: pages there use the cursor. Both paths are written out separately — swipe app and search site.
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…"}'
A member gets up to 200 distinct people a day; how many new ones are left is in remaining_today. Showing the same profiles again does not decrease it.
4. Send a like
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…"}'
{"matched": false} means the like is saved, and Elena’s app will receive a like.received event. If she likes back, both apps will receive match.created, and the response to the like will be {"matched": true, "match_id": "…"}.
5. Receive an event
The network sends events as POST requests to your webhook URL. A minimal handler in PHP:
<?php
$body = file_get_contents('php://input');
$expected = 'sha256=' . hash_hmac('sha256', $body, getenv('PEREVAL_WEBHOOK_SECRET'));
if (!hash_equals($expected, $_SERVER['HTTP_X_NETWORK_SIGNATURE'] ?? '')) {
http_response_code(401);
exit;
}
$event = json_decode($body, true);
// Retries are possible: skip the event if $event['id'] has already been processed.
switch ($event['type']) {
case 'ping': /* test from the dashboard */ break;
case 'match.created': /* create a conversation */ break;
case 'message.created': /* show the message */ break;
}
http_response_code(204);
Check the URL and the signature with the “Send a test event” button in the dashboard — a ping should arrive.
No webhook URL — say, you run a bot or simple hosting? Leave it empty in the dashboard and pull events yourself:
curl "https://api.pereval.dating/v1/events?after=0&limit=100" \
-H "Authorization: Bearer $PEREVAL_API_KEY"
The response has items and next_after; make the next request with after=next_after. Details, all languages and all event types are in Events and webhooks.
6. Send a message
curl -X POST https://api.pereval.dating/v1/matches/$MATCH_ID/messages \
-H "Authorization: Bearer $PEREVAL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"from": "user-123", "text": "Привет! Как прошли выходные?"}'
Elena doesn’t speak Russian, so the network translates the message into English and delivers it as soon as the translation is ready, with the original alongside. When she reads it, you receive a message.read event.
What’s next
- From application to launch — how an API check differs from a finished integration.
- Profiles and consents — which texts to show the user and when to update the profile.
- Events and webhooks — all events and reliable delivery handling.
- Testing — the sandbox and a pre-launch checklist.
- API reference — all requests with examples in PHP, Python, Node.js and Go.