Contract 2.0.0
Aforo API: 53 operations of contract/openapi.yaml(OpenAPI 3.1), grouped by tag. Rules link to the business rules RN-01 to RN-15 indocs/spec.md; errors are problem+json fromcontract/problems.yaml.
auth
Registration, login, refresh token rotation and logout.
| Method | Path | Summary | Rules | Auth |
|---|---|---|---|---|
| POST | /api/v1/auth/register | Register a user (operationId register) | — | none |
| POST | /api/v1/auth/login | Log in (operationId login) | RATE-LIMIT | none |
| POST | /api/v1/auth/refresh | Rotate the refresh token (operationId refreshToken) | — | none |
| POST | /api/v1/auth/logout | Log out (operationId logout) | — | bearer |
me
The authenticated user.
| Method | Path | Summary | Rules | Auth |
|---|---|---|---|---|
| GET | /api/v1/me | Current user (operationId getMe) | — | bearer |
| GET | /api/v1/me/invitations | My pending invitations (operationId listMyInvitations) | RN-15 | bearer |
| POST | /api/v1/me/invitations/{invitationId}/accept | Accept an invitation (operationId acceptInvitation) | RN-15, RN-12 | bearer |
orgs
Organizations (tenants) and their members.
| Method | Path | Summary | Rules | Auth |
|---|---|---|---|---|
| GET | /api/v1/orgs | List my organizations (operationId listOrgs) | — | bearer |
| POST | /api/v1/orgs | Create an organization (operationId createOrg) | RN-12 | bearer |
| GET | /api/v1/orgs/{orgId} | Get an organization (operationId getOrg) | RN-11 | bearer |
| GET | /api/v1/orgs/{orgId}/members | List members (operationId listMembers) | — | bearer |
| GET | /api/v1/orgs/{orgId}/members/{userId} | Get a membership (operationId getMember) | — | bearer |
| PATCH | /api/v1/orgs/{orgId}/members/{userId} | Change a member's role (operationId updateMember) | RN-12 | bearer |
| DELETE | /api/v1/orgs/{orgId}/members/{userId} | Remove a member (operationId removeMember) | RN-12 | bearer |
invitations
Uniform invitations to join an organization (RN-15).
| Method | Path | Summary | Rules | Auth |
|---|---|---|---|---|
| POST | /api/v1/orgs/{orgId}/members | Invite a member (operationId addMember) | RN-15, RN-12 | bearer |
| GET | /api/v1/orgs/{orgId}/invitations | List invitations (operationId listInvitations) | RN-15 | bearer |
| DELETE | /api/v1/orgs/{orgId}/invitations/{invitationId} | Revoke an invitation (operationId revokeInvitation) | RN-15, RN-12 | bearer |
venues
Places where events happen, each with an IANA time zone.
| Method | Path | Summary | Rules | Auth |
|---|---|---|---|---|
| GET | /api/v1/orgs/{orgId}/venues | List venues (operationId listVenues) | — | bearer |
| POST | /api/v1/orgs/{orgId}/venues | Create a venue (operationId createVenue) | RN-12 | bearer |
| GET | /api/v1/orgs/{orgId}/venues/{venueId} | Get a venue (operationId getVenue) | — | bearer |
| PATCH | /api/v1/orgs/{orgId}/venues/{venueId} | Update a venue (operationId updateVenue) | RN-12 | bearer |
events
Time slots with a seat capacity and an optional waitlist.
| Method | Path | Summary | Rules | Auth |
|---|---|---|---|---|
| GET | /api/v1/orgs/{orgId}/events | List events (operationId listEvents) | — | bearer |
| POST | /api/v1/orgs/{orgId}/events | Create an event (operationId createEvent) | RN-12 | bearer |
| GET | /api/v1/orgs/{orgId}/events/{eventId} | Get an event (operationId getEvent) | — | bearer |
| PATCH | /api/v1/orgs/{orgId}/events/{eventId} | Update an event (operationId updateEvent) | RN-06, RN-09, RN-12 | bearer |
| POST | /api/v1/orgs/{orgId}/events/{eventId}/publish | Publish an event (operationId publishEvent) | RN-01, RN-12 | bearer |
| POST | /api/v1/orgs/{orgId}/events/{eventId}/cancel | Cancel an event (operationId cancelEvent) | RN-10, RN-12 | bearer |
| GET | /api/v1/orgs/{orgId}/events/{eventId}/availability | Seat availability (operationId getAvailability) | — | bearer |
bookings
Seat reservations, cancellations, check-in and attendee export.
| Method | Path | Summary | Rules | Auth |
|---|---|---|---|---|
| GET | /api/v1/orgs/{orgId}/events/{eventId}/bookings | List bookings of an event (operationId listEventBookings) | — | bearer |
| POST | /api/v1/orgs/{orgId}/events/{eventId}/bookings | Book seats (operationId createBooking) | RN-01, RN-02, RN-03, RN-04, RN-05, RN-12 | bearer |
| GET | /api/v1/orgs/{orgId}/events/{eventId}/bookings.csv | Export attendees as CSV (operationId exportAttendeesCsv) | RN-13 | bearer |
| GET | /api/v1/orgs/{orgId}/bookings/{bookingId} | Get a booking (operationId getBooking) | — | bearer |
| POST | /api/v1/orgs/{orgId}/bookings/{bookingId}/cancel | Cancel a booking (operationId cancelBooking) | RN-06, RN-07, RN-12 | bearer |
| POST | /api/v1/orgs/{orgId}/bookings/{bookingId}/check-in | Check in a booking (operationId checkInBooking) | RN-08, RN-12 | bearer |
| GET | /api/v1/orgs/{orgId}/me/bookings | My bookings (operationId listMyBookings) | — | bearer |
calendar
Signed, revocable iCalendar feed per organization.
| Method | Path | Summary | Rules | Auth |
|---|---|---|---|---|
| POST | /api/v1/orgs/{orgId}/calendar-tokens | Create a calendar feed token (operationId createCalendarToken) | RN-13, RN-12 | bearer |
| DELETE | /api/v1/orgs/{orgId}/calendar-tokens/{tokenId} | Revoke a calendar feed token (operationId revokeCalendarToken) | RN-13, RN-12 | bearer |
| GET | /api/v1/orgs/{orgId}/calendar.ics | iCalendar feed (operationId getCalendarFeed) | RN-13 | none |
webhooks
Signed outbound notifications with delivery log.
| Method | Path | Summary | Rules | Auth |
|---|---|---|---|---|
| GET | /api/v1/orgs/{orgId}/webhooks | List webhook subscriptions (operationId listWebhooks) | — | bearer |
| POST | /api/v1/orgs/{orgId}/webhooks | Create a webhook subscription (operationId createWebhook) | RN-12 | bearer |
| GET | /api/v1/orgs/{orgId}/webhooks/{webhookId} | Get a webhook subscription (operationId getWebhook) | — | bearer |
| DELETE | /api/v1/orgs/{orgId}/webhooks/{webhookId} | Delete a webhook subscription (operationId deleteWebhook) | RN-12 | bearer |
| GET | /api/v1/orgs/{orgId}/webhooks/{webhookId}/deliveries | List deliveries (operationId listWebhookDeliveries) | — | bearer |
| POST | /api/v1/orgs/{orgId}/webhooks/{webhookId}/deliveries/{deliveryId}/redeliver | Redeliver a delivery (operationId redeliverWebhook) | WEBHOOK-DELIVERY | bearer |
audit
Append-only audit trail of every mutation.
| Method | Path | Summary | Rules | Auth |
|---|---|---|---|---|
| GET | /api/v1/orgs/{orgId}/audit | Audit trail (operationId listAudit) | RN-12 | bearer |
operational
Health, readiness, metrics, keys and the contract itself (outside `/api`).
| Method | Path | Summary | Rules | Auth |
|---|---|---|---|---|
| GET | /healthz | Liveness (operationId healthz) | — | none |
| GET | /readyz | Readiness (operationId readyz) | — | none |
| GET | /metrics | Prometheus metrics (operationId metrics) | — | none |
| GET | /openapi.json | This contract (operationId getOpenApi) | — | none |
| GET | /.well-known/jwks.json | Public signing keys (operationId getJwks) | — | none |
test-mode
Only present when `AFORO_TEST_MODE=true`; otherwise they answer `404`.
| Method | Path | Summary | Rules | Auth |
|---|---|---|---|---|
| POST | /__test__/reset | Reset to the seed (operationId testReset) | — | none |
| POST | /__test__/users | Bulk-create members for load scenarios (operationId testCreateUsers) | — | none |
| GET | /__test__/fingerprint | Data fingerprint (operationId testFingerprint) | — | none |