Аутентификация
Регистрация, вход, восстановление пароля, верификация e-mail.
curl -X POST "https://loading/api/v1/security/auth/2fa/disable"{
"message": "string"
}Подтвердить настройку 2FA первым кодом
Авторизация
bearerAuth В: header
Тело запроса
application/json
TypeScript-определения
Используйте тип request body в TypeScript.
Тело ответа
application/json
curl -X POST "https://loading/api/v1/security/auth/2fa/enable-confirm" \ -H "Content-Type: application/json" \ -d '{ "code": "string", "setupId": "string" }'{
"message": "string"
}Запустить настройку 2FA (TOTP)
Авторизация
bearerAuth В: header
Тело ответа
application/json
curl -X POST "https://loading/api/v1/security/auth/2fa/enable-init"{
"backupCodes": [
"string"
],
"setupId": "string",
"totpUri": "string"
}Перевыпустить резервные коды
Авторизация
bearerAuth В: header
Тело ответа
application/json
curl -X POST "https://loading/api/v1/security/auth/2fa/regenerate-codes"{
"backupCodes": [
"string"
]
}Смена пароля
Авторизация
bearerAuth В: header
Тело запроса
application/json
TypeScript-определения
Используйте тип request body в TypeScript.
Тело ответа
application/json
curl -X PUT "https://loading/api/v1/security/auth/change-password" \ -H "Content-Type: application/json" \ -d '{ "currentPassword": "string", "newPassword": "stringstringstr" }'{
"accessToken": "string",
"message": "string"
}Вход
Тело запроса
application/json
TypeScript-определения
Используйте тип request body в TypeScript.
Тело ответа
application/json
curl -X POST "https://loading/api/v1/security/auth/login" \ -H "Content-Type: application/json" \ -d '{ "email": "string", "password": "string" }'{
"accessToken": "string",
"user": {
"email": "string",
"firstName": "string",
"id": "string",
"lastName": "string",
"teamId": "string"
}
}Выход
Авторизация
bearerAuth В: header
Тело запроса
application/json
TypeScript-определения
Используйте тип request body в TypeScript.
Refresh-токен; не нужен, если токен установлен в HttpOnly-cookie
Тело ответа
application/json
curl -X POST "https://loading/api/v1/security/auth/logout" \ -H "Content-Type: application/json" \ -d '{}'{
"message": "string"
}Профиль текущего пользователя
Авторизация
bearerAuth В: header
Тело ответа
application/json
curl -X GET "https://loading/api/v1/security/auth/profile"{
"email": "string",
"firstName": "string",
"id": "string",
"lastName": "string",
"onboardingCompletedAt": "string",
"role": "string",
"teamId": "string",
"timezone": "string",
"twoFactorEnabled": true
}Удалить текущий аккаунт
Авторизация
bearerAuth В: header
Тело ответа
application/json
curl -X DELETE "https://loading/api/v1/security/auth/profile"{
"message": "string"
}Обновить профиль
Авторизация
bearerAuth В: header
Тело запроса
application/json
TypeScript-определения
Используйте тип request body в TypeScript.
Тело ответа
application/json
curl -X PUT "https://loading/api/v1/security/auth/profile" \ -H "Content-Type: application/json" \ -d '{}'{
"email": "string",
"firstName": "string",
"id": "string",
"lastName": "string",
"message": "string"
}Обновить access-токен
Тело запроса
application/json
TypeScript-определения
Используйте тип request body в TypeScript.
Тело ответа
application/json
application/json
curl -X POST "https://loading/api/v1/security/auth/refresh" \ -H "Content-Type: application/json" \ -d '{}'{
"accessToken": "string",
"refreshToken": "string"
}{
"error": "string",
"property1": null,
"property2": null
}Регистрация
Тело запроса
application/json
TypeScript-определения
Используйте тип request body в TypeScript.
Тело ответа
application/json
curl -X POST "https://loading/api/v1/security/auth/register" \ -H "Content-Type: application/json" \ -d '{ "altcha": "string", "email": "string", "firstName": "string", "lastName": "string", "password": "stringstringstr" }'{
"message": "string"
}Запрос сброса пароля
Тело запроса
application/json
TypeScript-определения
Используйте тип request body в TypeScript.
Тело ответа
application/json
curl -X POST "https://loading/api/v1/security/auth/request-password-reset" \ -H "Content-Type: application/json" \ -d '{ "altcha": "string", "email": "string" }'{
"message": "string"
}Повторно отправить письмо подтверждения
Тело запроса
application/json
TypeScript-определения
Используйте тип request body в TypeScript.
Email, ожидающий подтверждения
Тело ответа
application/json
curl -X POST "https://loading/api/v1/security/auth/resend-verification" \ -H "Content-Type: application/json" \ -d '{ "email": "string" }'{
"message": "string"
}Сброс пароля
Тело запроса
application/json
TypeScript-определения
Используйте тип request body в TypeScript.
Тело ответа
application/json
curl -X POST "https://loading/api/v1/security/auth/reset-password" \ -H "Content-Type: application/json" \ -d '{ "password": "stringstringstr", "token": "b5507016-7da2-4777-a161-1e8042a6a377" }'{
"message": "string"
}Передать владение командой
Авторизация
bearerAuth В: header
Тело запроса
application/json
TypeScript-определения
Используйте тип request body в TypeScript.
Тело ответа
application/json
curl -X POST "https://loading/api/v1/security/auth/transfer-ownership" \ -H "Content-Type: application/json" \ -d '{ "newOwnerId": "string" }'{
"message": "string"
}Подтвердить e-mail
Тело запроса
application/json
TypeScript-определения
Используйте тип request body в TypeScript.
Тело ответа
application/json
curl -X POST "https://loading/api/v1/security/auth/verify-email" \ -H "Content-Type: application/json" \ -d '{ "code": "string", "email": "string" }'{
"accessToken": "string",
"user": {
"email": "string",
"firstName": "string",
"id": "string",
"lastName": "string",
"teamId": "string"
}
}Подтверждение 2FA при входе
Тело запроса
application/json
TypeScript-определения
Используйте тип request body в TypeScript.
Тело ответа
application/json
curl -X POST "https://loading/api/v1/security/auth/verify-totp" \ -H "Content-Type: application/json" \ -d '{ "challengeId": "string", "code": "string" }'{
"accessToken": "string",
"user": {
"email": "string",
"firstName": "string",
"id": "string",
"lastName": "string",
"teamId": "string"
}
}