Submit a membership request for a person (server-side)
const url = 'https://api.vimine.network/v1/enroll';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"email":"hello@example.com","first_name":"example","last_name":"example","codicefiscale":"example","codicefiscale_confirmed":true,"guardian":{"first_name":"example","last_name":"example","relation":"example","codicefiscale":"example","email":"hello@example.com","phone":"example"},"address":{"kind":"residence","line":"example","postal_code":"example","city":"example","province":"example","country":"IT"},"phone":"example","dob":"2026-04-15","gender":"M","birthplace":"example","birth_country":"example","membership_type":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","locale":"example","accept_statuto":{"version":1,"sha256":"example"},"privacy_notice":{"version":1,"sha256":"example","locale":"example"},"accept_terms":{"version":"example","sha256":"example"},"acknowledge_privacy":{"version":"example","sha256":"example"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.vimine.network/v1/enroll \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "email": "hello@example.com", "first_name": "example", "last_name": "example", "codicefiscale": "example", "codicefiscale_confirmed": true, "guardian": { "first_name": "example", "last_name": "example", "relation": "example", "codicefiscale": "example", "email": "hello@example.com", "phone": "example" }, "address": { "kind": "residence", "line": "example", "postal_code": "example", "city": "example", "province": "example", "country": "IT" }, "phone": "example", "dob": "2026-04-15", "gender": "M", "birthplace": "example", "birth_country": "example", "membership_type": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "locale": "example", "accept_statuto": { "version": 1, "sha256": "example" }, "privacy_notice": { "version": 1, "sha256": "example", "locale": "example" }, "accept_terms": { "version": "example", "sha256": "example" }, "acknowledge_privacy": { "version": "example", "sha256": "example" } }'Creates the identity when the address is new and the membership request (issued ACTIVE at once for a free type with no approval gate, else PENDING until the association records the quota and/or approves). An address that already has a Vimine account is never linked silently: its owner receives a confirmation link and the request is created when they use it. Always answers 202. accept_statuto must name the in-force statuto version (and sha256 when published). Client tokens only (enroll:write); honours Idempotency-Key.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
Optional. A person is identified by a fiscal code OR by dob + birthplace + birth_country — never neither (422 required on each missing particular). When present it is validated and cross-checked against the names, the date and the place (the state, for people born abroad)
The person confirms a code that disagrees with their particulars (422 codicefiscale_mismatch with confirmable: true)
Who holds parental responsibility for a minor (under 18 by dob or, without it, by the birth date codicefiscale encodes). REQUIRED for a minor where the association declared it collects the block (aps.collects_guardian_data): 422 required on guardian otherwise; stored only where it declared so
object
Parent, guardian… as the association records it
Optional; refused when malformed
Residence or, where different, domicile. Asked of every member or of nobody: the public profile says what the association declared (member_address: none — ignored, not stored · optional · required — 422 required on address without it)
object
Street and number
Italian addresses only (two letters); dropped abroad
ISO 3166-1 alpha-2
Demographic only: it is not cross-checked
Comune (born in Italy) or city, free text (born abroad)
ISO 3166-1 alpha-2
One of the association’s membership types (omit when it has exactly one)
The language of the page the person filled in (a platform language — it, en, …; any other tag is matched to the platform’s own: en-GB → en, zh-TW → zh-Hant). It decides the language of the mails that follow and becomes the preference of a NEW account; an existing account keeps its own. Unsupported values are ignored
The in-force statuto the person accepted on your site (from GET /v1/aps/{slug})
object
The association’s privacy notice the person read on your site (GET /v1/aps/{slug} → privacy_notice). REQUIRED when the association publishes one; 422 privacy_notice_outdated when it is not the in-force version
object
The in-force notice version shown (GET /v1/aps/{slug} → privacy_notice)
The language of the notice you showed (privacy_notice.locale of the answer you read it from). Each language is its own document, with its own version: name it when you read the profile with ?locale=. Default: the request’s locale, then the association’s language
The account terms (platform_terms) the person accepted on your site — optional, must name the in-force version
object
The in-force version label shown (GET /v1/legal/{kind})
Its template hash, when published
The platform privacy notice (platform_privacy) the person read — optional, same rule
object
The in-force version label shown (GET /v1/legal/{kind})
Its template hash, when published
Responses
Section titled “Responses”Accepted
object
Example
{ "status": "accepted"}Invalid request
object
object
Examplegenerated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "code": "example", "request_id": "example", "errors": [ { "field": "example", "code": "example", "message": "example" } ]}Missing or invalid credentials
object
object
Examplegenerated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "code": "example", "request_id": "example", "errors": [ { "field": "example", "code": "example", "message": "example" } ]}The association does not accept membership requests (api_disabled)
Not found
object
object
Examplegenerated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "code": "example", "request_id": "example", "errors": [ { "field": "example", "code": "example", "message": "example" } ]}Validation failed, unknown membership type or accept_statuto does not name the in-force statuto
Rate limited
object
object
Examplegenerated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "code": "example", "request_id": "example", "errors": [ { "field": "example", "code": "example", "message": "example" } ]}Internal error
object
object
Examplegenerated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "code": "example", "request_id": "example", "errors": [ { "field": "example", "code": "example", "message": "example" } ]}