logo

Barong

Management API for barong OAuth server

#Version: 2.3.38

Security

BearerToken

jwtundefined
DescriptionBearer Token authentication
NameAuthorization
Inheader

/labels/delete

POST

Description:

Delete a label with 'private' scope

Parameters
NameLocated inDescriptionRequiredSchema
user_uidformDataUser uidYesstring
keyformDataLabel key.Yesstring
Responses
CodeDescriptionSchema
201Delete a label with 'private' scopeLabel

/labels

PUT

Description:

Update a label with 'private' scope

Parameters
NameLocated inDescriptionRequiredSchema
user_uidformDataUser uidYesstring
keyformDataLabel key.Yesstring
valueformDataLabel value.Yesstring
replaceformDataWhen true label will be created if not existNoboolean
Responses
CodeDescriptionSchema
200Update a label with 'private' scopeLabel

POST

Description:

Create a label with 'private' scope and assigns to users

Parameters
NameLocated inDescriptionRequiredSchema
user_uidformDataUser uidYesstring
keyformDataLabel key.Yesstring
valueformDataLabel value.Yesstring
Responses
CodeDescriptionSchema
201Create a label with 'private' scope and assigns to usersLabel

/labels/list

POST

Description:

Get user collection filtered on label attributes

Parameters
NameLocated inDescriptionRequiredSchema
user_uidformDataUser uidYesstring
Responses
CodeDescriptionSchema
201Get user collection filtered on label attributesLabel

/labels/filter/users

POST

Description:

Get all labels assigned to users

Parameters
NameLocated inDescriptionRequiredSchema
keyformDataLabel key.Yesstring
valueformDataLabel value.Nostring
scopeformDataLabel scope.Nostring
extendedformDataWhen true endpoint returns full information about usersNoboolean
rangeformDataNostring
fromformDataAn integer represents the seconds elapsed since Unix epoch.If set, only labels FROM the time will be retrieved.Nointeger
toformDataAn integer represents the seconds elapsed since Unix epoch.If set, only labels BEFORE the time will be retrieved.Nointeger
pageformDataPage number (defaults to 1).Nointeger
limitformDataNumber of users per page (defaults to 100, maximum is 1000).Nointeger
Responses
CodeDescriptionSchema
201Get all labels assigned to usersLabel

/users/import

POST

Description:

Imports an existing user

Parameters
NameLocated inDescriptionRequiredSchema
emailformDataUser EmailYesstring
password_digestformDataUser Password HashYesstring
phoneformDataNostring
first_nameformDataNostring
last_nameformDataNostring
dobformDataBirthday dateNodate
addressformDataNostring
postcodeformDataNostring
cityformDataNostring
countryformDataNostring
Responses
CodeDescriptionSchema
201Imports an existing userUserWithProfile

/users

POST

Description:

Creates new user

Parameters
NameLocated inDescriptionRequiredSchema
emailformDataUser EmailYesstring
passwordformDataUser PasswordYesstring
Responses
CodeDescriptionSchema
201Creates new userUserWithProfile

/users/list

POST

Description:

Returns array of users as collection

Parameters
NameLocated inDescriptionRequiredSchema
extendedformDataWhen true endpoint returns full information about usersNoboolean
rangeformDataNostring
fromformDataAn integer represents the seconds elapsed since Unix epoch.If set, only users FROM the time will be retrieved.Nointeger
toformDataAn integer represents the seconds elapsed since Unix epoch.If set, only users BEFORE the time will be retrieved.Nointeger
pageformDataPage number (defaults to 1).Nointeger
limitformDataNumber of users per page (defaults to 100, maximum is 1000).Nointeger
Responses
CodeDescriptionSchema
201Returns array of users as collectionUser

/users/get

POST

Description:

Get users and profile information

Parameters
NameLocated inDescriptionRequiredSchema
uidformDataUser uidNostring
emailformDataUser emailNostring
phone_numformDataUser phone numberNostring
Responses
CodeDescriptionSchema
201Get users and profile informationUserWithProfile

