Documentation

Run Activities and Check-ins

Create activities and sessions, gate them with tickets, and admit attendees at the door.

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:

FieldMeaning
max_attendeesCapacity; null is unlimited
start_time, end_timeWhen the activity runs, for display. The door uses each session's own times
enforces_checkin_windowWhether the door admits first entries only between a session's start_time and end_time. Default true
allow_reentryWhether somebody who left can be admitted again. Default false
admits_frozen_cardsSee Admission rules. Default false
requires_ticket, ticket_template_uuidGate 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

MethodPathScope
POST/organizations/{organization_slug}/activitiesactivity: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}/cancellationactivity:read, activity:update
POST/activities/{activity_slug}/sessionsactivity:create
POST/activities/{activity_slug}/sessions/batchactivity:create
GET/activities/{activity_slug}/attendeesactivity:attendees:read
GET, PATCH/sessions/{session_slug}session:read, session:update
GET/sessions/{session_slug}/attendeessession:attendees:read
PATCH/sessions/{session_slug}/attendees/{wallet_address}session:attendees:manage
POST/sessions/{session_slug}/admitsession:attend
POST, DELETE/sessions/{session_slug}/cancellationsession: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" }
  }'
FieldMeaning
identifierAn IdentifierRef. type is card, wallet, username, user_id, or link
idempotency_keySend one per tap. A repeat with the same key is the same admission. Kept per session
proof_metadataOptional 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:

decisionWhat it meansWhat to do
admittedThe identity is inOpen the door
needs_confirmNo ticket, but one can be issuedRedeem the session's ticket, then call /admit again
blockedCannot be admitted, and registering would not helpShow 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 same idempotency_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_reasonShow
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:

StatuscodeShow
404identifier_unresolved"Card not recognized"
403forbidden_not_authorizedA staff problem, not an attendee one
409idempotency_conflictThe key was reused for a different person
409already_checked_inTwo admits for the same person raced; admit again
502ledger_unavailableTickets could not be checked. Retry

Admission rules

  • A repeat admit with the same idempotency_key returns admitted again. 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 is already_admitted, or re-admitted with action_taken: "reentry" where re-entry is allowed. Reusing an idempotency_key for a different resolved identity returns 409 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 sets admits_frozen_cards. If it does, the card is judged like any other and the attendance is recorded with disputed_reason: card_frozen, for the organizer to keep or void.
  • The ledger proof is written after the response. An admitted response carries proof_status: "pending" and no attendance_proof_tx_id yet. 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}/eligibility takes an identifier and reports what this person can do. recommended_action is checkin, register or none, and blocked_reason says what stands in the way, if anything. It reaches the same verdict /admit acts on, by the same rules.
  • GET /sessions/{session_slug}/ticket-requirement takes no identifier and reports the session's setup: no ticket needed (not_required), the reward that issues it (available, with ticket_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