Create Account

Description

This method provides a way to create a new account on the Poken system. If OAuth2 request method is used, the response will contain also a code to be exchange for an access token.

HTTP Method

POST

Path

/account

Authentication

Does not require user authentication.

Parameters

Table 4.  Parameters for " Create Account "

NameTypeValue TypeDescription
aliasFORMStringThe user alias.
passwordFORMStringThe user password.
emailFORMStringThe users email address.
langFORMStringThe users language. See data formats.
ipFORMStringThe IP address of the user, as an integeter.
timeZoneFORMStringThe users timezone. See timezone format.
countryFORMStringThe users country. See country formats.
campaignIdFORMStringthe id of the campaign the user belongs to. If this is provided, an account authenticated request should be performed and the account making the request should have permission to create accounts in the context of the campaign.
sendEmailIdFORMLong(optional) the id of the send email option. Please note that any value greater then 0 will override the campaign behavior. Currently we support - '0' (default behavior), '1' (no email sent), '2' (specific date and time), '3' (if present to event), '4' (send now)
sendEmailTimestampFORMLong(optional) an Unix timestamp, only valid for 'sendEmailId=2'
stopProcessingFORMBoolean(optional) if no messages should be send to this account if created in the context of an event
visitorCategoriesFORMString(optional) a comma separated value of object categories IDs or system paths. It will only work if the user was created in the campaign context and those categories are valid and designed to be applied to a campaign visitor.
inviteIdFORMString(optional)the invitation ID in case this user was invited to join Poken
extRefIdFORMString(optional) the user id on a 3rd party system, processed only if a valid campaign id is provided
firstNameFORMString(optional) sets first name in the account profile
lastNameFORMString(optional) sets last name in the account profile
prefixFORMString(optional) The profile honorific prefix
middleNameFORMString(optional) The profile middle name
organizationFORMString(optional) Profile's organization name
titleFORMString(optional) The title in the organization
departmentFORMString(optional) The department in the organization
specialtyFORMString(optional) The specialty in the organization
regionFORMString(optional) The region in the organization
addressFORMString(optional) The street address
cityFORMString(optional) the city
postalCodeFORMString(optional) The postal code
stateFORMString(optional) The State/Region
accountMobilePhoneFORMString(optional) The account mobile phone number to be used by the system for SMS notifications. This is a private phone that will not be shared with account's contacts.
mobilePhoneFORMString(optional) The mobile phone number
workPhoneFORMString(optional) The work phone number
workFaxFORMString(optional) The work fax number
workEmailFORMString(optional) The work email address (will be added on the card and profile)
registrationEmailFORMString(optional) The original email used for registering the account in a different system. To be used in case the email had to be generated.
workWebPageFORMString(optional) Url to the work webpage

Error Codes

10000 ( Account )

An unhandled exception has occured.

10001 ( Account )

This username has already been taken.

10002 ( Account )

The password provided is too short.

10004 ( Account )

The email address provided is already registered.

10014 ( Account )

The username is too short.It should be at least 2 characters long.

10015 ( Account )

The username contains invalid characters or keywords.

10016 ( Account )

The username contains just numbers.

10017 ( Account )

Invalid email format provided.

10018 ( Account )

You don't have the permission to request such an action.

10021 ( Account )

The country code specified is not a 2 character ISO code.

10025 ( Account )

The timezone specified is invalid.

10026 ( Account )

The language specified is invalid.

10041 ( Account )

The provided external reference ID is already used for a different account.

Response Schema

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://xsd.poken.com" xmlns:xs="http://www.w3.org/2001/XMLSchema">

  <xs:element name="account">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="accountId" type="xs:long"/>
        <xs:element name="identityId" type="xs:long"/>
        <xs:element name="username" type="xs:string" minOccurs="0"/>
        <xs:element name="code" type="xs:string" minOccurs="0"/>
        <xs:element name="expires_in" type="xs:long" minOccurs="0"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>

Sample Response

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<account xmlns="http://xsd.poken.com">
  <accountId>878752</accountId>
  <username>john_doe</username>
  <code>23123123-C-T1uVhh8nKayw8CTUDDHgvgPp</code>
  <expires_in>900</expires_in>
</account>