/otp/sign

POST

Description:

Sign request with barong signature

Parameters
NameLocated inDescriptionRequiredSchema
user_uidformDataAccount UIDYesstring
otp_codeformDataCode from Google AuthenticatorYesstring
Responses
CodeDescription
201Sign request with barong signature

/documents

POST

Description:

Push documents to barong DB

Parameters
NameLocated inDescriptionRequiredSchema
uidformDataUser uidYesstring
doc_typeformDataDocument typeYesstring
doc_numberformDataDocument numberYesstring
filenameformDataDocument nameYesstring
file_extformDataDocument file extensionYesstring
uploadformDataBase64 encoded documentYesstring
doc_expireformDataDocument expiration dateNodate
update_labelsformDataIf set to false, user label will not be created/updatedNoboolean
metadataformDataAny additional key: value pairs in json string formatNostring
Responses
CodeDescriptionSchema
201Push documents to barong DBUserWithProfile

/timestamp

POST

Description:

Returns server time in seconds since Unix epoch.

Responses
CodeDescription
201Returns server time in seconds since Unix epoch.

Models

Label

Get all labels assigned to users

NameTypeDescriptionRequired
keystringLabel key. [a-z0-9_-]+ should be used. Min - 3, max - 255 characters.No
valuestringLabel value. [A-Za-z0-9_-] should be used. Min - 3, max - 255 characters.No
scopestringLabel scope: 'public' or 'private'No
created_atstringNo
updated_atstringNo

UserWithProfile

Push documents to barong DB

NameTypeDescriptionRequired
emailstringNo
uidstringNo
rolestringNo
levelintegerNo
otpbooleanis 2FA enabled for accountNo
statestringNo
datastringadditional phone and profile infoNo
profileProfileNo
referral_uidstringUID of referrerNo
created_atstringNo
updated_atstringNo

Profile

NameTypeDescriptionRequired
first_namestringNo
last_namestringNo
dobdateBirthday dateNo
addressstringNo
postcodestringNo
citystringNo
countrystringNo
statestringNo
metadataobjectProfile additional fieldsNo

User

Returns array of users as collection

NameTypeDescriptionRequired
emailstringNo
uidstringNo
rolestringNo
levelintegerNo
otpbooleanis 2FA enabled for accountNo
statestringNo
referral_uidstringUID of referrerNo
datastringadditional phone and profile infoNo

APIKey

NameTypeDescriptionRequired
kidstringjwt public keyNo
algorithmstringcryptographic hash function typeNo
scopestringserialized array of scopesNo
statestringactive/non-active state of keyNo
secretstringNo
created_atstringNo
updated_atstringNo

UserWithFullInfo

NameTypeDescriptionRequired
emailstringNo
uidstringNo
rolestringNo
levelintegerNo
otpbooleanNo
statestringNo
referral_uidstringUID of referrerNo
datastringadditional phone and profile infoNo
created_atstringNo
updated_atstringNo
labelsLabelNo
phonesPhoneNo
profileProfileNo

Phone

NameTypeDescriptionRequired
countrystringNo
numberstringNo
validated_ats (g)No

UserWithKYC

NameTypeDescriptionRequired
emailstringNo
uidstringNo
rolestringNo
levelintegerNo
otpbooleanNo
statestringNo
datastringadditional phone and profile infoNo
profileProfileNo
labelsLabelNo
phonesPhoneNo
documentsDocumentNo
referral_uidstringUID of referrerNo
created_atstringNo
updated_atstringNo

Document

NameTypeDescriptionRequired
uploadstringfile urlNo
doc_typestringdocument type: passport, driver licenseNo
doc_numberstringdocument number: AB123123 typeNo
doc_expirestringexpire date of uploaded documentsNo
metadatastringany additional stored dataNo
created_atstringNo
updated_atstringNo