API for developers
Everything the website and the phone app do goes through the same HTTP API. Here is how to use it.
Basics
The API speaks JSON over HTTPS. Times are UTC in ISO 8601. Money is a decimal number with its currency alongside. Lists come a page at a time.
The website, the iOS and Android apps and the back office all use exactly the endpoints described here — there is no private, better API behind them.
Public endpoints
These need no account:
GET /api/movies catalogue, 12 per page (pageSize up to 60)
?search= &genre= &sortBy= &page= &pageSize=
GET /api/movies/{id} one film
GET /api/movies/genres genre list
GET /api/screenings upcoming cinema shows
GET /api/screenings/{id}/seats seat map with taken seats
GET /api/gallery/ai published AI short films
GET /api/gallery/human published handmade short films
GET /api/health service health
Signing in
Sign in with e-mail and password to receive a short-lived access token (a JWT) and a refresh token. Send the access token as a Bearer header. When it expires, exchange the refresh token for a new pair; each refresh token works once, and using one twice signs the account out everywhere, because that only happens when a token was stolen.
curl -X POST https://<site>/api/auth/login \
-H "Content-Type: application/json" \
-d '{"email":"you@example.com","password":"…"}'
curl https://<site>/api/rentals/mine -H "Authorization: Bearer <accessToken>"
Member endpoints
These need the Bearer token:
POST /api/auth/register { fullName, email, password, gender }
POST /api/auth/login { email, password } -> { accessToken, refreshToken, user }
POST /api/auth/refresh { refreshToken } -> a new pair (the old one stops working)
GET /api/auth/me your profile
PUT /api/auth/profile { fullName, username?, bio?, isPrivate? }
GET /api/people?q= search members by @username or name
GET /api/people/u/{username} a profile
POST /api/people/{id}/follow follow (or request, for a private account)
GET /api/shorts/by/{userId}?tab=public|private&origin=ai|human a profile's films
POST /api/rentals { movieId } rent for three days
POST /api/screenings/{id}/checkout book seats
GET /api/bookings/mine your tickets
Errors
Errors use the standard Problem Details format. Validation errors list each field with its messages; 401 means sign in again, 403 means the account may not do this, 404 that the thing does not exist, 409 that it conflicts with something already there (a taken seat or username).
HTTP/1.1 400 Bad Request
Content-Type: application/problem+json
{ "title": "One or more validation errors occurred.",
"status": 400,
"errors": { "Password": ["Password needs at least one digit."] } }
Limits
Sign-in and registration allow 8 attempts per minute per address; verification codes 12 per 5 minutes. Exceeding a limit returns 429 Too Many Requests — wait and try again.
Uploads: profile pictures up to 2 MB (JPEG, PNG, WebP); short films are checked by type and size before they are stored.
Real time
Messages, typing indicators, seat changes and notifications arrive over a SignalR hub at /hubs/chat. Connect with the same access token (as the access_token query parameter, since WebSockets cannot carry headers).
Full reference
The complete OpenAPI description, with every request and response type, is generated from the code and available to administrators at /swagger. If you are building something on top of WatchingYou, write to us and we will give you access.