Unified WorkOS callback — WorkOS is the source of truth.
Expected payload: { "code": "<authorization_code>" }
Three cases:
- User exists in both WorkOS and Django → login.
- User exists in WorkOS but not Django → provision immediately.
- User does not exist in WorkOS → code exchange fails, error returned.
Responses
access_tokenstring · requiredrefresh_tokenstring · requireduserobject · required
Log the current user out.
Two things make logout effective in this architecture:
- The webapp proxy clears the
tofu-webcookie via its outbound policy, so the browser can no longer present the access token. - The frontend redirects through
workos_logout_url(when present) to terminate the WorkOS-side session — otherwise AuthKit would silently re-authenticate on the next /signin.
We deliberately do NOT iterate OutstandingToken and call .blacklist()
on each one. The proxy strips refresh tokens from auth responses before
they ever reach the client (see set-auth-cookie-outbound), so those rows
are orphans — no device holds them, no one can present them to
/api/token/refresh/. Blacklisting defends against a threat that doesn't
exist here. If we ever start delivering refresh tokens to clients, revisit.
Response: { "message": "Successfully logged out", "workos_logout_url": "https://api.workos.com/.../logout?..." | null, "redirect_to": "/signin" }
Responses
messagestring · requiredredirect_tostring · required
workos_logout_urlstring | null
The signed-in user's inbox. Rows are personal, so every action is scoped to the recipient.
query Parameters
pageintegerA page number within the paginated result set.
page_sizeintegerNumber of results to return per page.
unreadboolean
Responses
countinteger · requiredExample: 123resultsobject[] · required
nextstring | null · uriExample: http://api.example.org/accounts/?page=4previousstring | null · uriExample: http://api.example.org/accounts/?page=2
The signed-in user's inbox. Rows are personal, so every action is scoped to the recipient.
path Parameters
idinteger · requiredA unique integer value identifying this notification.
Responses
idinteger · readOnly · requiredevent_typereadOnly · requiredtitlestring · readOnly · requiredbodystring · readOnly · requiredurl_pathstring · readOnly · requiredFrontend path the row links to.
contextreadOnly · requiredjob_idinteger | null · readOnly · requireddelivered_atstring · date-time · readOnly · requiredSet by delivery only. A roll-up moves it, bringing the row back to the top.
read_atstring | null · date-time · readOnly · requiredcreated_atstring · date-time · readOnly · requiredupdated_atstring · date-time · readOnly · required

