api_auth

<back to all web services

RegisterRequest

The following routes are available for this service:
POST/api/registerCreates new bit.pub account
RegisterRequest Parameters:
NameParameterData TypeRequiredDescription
EmailbodystringNoEmail address. If present, confirmation email will be sent to this address. Either Email or Phone is required to register.
PasswordbodystringNoPassword
FirstNamebodystringYesUser's first name. 100 characters max.
LastNamebodystringYesUser's last name. 100 characters max.
RememberForbodystringNoPeriod to maintain a session between user and bit.pub web site. If not present - session with expire when user closes browser OR in 8 hours, whatever comes first. If present, this field should contain a number followed by min|hour|day|week|month|year (no spaces).
BirthDatebodystringNoBirth date in yyyyMMdd format
GenderbodystringNoGender. M for male, F for female, otherwise skip.
LanguagebodystringNoPreferred language code
Phonebodylong?NoTelephone number. If present, confirmation sms will be sent to this number. Either Email or Phone is required to register.
InvitationbodystringNoSet invitation pass phrase here if there is any.
SmsCodeOnlybodyboolNoSet if it is known that user's phone does not support links in sms messages.
NoCookiesbodyboolNoSet this flag if client has cookies disabled. Session key will be included in response in this case
CaptchaIDbodystringNoCaptcha unique id
CaptchaSolutionbodyint[]NoSolution to the provided captcha
UserInfo Parameters:
NameParameterData TypeRequiredDescription
PersonIDformlongNo
NameformstringNo
EmailformstringNo
Telephoneformlong?No
HyperIDformstringNo
IsConfirmedformboolNo
IsEmailConfirmedformboolNo
IsTelephoneConfirmedformboolNo
IsAddressConfirmedformboolNo
IsPassportConfirmedformboolNo
DatacenterIDformbyteNo
SessionIDformlongNo
MailNodeIDformint?No
CanResendConfirmationformboolNo
LanguageformstringNo
ServerTimeformDateTimeNo
ExpirationTimeformDateTimeNoExpiration time of current session
UserAgentformUserAgentInfoNo
SessionKeyformstringNo
MinAuthLevelformintNo
SessionAuthLevelformintNo
UserAgentInfo Parameters:
NameParameterData TypeRequiredDescription
NameformstringNo
DeviceNameformstringNo
DeviceTypeformshortNo
OSTypeformshortNo
OSVersionformstringNo
BrowserNameformstringNo
BrowserVersionformstringNo

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /api/register HTTP/1.1 
Host: 1.hyper.id 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"email":"String","password":"String","firstName":"String","lastName":"String","rememberFor":"String","birthDate":"String","gender":"String","language":"String","phone":0,"invitation":"String","smsCodeOnly":false,"noCookies":false,"captchaID":"String","captchaSolution":[0]}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"personID":0,"name":"String","email":"String","telephone":0,"hyperID":"String","isConfirmed":false,"isEmailConfirmed":false,"isTelephoneConfirmed":false,"isAddressConfirmed":false,"isPassportConfirmed":false,"datacenterID":0,"sessionID":0,"mailNodeID":0,"canResendConfirmation":false,"language":"String","userAgent":{"name":"String","deviceName":"String","deviceType":0,"osType":0,"osVersion":"String","browserName":"String","browserVersion":"String"},"sessionKey":"String","minAuthLevel":0,"sessionAuthLevel":0}