Auth

Retrieve auth

SecurityToken
Responses
200
get/auth/
Request samples
rehive.auth.get().then(function(res){
    ...
},function(err){"
    ...
})
Response samples
application/json
{
  • "status": "string",
  • "data": [
    ]
}

Register company

Request
Request Body schema: application/json
first_name
string (First name) <= 50 characters
last_name
string (Last name) <= 50 characters
username
string (Username) <= 150 characters
email
string <email> (Email)
mobile
string (Mobile)
company
required
string (Company) [ 1 .. 100 ] characters
id_number
string or null (Id number) <= 24 characters
birth_date
string or null <date> (Birth date)
language
string (Language) [ 1 .. 24 ] characters
gender
string or null (Gender)
Enum: "male" "female" "other" "not_specified"
title
string or null (Title)
Enum: "mr" "mrs" "ms" "mx"
marital_status
string or null (Marital status)
Enum: "single" "married" "divorced" "widowed"
nationality
string or null (Nationality)
Enum: "AF" "AX" "AL" "DZ" "AS" "AD" "AO" "AI" "AQ" "AG" "AR" "AM" "AW" "AU" "AT" "AZ" "BS" "BH" "BD" "BB" "BY" "BE" "BZ" "BJ" "BM" "BT" "BO" "BQ" "BA" "BW" "BV" "BR" "IO" "BN" "BG" "BF" "BI" "CV" "KH" "CM" "CA" "KY" "CF" "TD" "CL" "CN" "CX" "CC" "CO" "KM" "CG" "CD" "CK" "CR" "CI" "HR" "CU" "CW" "CY" "CZ" "DK" "DJ" "DM" "DO" "EC" "EG" "SV" "GQ" "ER" "EE" "SZ" "ET" "FK" "FO" "FJ" "FI" "FR" "GF" "PF" "TF" "GA" "GM" "GE" "DE" "GH" "GI" "GR" "GL" "GD" "GP" "GU" "GT" "GG" "GN" "GW" "GY" "HT" "HM" "VA" "HN" "HK" "HU" "IS" "IN" "ID" "IR" "IQ" "IE" "IM" "IL" "IT" "JM" "JP" "JE" "JO" "KZ" "KE" "KI" "KW" "KG" "LA" "LV" "LB" "LS" "LR" "LY" "LI" "LT" "LU" "MO" "MG" "MW" "MY" "MV" "ML" "MT" "MH" "MQ" "MR" "MU" "YT" "MX" "FM" "MD" "MC" "MN" "ME" "MS" "MA" "MZ" "MM" "NA" "NR" "NP" "NL" "NC" "NZ" "NI" "NE" "NG" "NU" "NF" "KP" "MK" "MP" "NO" "OM" "PK" "PW" "PS" "PA" "PG" "PY" "PE" "PH" "PN" "PL" "PT" "PR" "QA" "RE" "RO" "RU" "RW" "BL" "SH" "KN" "LC" "MF" "PM" "VC" "WS" "SM" "ST" "SA" "SN" "RS" "SC" "SL" "SG" "SX" "SK" "SI" "SB" "SO" "ZA" "GS" "KR" "SS" "ES" "LK" "SD" "SR" "SJ" "SE" "CH" "SY" "TW" "TJ" "TZ" "TH" "TL" "TG" "TK" "TO" "TT" "TN" "TR" "TM" "TC" "TV" "UG" "UA" "AE" "GB" "UM" "US" "UY" "UZ" "VU" "VE" "VN" "VG" "VI" "WF" "EH" "YE" "ZM" "ZW"
timezone
string or null (Timezone) <= 100 characters
password1
required
string (Password1) [ 1 .. 128 ] characters
password2
required
string (Password2) [ 1 .. 128 ] characters
terms_and_conditions
boolean (Terms and conditions)
privacy_policy
boolean (Privacy policy)
legal_term_versions
Array of integers >= 0 items
auth_method
string (Auth method)
Default: "token"
Enum: "cookie" "token"
mode
string (Mode)
Enum: "test" "production"
links
Array of strings [ 0 .. 1 ] items
Responses
201
post/auth/company/register/
Request samples
application/json
{
  • "first_name": "string",
  • "last_name": "string",
  • "username": "string",
  • "email": "user@example.com",
  • "mobile": "string",
  • "company": "string",
  • "id_number": "string",
  • "birth_date": "2019-08-24",
  • "language": "string",
  • "gender": "male",
  • "title": "mr",
  • "marital_status": "single",
  • "nationality": "AF",
  • "timezone": "string",
  • "password1": "string",
  • "password2": "string",
  • "terms_and_conditions": true,
  • "privacy_policy": true,
  • "legal_term_versions": [
    ],
  • "auth_method": "cookie",
  • "mode": "test",
  • "links": [
    ]
}
Response samples
application/json
{
  • "status": "string",
  • "data": {
    }
}

