Sign-in and sessions
curl -X GET 'https://example.com/auth/config'Example Response200
{ "google_client_id": "string"}POST
application/json- body
email*Emailpurpose?PurposeDefault
"continue"Value in
"continue""reset_password"Successful Response
application/json- response
resend_in_seconds*Resend In Secondsexpires_in_seconds*Expires In Secondscurl -X POST 'https://example.com/auth/email/start' \ -H 'Content-Type: application/json' \ -d '{ "email": "string"}'Example Response
{ "resend_in_seconds": 0, "expires_in_seconds": 0}POST
client?Clientnative returns tokens in the body instead of setting cookies
Default
"web"Value in
"web""native"application/json- body
email*Emailcode*CodeMatch
^\d{6}$Successful Response
application/json- response
status*StatusValue in
"signed_in""needs_profile"user?|nullregistration_token?string|nulltokens?|nullcurl -X POST 'https://example.com/auth/email/verify' \ -H 'Content-Type: application/json' \ -d '{ "email": "string", "code": "string"}'Example Response
{ "status": "signed_in", "user": { "id": "string", "email": "string", "display_name": "string", "avatar_url": "string", "locale": "string", "has_password": true, "identities": [ { "provider": "google", "email": "string", "created_at": "2019-08-24T14:15:22Z" } ], "created_at": "2019-08-24T14:15:22Z" }, "registration_token": "string", "tokens": { "access_token": "string", "refresh_token": "string", "token_type": "Bearer", "expires_in": 0 }}POST
client?Clientnative returns tokens in the body instead of setting cookies
Default
"web"Value in
"web""native"application/json- body
registration_token*Registration TokenLength
length <= 200display_name*Display NameLength
1 <= length <= 60password?|nullSuccessful Response
application/json- response
status*StatusValue in
"signed_in""needs_profile"user?|nullregistration_token?string|nulltokens?|nullcurl -X POST 'https://example.com/auth/register/complete' \ -H 'Content-Type: application/json' \ -d '{ "registration_token": "string", "display_name": "string"}'Example Response
{ "status": "signed_in", "user": { "id": "string", "email": "string", "display_name": "string", "avatar_url": "string", "locale": "string", "has_password": true, "identities": [ { "provider": "google", "email": "string", "created_at": "2019-08-24T14:15:22Z" } ], "created_at": "2019-08-24T14:15:22Z" }, "registration_token": "string", "tokens": { "access_token": "string", "refresh_token": "string", "token_type": "Bearer", "expires_in": 0 }}POST
client?Clientnative returns tokens in the body instead of setting cookies
Default
"web"Value in
"web""native"application/json- body
email*Emailpassword*PasswordLength
1 <= length <= 256Successful Response
application/json- response
status*StatusValue in
"signed_in""needs_profile"user?|nullregistration_token?string|nulltokens?|nullcurl -X POST 'https://example.com/auth/password/login' \ -H 'Content-Type: application/json' \ -d '{ "email": "string", "password": "string"}'Example Response
{ "status": "signed_in", "user": { "id": "string", "email": "string", "display_name": "string", "avatar_url": "string", "locale": "string", "has_password": true, "identities": [ { "provider": "google", "email": "string", "created_at": "2019-08-24T14:15:22Z" } ], "created_at": "2019-08-24T14:15:22Z" }, "registration_token": "string", "tokens": { "access_token": "string", "refresh_token": "string", "token_type": "Bearer", "expires_in": 0 }}POST
client?Clientnative returns tokens in the body instead of setting cookies
Default
"web"Value in
"web""native"application/json- body
email*Emailcode*CodeMatch
^\d{6}$new_password*New PasswordLength
1 <= length <= 256Successful Response
application/json- response
status*StatusValue in
"signed_in""needs_profile"user?|nullregistration_token?string|nulltokens?|nullcurl -X POST 'https://example.com/auth/password/reset' \ -H 'Content-Type: application/json' \ -d '{ "email": "string", "code": "string", "new_password": "string"}'Example Response
{ "status": "signed_in", "user": { "id": "string", "email": "string", "display_name": "string", "avatar_url": "string", "locale": "string", "has_password": true, "identities": [ { "provider": "google", "email": "string", "created_at": "2019-08-24T14:15:22Z" } ], "created_at": "2019-08-24T14:15:22Z" }, "registration_token": "string", "tokens": { "access_token": "string", "refresh_token": "string", "token_type": "Bearer", "expires_in": 0 }}POST
client?Clientnative returns tokens in the body instead of setting cookies
Default
"web"Value in
"web""native"application/json- body
id_token*Id TokenLength
length <= 4096Successful Response
application/json- response
status*StatusValue in
"signed_in""needs_profile"user?|nullregistration_token?string|nulltokens?|nullcurl -X POST 'https://example.com/auth/google' \ -H 'Content-Type: application/json' \ -d '{ "id_token": "string"}'Example Response
{ "status": "signed_in", "user": { "id": "string", "email": "string", "display_name": "string", "avatar_url": "string", "locale": "string", "has_password": true, "identities": [ { "provider": "google", "email": "string", "created_at": "2019-08-24T14:15:22Z" } ], "created_at": "2019-08-24T14:15:22Z" }, "registration_token": "string", "tokens": { "access_token": "string", "refresh_token": "string", "token_type": "Bearer", "expires_in": 0 }}POST
application/json- body
refresh_token*Refresh TokenLength
length <= 200Successful Response
application/json- response
access_token*Access Tokenrefresh_token*Refresh Tokentoken_type?Token TypeDefault
"Bearer"expires_in*Expires InAccess token lifetime in seconds
curl -X POST 'https://example.com/auth/token/refresh' \ -H 'Content-Type: application/json' \ -d '{ "refresh_token": "string"}'Example Response
{ "access_token": "string", "refresh_token": "string", "token_type": "Bearer", "expires_in": 0}POST
cookie
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
Successful Response
application/json- response
ok?OkDefault
truecurl -X POST 'https://example.com/auth/logout'Example Response200
{ "ok": true}