This page shows you how to set up an event and check people in. Managing an
organization's activities needs an org-scoped token.
All paths are under https://api.davi.social/api/v1.
- An activity is an event. Its settings are the defaults its sessions start with.
- A session is a timeslot within it.
- Attendees check in by presenting an identifier (a card tap, QR scan, wallet, or username). Each check-in writes an immutable proof and can feed reward triggers.
Create an activity and sessions
curl -X POST \
"https://api.davi.social/api/v1/organizations/ORG_SLUG/activities" \
-H "Authorization: Bearer ORG_SCOPED_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Launch Night",
"description": "Doors at 7pm",
"max_attendees": 200,
"start_time": "2026-02-01T19:00:00Z",
"end_time": "2026-02-01T23:00:00Z",
"requires_ticket": false
}'
name and description are required. The activity's settings are the
defaults each of its sessions starts with:
| Field | Meaning |
|---|---|
max_attendees | Capacity; null is unlimited |
start_time, end_time | When the activity runs, for display. The door uses each session's own times |
enforces_checkin_window | Whether the door admits first entries only between a session's start_time and end_time. Default true |
allow_reentry | Whether somebody who left can be admitted again. Default false |
admits_frozen_cards | See Admission rules. Default false |
requires_ticket, ticket_template_uuid | Gate entry on a ticket (see Tickets and registration) |
Add timeslots with POST /activities/{activity_slug}/sessions. A session needs
its own name, start_time and end_time; a setting it omits is copied from
the activity. The copy is made when the session is created: a later change to
the activity reaches existing sessions only if the PATCH sets
apply_to_upcoming_sessions: true.
For a recurring schedule, such as a course that meets daily or a conference with
parallel tracks, use POST /activities/{activity_slug}/sessions/batch. Expand the
recurrence yourself and send one entry per occurrence, each with its own name and
times. Every other setting in the request applies to all of them, so capacity and
gate settings stay identical across the batch. Each occurrence is its own
session, so one meeting is cancelled or removed on its own, with no list of
exceptions to maintain. Create a session singly when it needs its own capacity or gate.
A batch holds at most 200 occurrences and succeeds or fails as a whole. An
occurrence whose end_time is not after its start_time refuses the batch.
Endpoints and scopes
| Method | Path | Scope |
|---|---|---|
POST | /organizations/{organization_slug}/activities | activity:create |
GET | /activities/{activity_slug} | activity:read |
PATCH | /activities/{activity_slug} | activity:read, activity:update |
DELETE | /activities/{activity_slug} | activity:delete |
POST, DELETE | /activities/{activity_slug}/cancellation | activity:read, activity:update |
POST | /activities/{activity_slug}/sessions | activity:create |
POST | /activities/{activity_slug}/sessions/batch | activity:create |
GET | /activities/{activity_slug}/attendees | activity:attendees:read |
GET, PATCH | /sessions/{session_slug} | session:read, session:update |
GET | /sessions/{session_slug}/attendees | session:attendees:read |
PATCH | /sessions/{session_slug}/attendees/{wallet_address} | session:attendees:manage |
POST | /sessions/{session_slug}/admit | session:attend |
POST, DELETE | /sessions/{session_slug}/cancellation | session:update |
DELETE | /sessions/{session_slug} | session:delete |
Register for the two scope families separately:
activity:*covers the event as a record: creating it, reading it, listing everyone who ever attended.session:*covers one occurrence and what happens at it: reading its state, checking somebody in, correcting an attendee.
A door app needs only session:*, so the credential at the entrance cannot delete
the event.
Tickets and registration
There is no separate "register" call. Registration means holding a valid
ticket. When an activity or session sets requires_ticket, an attendee must
already hold the ticket, which is a reward issued from the
ticket_template_uuid. Open events (requires_ticket: false) let anyone check
in.
The ticket's reward template must belong to the activity: its activity_uuid is
the activity's own. So a ticketed activity is set up in three calls: create the
activity, create a reward template with that activity_uuid and platform
storage, then PATCH the activity with requires_ticket and
ticket_template_uuid.
Admit somebody
POST /sessions/{session_slug}/admit (scope session:attend) handles the door in
one call. It resolves the identifier, evaluates the same verdict /eligibility
reads, and acts on it.
curl -X POST \
"https://api.davi.social/api/v1/sessions/SESSION_SLUG/admit" \
-H "Authorization: Bearer ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"identifier": { "type": "card", "value": "CARD_IDENTIFIER" },
"idempotency_key": "unique-per-tap",
"proof_metadata": { "method": "nfc_tap" }
}'
| Field | Meaning |
|---|---|
identifier | An IdentifierRef. type is card, wallet, username, user_id, or link |
idempotency_key | Send one per tap. A repeat with the same key is the same admission. Kept per session |
proof_metadata | Optional context, such as method (nfc_tap, qr_scan), location, device |
Admitting yourself (the resolved identity matches your token) is self-service.
Admitting somebody else, as a kiosk or door app does, needs
session:attendees:manage and an org-scoped token. A client credentials token
is refused, except a paired door device's own token, which is bound to one
session; see Pair a phone.
Read the decision
Every verdict returns 200. Act on decision:
decision | What it means | What to do |
|---|---|---|
admitted | The identity is in | Open the door |
needs_confirm | No ticket, but one can be issued | Redeem the session's ticket, then call /admit again |
blocked | Cannot be admitted, and registering would not help | Show blocked_reason |
On admitted, action_taken says what kind of admission it was:
checkin: this call recorded the attendance.reentry: it re-admitted somebody already inside a session that allows re-entry.null: it was a retry, with the sameidempotency_key, of an admit that already succeeded.
On needs_confirm, issue the ticket with
POST /rewards/{reward_slug}/redeem, redeeming the
ticket_reward_uuid from /ticket-requirement. Then call /admit again; the
second call finds the ticket.
Blocked reasons
A refusal at the door is a 200 with decision: "blocked", not an error.
blocked_reason says why:
blocked_reason | Show |
|---|---|
card_frozen | "This card is frozen" |
already_admitted | "Already here" |
checkin_closed | "Check-in isn't open" |
too_early / too_late | "Doors open at…" / "Doors have closed" |
membership_required | "Members only": offer to join or upgrade |
prior_session_required | "You need to have attended the earlier session" |
registration_closed | "No ticket, and none can be issued" |
at_capacity | "Full" |
The reasons are checked in table order, so you get the most useful one to tell
the person. "Already here" wins over "doors are shut". at_capacity also comes
from the ticket check, when a ticket could be issued but every seat is taken.
Opening hours are checked only for a first entry, and only when the session's
enforces_checkin_window is set, so somebody re-entering a session that allows
it is not turned away for arriving late. Membership and prior attendance are checked
before the ticket, because no ticket fixes either.
These responses are errors, about the request rather than the person:
| Status | code | Show |
|---|---|---|
404 | identifier_unresolved | "Card not recognized" |
403 | forbidden_not_authorized | A staff problem, not an attendee one |
409 | idempotency_conflict | The key was reused for a different person |
409 | already_checked_in | Two admits for the same person raced; admit again |
502 | ledger_unavailable | Tickets could not be checked. Retry |
Admission rules
- A repeat admit with the same
idempotency_keyreturnsadmittedagain. A retried request is the same admission, so the door does not need to tell a retry from a second person. Without the key, a repeat is judged afresh: a person already inside isalready_admitted, or re-admitted withaction_taken: "reentry"where re-entry is allowed. Reusing anidempotency_keyfor a different resolved identity returns409 idempotency_conflict. - Held seats are never refused for capacity. A seat is held by a ticket for
the session or by an earlier admission. When two admits race for the last seat,
exactly one wins and the other gets
at_capacity. - A frozen card is refused first, as
card_frozen, unless the session setsadmits_frozen_cards. If it does, the card is judged like any other and the attendance is recorded withdisputed_reason: card_frozen, for the organizer to keep or void. - The ledger proof is written after the response. An
admittedresponse carriesproof_status: "pending"and noattendance_proof_tx_idyet. The door waits only on the attendance record, so a slow ledger delays the proof, not the queue. Read the proof back later. - Attendance is recorded on the identity's canonical wallet for the organization, the one every card they hold resolves to. A person who taps one card today and another tomorrow is the same attendee.
If a request fails with no response, call /admit again with the same
idempotency_key; the repeat is the same admission. To read a person's
attendance without acting, call GET /sessions/{session_slug}/attendee-status
with their wallet_address. It answers null when there is no record.
Check before the tap
Two reads, both session:read, answer a door's questions before anyone taps:
GET /sessions/{session_slug}/eligibilitytakes an identifier and reports what this person can do.recommended_actionischeckin,registerornone, andblocked_reasonsays what stands in the way, if anything. It reaches the same verdict/admitacts on, by the same rules.GET /sessions/{session_slug}/ticket-requirementtakes no identifier and reports the session's setup: no ticket needed (not_required), the reward that issues it (available, withticket_reward_uuid), or why it cannot be issued right now (at_capacity,unavailable).
Use these instead of deriving either answer yourself. A session's ticket falls back to its activity's, and the reward behind it can be withdrawn or sold out. Logic that reimplements this can disagree with what check-in actually does.
Cancel a session
POST /sessions/{session_slug}/cancellation calls a session off. It stops
admitting anyone and stops taking new seats, at online and offline doors alike.
Its attendance, the tickets people hold, and its reports all stay.
Cancel rather than delete a session that has attendance or issued tickets;
deleting one of those is refused with a 409. A delete is also refused while
another session requires attending this one first (has_dependents, naming
them in details.sessions), and an activity's while reward templates are linked
to it (has_rewards).
DELETE /sessions/{session_slug}/cancellation reinstates the session, and its
door goes back to whatever its check-in switch says. An activity takes the same
pair at /activities/{activity_slug}/cancellation.
What check-ins power
Each check-in writes an immutable proof and emits an activity.checked_in event.
That event drives reward triggers (for example
activity.checked_in:count:user:5) and the user's
feed. It is not delivered to webhooks, even to one
subscribed to it; read the attendee lists above to follow check-ins from
another system.
Next
- Issue Rewards: reward attendance automatically.