Leads
Requests from a website, an ad or the club front desk. Public method.
Create a lead #
POST
/v1/leadsAccess: Public No authorization.
A request from a website, an ad or the front desk — no sign-in. A repeat with the same phone and club within 24 hours does not create a new lead: the previous one is returned with duplicate=true. If the person is already registered, the lead is linked to them. Source and UTM tags feed the club acquisition report.
Request body application/json
| Field | Type | Required | Description |
|---|---|---|---|
phone | string | yes | Phone (Russian number) length from 5; length up to 32 |
name | string | no | Name length up to 80 |
club_id | string, or null | no | Club the lead is for length up to 24 |
source | string | no | Source: website, ad, desk, etc. length up to 60 |
utm | object, or null | no | UTM tags as an object |
comment | string | no | Comment, up to 300 characters length up to 300 |
Example request
curl -X POST "https://your-server/api/v1/leads" \
-H "Content-Type: application/json" \
-d '{
"phone": "+79000000001",
"name": "Maria",
"club_id": "c1",
"source": "site",
"utm": {"utm_source": "yandex", "utm_campaign": "autumn"},
"comment": "Trial lesson, please"
}'Responses
| Code | detail | Meaning |
|---|---|---|
| 200 | — | Success; example below |
| 400 | bad_phone | Phone not recognized (a Russian +7… number is expected) |
| 404 | club_not_found | Club not found |
| 422 | […] | Parameter or body validation error: detail is a list of errors |
Example response
{"ok": true, "id": "2c9e5a71-8b04-4f3d-a6e2-1d7b0c9f5e38", "duplicate": false}