Deactivate

Request
Request Body schema: application/json
user
required
string (User) non-empty
company
required
string (Company) non-empty
Responses
201
post/auth/deactivate/
Request samples
application/json
{
  • "user": "string",
  • "company": "string"
}
Response samples
application/json
{
  • "status": "string",
  • "data": {
    }
}

Verify deactivation

Request
Request Body schema: application/json
key
required
string (Key) non-empty
Responses
201
post/auth/deactivate/verify/
Request samples
application/json
{
  • "key": "string"
}
Response samples
application/json
{
  • "status": "string",
  • "data": {
    }
}

Verify email

Request
Request Body schema: application/json
key
required
string (Key) non-empty
Responses
201
post/auth/email/verify/
Request samples
application/json
{
  • "key": "string"
}
Response samples
application/json
{
  • "status": "string",
  • "data": {
    }
}

Resend email verify

Request
Request Body schema: application/json
email
required
string <email> (Email) non-empty
company
required
string (Company) non-empty
Responses
201
post/auth/email/verify/resend/
Request samples
application/json
{
  • "email": "user@example.com",
  • "company": "string"
}
Response samples
application/json
{
  • "status": "string",
  • "data": {
    }
}

Login

Request
Request Body schema: application/json
user
required
string (User) non-empty
company
required
string (Company) non-empty
password
required
string (Password) [ 1 .. 128 ] characters
session_duration
integer or null (Session duration) >= 0
auth_method
string (Auth method)
Default: "token"
Enum: "cookie" "token"
Responses
201
post/auth/login/
Request samples
application/json
{
  • "user": "string",
  • "company": "string",
  • "password": "string",
  • "session_duration": 0,
  • "auth_method": "cookie"
}
Response samples
application/json
{
  • "status": "string",
  • "data": {
    }
}

Logout

SecurityToken
Request
Request Body schema: application/json
object (Logout)
Responses
201
post/auth/logout/
Request samples
application/json
{ }
Response samples
application/json
{
  • "status": "string",
  • "data": { }
}

Logout all

Deletes all non-permanent auth tokens as well as the current logged in session.

SecurityToken
Request
Request Body schema: application/json
object (Logout)
Responses
201
post/auth/logout/all/
Request samples
application/json
{ }
Response samples
application/json
{
  • "status": "string",
  • "data": { }
}

Retrieve MFA

DEPRECATED : Replaced by new mfa functionality.

SecurityToken
Responses
200
get/auth/mfa/
Response samples
application/json
{
  • "status": "string",
  • "data": [
    ]
}

List MFA authenticators

SecurityToken
Request
query Parameters
verified
string
id
string
type
string
page
integer

A page number within the paginated result set.

page_size
integer

Number of results to return per page.

Responses
200
get/auth/mfa/authenticators/
Response samples
application/json
{
  • "status": "string",
  • "data": {
    }
}

Create MFA authenticator

