This guide runs an event from nothing to a rewarded attendee: create the activity and a session, decide how entry is gated, admit people at the door, and have Davi issue a reward on the fifth check-in. Everything here needs an organization-scoped token.
1. Create the activity and a session
An activity is the event. A session is one occurrence of it, and people check in to 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": "Friday Meetup", "description": "Weekly, doors at 7pm" }'
curl -X POST "https://api.davi.social/api/v1/activities/ACTIVITY_SLUG/sessions" \
-H "Authorization: Bearer ORG_SCOPED_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Week 1",
"start_time": "2026-02-06T19:00:00Z",
"end_time": "2026-02-06T22:00:00Z"
}'
A session's start_time and end_time are when its door admits first entries.
Model a recurring event as one activity with many sessions. That is what lets a trigger count "attended five times".
2. Decide how entry is gated
There are three gates. Each is checked separately, and passing one does not satisfy another.
| Gate | Set by | Effect |
|---|---|---|
| Ticket | requires_ticket on the activity or session | The attendee must already hold a valid ticket |
| Entitlement | required_entitlement on the activity or session | The attendee's membership tier must grant that key |
| Prior session | required_prior_session_uuid on a session | Check-in is refused with prior_session_required |
- A session inherits from its activity and can override it, so a members-only activity can still have one open session.
- The prior-session gate is answered by the person, not the card: someone who attended on one card and turns up with another has still attended.
- Registering means holding a ticket, and a ticket is a
reward. There is no separate register call. The activity
names a reward template in
ticket_template_uuid, and you issue tickets by redeeming that template to the attendee. - An anonymous walk-in cannot pass an entitlement gate. Check-in accepts an identifier that resolves to no Davi user, and that attendee holds no entitlements.
For open attendance, leave requires_ticket false and required_entitlement
unset.
3. Admit people at the door
curl -X POST "https://api.davi.social/api/v1/sessions/SESSION_SLUG/admit" \
-H "Authorization: Bearer ORG_SCOPED_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"identifier": { "type": "card", "value": "CARD_UID" },
"idempotency_key": "TAP_ID"
}'
Generate TAP_ID once per tap, and reuse it if you retry that tap.
identifier is the same tagged union used everywhere a person is named (card,
wallet, username, user_id or link), so a door scanner can send whatever
the tap gave it without resolving the person first.
One call decides and acts. decision is one of:
admitted: open the door.needs_confirm: no ticket, but one can be issued. Redeem it and admit again.blocked:blocked_reasonsays why.
A repeat admit with the same idempotency_key answers admitted again, so a
retried request is the same admission. A second tap with a new key is judged
afresh, and somebody already inside is already_admitted.
Who may admit somebody depends on the token:
- Self-service: the resolved identity must match the token's subject. A person checks themselves in.
- On behalf of: needs
session:attendees:manageon an org-scoped token for the session's organization, or a paired door device's own token. This is the door-scanner case.
Admitting is in the expensive rate-limit bucket: 20 per minute, roughly one every three seconds. A busy entrance needs more than one credential or a queue.
Show the right refusal
A refusal at the door is a 200, not an error. /admit answers
decision: "blocked" with a blocked_reason for the door to render: "Members
only", "Doors have closed", "Full". The
blocked reasons list each one with a message
to show, the order they are checked in, and the three error responses a door
also has to handle.
4. Reward attendance automatically
Register a reward trigger instead of watching check-ins and redeeming yourself:
curl -X POST \
"https://api.davi.social/api/v1/organizations/ORG_SLUG/reward-triggers" \
-H "Authorization: Bearer ORG_SCOPED_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Reward 5 check-ins",
"reward_template_uuid": "REWARD_UUID",
"trigger_scopes": ["activity.checked_in:count:user:5"],
"deduplication_window_seconds": 300
}'
The fifth check-in now issues the reward with no call from you.
5. Update your own system
Check-ins are not delivered as webhooks. Your door already holds each decision
in the admit response; to keep another system in step, read
GET /sessions/{session_slug}/attendees (scope session:attendees:read) or
GET /activities/{activity_slug}/attendees (scope activity:attendees:read)
on a schedule and apply the difference.
For rewards, subscribe your webhook endpoint to
reward.redeemed. It fires for rewards that land in a wallet belonging to a
Davi user, so a reward issued to a card-only attendee does not send one.
Deliveries retry, so the same event can arrive twice; use X-Webhook-Delivery
to recognize a repeat.
Next
- Run Activities and Check-ins: activities and sessions in full.
- Issue Rewards: reward templates, redemption and triggers.
- Gate Features on Membership: the entitlement keys a gate reads.