FlexylDocumentation

Registration API

Flexyl registration API

For event organizers and their developers. Version française

You keep your website and your registration form. Your server also sends each registration made on your site to Flexyl. Flexyl then handles the rest:

  • selection, following your event's mode;
  • the email to the participant, with their personal link and pass (a signed QR code);
  • one-gesture check-in, and checkpoints;
  • contact exchanges, and the event report.

Flexyl notifies your site at each useful step through signed webhooks.

Using Claude? Download the integration skill and give it to Claude with your code: it will do the integration for you.

1. Getting started

  1. Create your account on espace.flexyl.me, with a code sent by email. It is the same account as in the Flexyl app.
  2. Choose Organisation and describe your event. The Flexyl team reviews the request.
  3. A test event is created for you right away. Create a test key (flx_test_…) on it and build your integration.
  4. Once your event is approved:
    • accept the partner terms;
    • create your production key (flx_live_…);
    • replace the test key with it.
  5. Download the Flexyl app and sign in with the same address. Selection, verifiers and check-in happen in the app.

Your participants: on your form, you tell them how their data is used, including its transfer to Flexyl, which manages registrations, the pass and check-in on your behalf. You obtain their consent where required, under your contract with Flexyl. Flexyl does not require any specific notice or checkbox.

2. The key

  • The key stays on your server. It must never appear in a web page, a mobile app or a Git repository. Store it in an environment variable (FLEXYL_API_KEY).
  • The API refuses calls from a browser: there is no CORS access.
  • The key is shown only once, when you create it. If it is lost or leaked:
    1. create a new one in the console;
    2. put it in place on your server;
    3. revoke the old one;
    4. tell Flexyl.
  • A key only gives access to its own event.

Every call carries this header:

Authorization: Bearer flx_live_…
Content-Type: application/json

Base URL: https://flexyl.me/api/v1/partner

Limits:

  • 300 requests per minute per key. Beyond that: 429, with Retry-After.
  • 16 KB per request at most.

3. Calls

  • GET /event: checks the key, and returns the event (mode: live or test).
  • POST /registrations: sends a registration.
    • Required fields: external_id (your identifier, 1 to 100 characters among A-Z a-z 0-9 . _ : -, used for idempotency), full_name (or first_name and last_name), and email.
    • Optional fields: phone with phone_country (ISO code), level, lang (fr or en), and selected: true if you have already accepted the person.
  • Responses:
    • 201: created;
    • 200 with "replayed": true: this external_id was already received, nothing is done again, so retrying is safe;
    • 200 with "merged": true: the person was already registered another way (app, web page, import), and that registration now carries your external_id;
    • 409 duplicate_email: this email is already registered under another external_id;
    • 400 invalid_field: field tells you which field to fix;
    • 409 event_closed: the event has ended;
    • 401 invalid_key: the key is missing, wrong or revoked.
  • GET /registrations/{external_id}: reads the status. status is pending, selected, rejected or cancelled, with pass_issued and checked_in_at. The response contains no personal data.
  • PATCH /registrations/{external_id}: updates one or more of full_name, email, phone, phone_country, level, lang, or selected: true.
  • DELETE /registrations/{external_id}: cancels the registration. The pass is refused from the next sync of the check-in devices.

The full field reference is in the French version. The fields and codes are the same.

4. Webhooks

In the console, enter the https URL that will receive webhooks. You then get a secret whsec_…, shown once. Keep it on your server, like the key.

Types:

  • registration.selected, registration.rejected, pass.issued (when the pass is issued or renewed), checkin (first entry) and registration.cancelled;
  • ping: a test webhook, sent from the console.

Headers: X-Flexyl-Timestamp, X-Flexyl-Delivery-Id and X-Flexyl-Signature: v1=<hex>.

Verify in this order:

  1. Compute the HMAC-SHA256 of your secret over "{timestamp}.{delivery_id}.{raw body}".
  2. Compare it in constant time with each v1= value of the header. For 24 hours after a secret change, there are two.
  3. Reject a timestamp more than 5 minutes away from your clock.
  4. Ignore a X-Flexyl-Delivery-Id you have already processed: a webhook can arrive twice.
  5. Answer 2xx at once, then process the webhook.

On failure, the webhook is retried after 1 min, 5 min, 30 min, 2 h, 6 h, 12 h and 24 h. After that, it is marked "failed" in the console.

5. Testing with the test key

  • The flx_test_… key works only on your test event.
  • No email is sent. Instead, the response includes personal_url: open it to see what the participant will see, with their status and pass.
  • Webhooks are sent as in production, with "mode": "test".
  • Before going live, check that:
    1. a duplicate send (same external_id) answers 200 replayed;
    2. your site rejects a wrong signature;
    3. the key appears in no page and no log;
    4. a network error or a Flexyl 5xx is retried later, without blocking the participant's form.
  • Then simply swap the key: the API URL does not change.

6. Examples

The integration skill contains complete examples in PHP and Node.js: sending, retrying, and verifying webhooks.