SecurityToken
Request
Request Body schema: application/json
type
required
string (Type)
Enum: "totp" "sms" "static"
details
required
object (CreateMFADeviceDetail)
Responses
201
post/auth/mfa/authenticators/
Request samples
application/json
{
  • "type": "totp",
  • "details": { }
}
Response samples
application/json
{
  • "status": "string",
  • "data": {
    }
}

Retreieve MFA authenticator

SecurityToken
Request
path Parameters
identifier
required
string
Responses
200
get/auth/mfa/authenticators/{identifier}/
Response samples
application/json
{
  • "status": "string",
  • "data": {
    }
}

Delete MFA authenticator

SecurityToken
Request
path Parameters
identifier
required
string
Responses
204
delete/auth/mfa/authenticators/{identifier}/
Response samples
application/json
{
  • "status": "string"
}

Deliver MFA

SecurityToken
Request
Request Body schema: application/json
challenge
string (Challenge) non-empty
authenticator
string (Authenticator) non-empty
Responses
201
post/auth/mfa/deliver/
Request samples
application/json
{
  • "challenge": "string",
  • "authenticator": "string"
}
Response samples
application/json
{
  • "status": "string",
  • "data": {
    }
}

Retrieve sms MFA

DEPRECATED : Replaced by new mfa functionality.

SecurityToken
Responses
200
get/auth/mfa/sms/
Response samples
application/json
{
  • "status": "string",
  • "data": [
    ]
}

Create sms MFA

DEPRECATED : Replaced by new mfa functionality.

SecurityToken
Request
Request Body schema: application/json
mobile
required
string (Mobile) non-empty
Responses
201
post/auth/mfa/sms/
Request samples
application/json
{
  • "mobile": "string"
}
Response samples
application/json
{
  • "status": "string",
  • "data": {
    }
}

Delete sms MFA

DEPRECATED : Replaced by new mfa functionality.

SecurityToken
Responses
204
delete/auth/mfa/sms/
Response samples
application/json
{
  • "status": "string"
}

Resend MFA sms

DEPRECATED : Replaced by new mfa functionality.

SecurityToken
Request
Request Body schema: application/json
object (MFASmsSend)
Responses
201
post/auth/mfa/sms/send/
Request samples
application/json
{ }
Response samples
application/json
{
  • "status": "string",
  • "data": { }
}

Retrieve token MFA

DEPRECATED : Replaced by new mfa functionality.

SecurityToken
Responses
200
get/auth/mfa/token/
Response samples
application/json
{
  • "status": "string",
  • "data": [
    ]
}

Create token MFA

DEPRECATED : Replaced by new mfa functionality.

SecurityToken
Request
Request Body schema: application/json
algorithm
string (Algorithm)
Enum: "SHA1" "SHA256" "SHA512"
Responses
201
post/auth/mfa/token/
Request samples
application/json
{
  • "algorithm": "SHA1"
}
Response samples
application/json
{
  • "status": "string",
  • "data": {
    }
}

Delete token MFA

DEPRECATED : Replaced by new mfa functionality.

SecurityToken
Responses
204
delete/auth/mfa/token/
Response samples
application/json
{
  • "status": "string"
}

Verify MFA

SecurityToken
Request
Request Body schema: application/json
token
required
string (Token) non-empty
challenge
string (Challenge) non-empty
authenticator
string (Authenticator) non-empty
Responses
201
post/auth/mfa/verify/
Request samples
application/json
{
  • "token": "string",
  • "challenge": "string",
  • "authenticator": "string"
}
Response samples
application/json
{
  • "status": "string",
  • "data": {
    }
}

Verify mobile

Request
Request Body schema: application/json
otp
required
string (Otp) [ 1 .. 24 ] characters
Responses
201
post/auth/mobile/verify/
Request samples
application/json
{
  • "otp": "string"
}
Response samples
application/json
{
  • "status": "string",
  • "data": {
    }
}

