@apiBaseUrl = https://meets.cc/api/backend
@webBaseUrl = https://meets.cc
@email = mobile-dev@example.test
@devCode = 123456
@phone = +79991234567
@phoneCallChallengeId = paste-challenge-id-from-phone-call-start
@refreshToken = paste-refresh-token-from-auth-response
@accessToken = paste-access-token-from-auth-response
@eventId = paste-event-id-from-events-list
@calendarEntryId = paste-calendar-entry-id
@calendarInviteId = paste-calendar-invite-id-from-calendar-invites
@notificationId = paste-notification-id

### Health
GET {{apiBaseUrl}}/healthz

### Anonymous events list
GET {{apiBaseUrl}}/events?limit=20

### Anonymous feed
GET {{apiBaseUrl}}/feed?limit=20

### Anonymous public profiles
GET {{apiBaseUrl}}/users/profiles?limit=20

### Anonymous calendar gate should return 401
GET {{apiBaseUrl}}/calendar/entries

### Anonymous notifications gate should return 401
GET {{apiBaseUrl}}/notifications

### Anonymous join gate should return 401
POST {{apiBaseUrl}}/events/{{eventId}}/join
Content-Type: application/json

{"participation_visibility":"public"}

### Start dev auth challenge
POST {{apiBaseUrl}}/auth/dev/start
Content-Type: application/json

{"email":"{{email}}"}

### Verify dev auth challenge
POST {{apiBaseUrl}}/auth/dev/verify
Content-Type: application/json

{"email":"{{email}}","code":"{{devCode}}"}

### Start phone call auth challenge
POST {{apiBaseUrl}}/auth/phone/call/start
Content-Type: application/json

{"phone":"{{phone}}"}

### Check phone call auth challenge
POST {{apiBaseUrl}}/auth/phone/call/status
Content-Type: application/json

{"challenge_id":"{{phoneCallChallengeId}}"}

### Refresh session with native-stored refresh token
POST {{apiBaseUrl}}/auth/refresh
Content-Type: application/json

{"refresh_token":"{{refreshToken}}"}

### Current user
GET {{apiBaseUrl}}/me
Authorization: Bearer {{accessToken}}

### Update current profile
PATCH {{apiBaseUrl}}/me/profile
Content-Type: application/json
Authorization: Bearer {{accessToken}}

{"display_name":"Mobile user","avatar_url":"https://images.example.test/mobile-avatar.png","city":"Berlin","interests":["events"]}

### Join event
POST {{apiBaseUrl}}/events/{{eventId}}/join
Content-Type: application/json
Authorization: Bearer {{accessToken}}

{"participation_visibility":"public"}

### Leave event
DELETE {{apiBaseUrl}}/events/{{eventId}}/join
Authorization: Bearer {{accessToken}}

### Calendar entries
GET {{apiBaseUrl}}/calendar/entries
Authorization: Bearer {{accessToken}}

### Create manual calendar entry
POST {{apiBaseUrl}}/calendar/entries
Content-Type: application/json
Authorization: Bearer {{accessToken}}

{"title":"Mobile calendar entry","starts_at":"2026-08-01T18:00:00Z","timezone":"Europe/Berlin"}

### Update manual calendar entry
PATCH {{apiBaseUrl}}/calendar/entries/{{calendarEntryId}}
Content-Type: application/json
Authorization: Bearer {{accessToken}}

{"title":"Updated mobile calendar entry"}

### Cancel manual calendar entry
DELETE {{apiBaseUrl}}/calendar/entries/{{calendarEntryId}}
Authorization: Bearer {{accessToken}}

### Pending calendar invites
GET {{apiBaseUrl}}/calendar/invites?role=incoming&status=pending&limit=20
Authorization: Bearer {{accessToken}}

### Accept calendar invite
PATCH {{apiBaseUrl}}/calendar/invites/{{calendarInviteId}}
Content-Type: application/json
Authorization: Bearer {{accessToken}}

{"status":"accepted"}

### Decline calendar invite
PATCH {{apiBaseUrl}}/calendar/invites/{{calendarInviteId}}
Content-Type: application/json
Authorization: Bearer {{accessToken}}

{"status":"declined"}

### Notifications
GET {{apiBaseUrl}}/notifications?limit=20
Authorization: Bearer {{accessToken}}

### Mark notification read
POST {{apiBaseUrl}}/notifications/{{notificationId}}/read
Authorization: Bearer {{accessToken}}

### Logout
POST {{apiBaseUrl}}/auth/logout
Content-Type: application/json

{"refresh_token":"{{refreshToken}}"}

### Current user after logout should return 401
GET {{apiBaseUrl}}/me
Authorization: Bearer {{accessToken}}