Resend mobile verify

Request
Request Body schema: application/json
mobile
required
string (Mobile) non-empty
company
required
string (Company) non-empty
Responses
201
post/auth/mobile/verify/resend/
Request samples
application/json
{
  • "mobile": "string",
  • "company": "string"
}
Response samples
application/json
{
  • "status": "string",
  • "data": {
    }
}

Change password

SecurityToken
Request
Request Body schema: application/json
old_password
required
string (Old password) [ 1 .. 128 ] characters
new_password1
required
string (New password1) [ 1 .. 128 ] characters
new_password2
required
string (New password2) [ 1 .. 128 ] characters
Responses
201
post/auth/password/change/
Request samples
application/json
{
  • "old_password": "string",
  • "new_password1": "string",
  • "new_password2": "string"
}
Response samples
application/json
{
  • "status": "string",
  • "data": {
    }
}

Reset password

Request
Request Body schema: application/json
force
boolean (Force)
user
required
string (User) non-empty
company
required
string (Company) non-empty
Responses
201
post/auth/password/reset/
Request samples
application/json
{
  • "force": true,
  • "user": "string",
  • "company": "string"
}
Response samples
application/json
{
  • "status": "string",
  • "data": {
    }
}

Confirm password reset

Request
Request Body schema: application/json
new_password1
required
string (New password1) [ 1 .. 128 ] characters
new_password2
required
string (New password2) [ 1 .. 128 ] characters
uid
required
string (Uid) non-empty
token
required
string (Token) non-empty
Responses
201
post/auth/password/reset/confirm/
Request samples
application/json
{
  • "new_password1": "string",
  • "new_password2": "string",
  • "uid": "string",
  • "token": "string"
}
Response samples
application/json
{
  • "status": "string",
  • "data": {
    }
}

Register

Request
Request Body schema: application/json
first_name
string (First name) <= 50 characters
last_name
string (Last name) <= 50 characters
username
string (Username) <= 150 characters
email
string <email> (Email)
mobile
string (Mobile)
company
required
string (Company) [ 1 .. 100 ] characters
id_number
string or null (Id number) <= 24 characters
birth_date
string or null <date> (Birth date)
language
string (Language) [ 1 .. 24 ] characters
gender
string or null (Gender)
Enum: "male" "female" "other" "not_specified"
title
string or null (Title)
Enum: "mr" "mrs" "ms" "mx"
marital_status
string or null (Marital status)
Enum: "single" "married" "divorced" "widowed"
nationality
string or null (Nationality)
Enum: "AF" "AX" "AL" "DZ" "AS" "AD" "AO" "AI" "AQ" "AG" "AR" "AM" "AW" "AU" "AT" "AZ" "BS" "BH" "BD" "BB" "BY" "BE" "BZ" "BJ" "BM" "BT" "BO" "BQ" "BA" "BW" "BV" "BR" "IO" "BN" "BG" "BF" "BI" "CV" "KH" "CM" "CA" "KY" "CF" "TD" "CL" "CN" "CX" "CC" "CO" "KM" "CG" "CD" "CK" "CR" "CI" "HR" "CU" "CW" "CY" "CZ" "DK" "DJ" "DM" "DO" "EC" "EG" "SV" "GQ" "ER" "EE" "SZ" "ET" "FK" "FO" "FJ" "FI" "FR" "GF" "PF" "TF" "GA" "GM" "GE" "DE" "GH" "GI" "GR" "GL" "GD" "GP" "GU" "GT" "GG" "GN" "GW" "GY" "HT" "HM" "VA" "HN" "HK" "HU" "IS" "IN" "ID" "IR" "IQ" "IE" "IM" "IL" "IT" "JM" "JP" "JE" "JO" "KZ" "KE" "KI" "KW" "KG" "LA" "LV" "LB" "LS" "LR" "LY" "LI" "LT" "LU" "MO" "MG" "MW" "MY" "MV" "ML" "MT" "MH" "MQ" "MR" "MU" "YT" "MX" "FM" "MD" "MC" "MN" "ME" "MS" "MA" "MZ" "MM" "NA" "NR" "NP" "NL" "NC" "NZ" "NI" "NE" "NG" "NU" "NF" "KP" "MK" "MP" "NO" "OM" "PK" "PW" "PS" "PA" "PG" "PY" "PE" "PH" "PN" "PL" "PT" "PR" "QA" "RE" "RO" "RU" "RW" "BL" "SH" "KN" "LC" "MF" "PM" "VC" "WS" "SM" "ST" "SA" "SN" "RS" "SC" "SL" "SG" "SX" "SK" "SI" "SB" "SO" "ZA" "GS" "KR" "SS" "ES" "LK" "SD" "SR" "SJ" "SE" "CH" "SY" "TW" "TJ" "TZ" "TH" "TL" "TG" "TK" "TO" "TT" "TN" "TR" "TM" "TC" "TV" "UG" "UA" "AE" "GB" "UM" "US" "UY" "UZ" "VU" "VE" "VN" "VG" "VI" "WF" "EH" "YE" "ZM" "ZW"
timezone
string or null (Timezone) <= 100 characters
password1
required
string (Password1) [ 1 .. 128 ] characters
password2
required
string (Password2) [ 1 .. 128 ] characters
terms_and_conditions
boolean (Terms and conditions)
privacy_policy
boolean (Privacy policy)
session_duration
integer or null (Session duration) >= 0
groups
Array of strings or null [ 0 .. 1 ] items
legal_term_versions
Array of integers >= 0 items
auth_method
string (Auth method)
Default: "token"
Enum: "cookie" "token"
Responses
201
post/auth/register/
Request samples
application/json
{
  • "first_name": "string",
  • "last_name": "string",
  • "username": "string",
  • "email": "user@example.com",
  • "mobile": "string",
  • "company": "string",
  • "id_number": "string",
  • "birth_date": "2019-08-24",
  • "language": "string",
  • "gender": "male",
  • "title": "mr",
  • "marital_status": "single",
  • "nationality": "AF",
  • "timezone": "string",
  • "password1": "string",
  • "password2": "string",
  • "terms_and_conditions": true,
  • "privacy_policy": true,
  • "session_duration": 0,
  • "groups": [
    ],
  • "legal_term_versions": [
    ],
  • "auth_method": "cookie"
}
Response samples
application/json
{
  • "status": "string",
  • "data": {
    }
}

List auth tokens

SecurityToken
Request
query Parameters
token_key
string
created
string
created__lt
string
created__gt
string
created__lte
string
created__gte
string
expires__isnull
string
token_key__in
string
token_key__exclude
string
Responses
200
get/auth/tokens/
Response samples
application/json
{
  • "status": "string",
  • "data": [
    ]
}

Create auth token

SecurityToken
Request
Request Body schema: application/json
password
required
string (Password) [ 1 .. 128 ] characters
duration
integer or null (Duration) >= 0
auth_method
string (Auth method)
Default: "token"
Enum: "cookie" "token"
Responses
201
post/auth/tokens/
Request samples
application/json
{
  • "password": "string",
  • "duration": 0,
  • "auth_method": "cookie"
}
Response samples
application/json
{
  • "status": "string",
  • "data": {
    }
}

Delete auth tokens

SecurityToken
Responses
204
delete/auth/tokens/
Response samples
application/json
{
  • "status": "string"
}

Retrieve auth token

SecurityToken
Request
path Parameters
token_key
required
string
Responses
200
get/auth/tokens/{token_key}/
Response samples
application/json
{
  • "status": "string",
  • "data": {
    }
}

Delete auth token

SecurityToken
Request
path Parameters
token_key
required
string
Responses
204
delete/auth/tokens/{token_key}/
Response samples
application/json
{
  • "status": "string"
}