(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.data-privacy-src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-TT9ZP96');

Knowledge Base

Create Account API

createAccount

Synopsis:

This API is used to create a new account. In order to use this API, the account must have this API enabled. Please contact your account manager for more information.

There are two types of accounts that can be created: master and sub-account. For creating sub-accounts, the master account ID and name are required in the request. The sub-accounts will inherit all the properties and brand information from the API key account (unless specified in the request) upon creation. The subaccounts’ transactions will be billed on the master account. For creating master accounts, the master account ID and name are ignored.

The account name passed within the request will be the name of the newly created account. The login email and password passed within the request will be used to log into the account. If the login email does not already exist within our system, then the login email will be created with the password. If the login email does exist, then the password passed in the request is simply ignored and the user’s current password will be used to log in. The account will be under a plan based on the plan ID which can be requested from your account manager.

The API contains several brand information requests for the account, such as the brand name/nicknames, logo, website, address, city, state, zip, and country. The brand type identifies the type of organization (university, business, etc.) which can be requested from your account manager. The country is set by passing the country ID which can be found here.

Request: XML

<request>
    <action>createAccount</action>
    <api_key>API key</api_key>
    <account-category>'master' or 'subaccount'</account-category>
    <master-account-id>master account ID</master-account-id>
    <master-account-name>master account name</master-account-name>
    <account-name>account name</account-name>
    <login-email>login email address</login-email>
    <login-password>login password</login-password>
    <plan-id>plan ID</plan-id>
    <brand-name>brand name</brand-name>
    <brand-type>brand type</brand-type>
    <brand-logo>brand logo URL</brand-logo>
    <brand-website>brand website</brand-website>
    <brand-nicknames>brand nicknames</brand-nicknames>
    <brand-address>brand address</brand-address>
    <brand-city>brand city</brand-city>
    <brand-state>brand state</brand-state>
    <brand-zip>brand zip code</brand-zip>
    <country-id>country ID</country-id>
</request>

Request Parameters:

TermMandatory/OptionalDescription
ACTIONMandatoryThis is the name of the function you want to execute with the API.
API_KEYMandatoryRandom key that is assigned to an account that can be used for authorization instead of USER/PASS. You can find and regenerate this key on the ‘API Settings’ page.
ACCOUNT-CATEGORYOptionalThis request is used to define whether the account is a master account or sub-account.
MASTER-ACCOUNT-IDMandatory if Sub accountThe ID of the master account for the sub-account to be created.
MASTER-ACCOUNT-NAMEMandatory if Sub accountThe name of the master account for the sub-account to be created.
ACCOUNT-NAMEMandatoryThe name of the account to be created.
LOGIN-EMAILMandatory The login email address used to log into the account.
LOGIN-PASSWORDMandatory The login password for the login email used to log into the account.
PLAN-IDMandatoryThe unique ID of the plan which the account will be under. Please ask your account manager for more details.
BRAND-NAMEOptionalThe brand name for the account.
BRAND-TYPEMandatory if Master account. Optional if Sub account.The unique ID of the brand type for the account. Please ask your account manager for more details.
BRAND-LOGOOptional The brand logo for the account.
BRAND-WEBSITEOptional The URL of the brand website for the account.
BRAND-NICKNAMESOptionalThe brand nicknames for the account.
BRAND-ADDRESSOptionalThe brand address for the account.
BRAND-CITYOptionalThe brand city for the account.
BRAND-STATEOptionalThe brand state for the account.
BRAND-ZIPOptionalThe brand zip for the account.
COUNTRY-IDOptionalThe unique ID of the country for the account.

Response Parameters:

Param NamePresenceDescription
STATUSAlways“Success” or “Failure”.
API_KEYSuccess Response Only Random key that is assigned to an account that can be used for authorization instead of USER/PASS. You can find and regenerate this key on the ‘API Settings’ page.
USERIDSuccess Response Only The unique ID of the new account.
USERNAMESuccess Response OnlyThe name of the new account.
PASSWORDSuccess Response OnlyThe hashed password of the new account.
ERRORCODEError response onlyError code associated with the error.
ERRORINFOError response onlyError message explaining the error code.

Request Example: XML

Sub-account
<request>
    <action>createAccount</action>
    <api_key>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</api_key>
    <account-category>subaccount</account-category>
    <master-account-id>fakemasteraccountid</master-account-id>
    <master-account-name>fakemasteraccountname</master-account-name>
    <account-name>fakeaccountname</account-name>
    <login-email>fake.email@email.com</login-email>
    <login-password>fakepassword</login-password>
    <plan-id>1</plan-id>
</request>

Master Account
<request>
    <action>createAccount</action>
    <api_key>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</api_key>
    <account-category>master</account-category>
    <account-name>fakeaccountname</account-name>
    <login-email>fake.email@email.com</login-email>
    <login-password>fakepassword</login-password>
    <plan-id>1</plan-id>
    <brand-name>Skycore LLC</brand-name>
    <brand-type>2</brand-type>
    <brand-logo>https://fake-content-url.com/logo</brand-logo>
    <brand-website>https://fake-content-url.com</brand-website>
    <brand-nicknames>Skycore</brand-nicknames>
    <brand-address>Fake Address</brand-address>
    <brand-city>Fake City</brand-city>
    <brand-state>Fake State</brand-state>
    <brand-zip>Fake Zipcode</brand-zip>
    <country-id>7</country-id>
</request>

Response Example: Success

<response>
    <status>Success</status>
    <username>fakeusername</username>
    <password>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</password>
    <api_key>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</api_key>
    <userid>150265</userid>
</response>

Response Example: Failure

<response>
    <status>Failure</status>
    <errorcode>E149</errorcode>
    <errorinfo>The master account is a sub-account and cannot create new accounts.</errorinfo>
</response>

General Error Codes:

CodeDescription
E100Invalid request. Make a valid request via GET/POST/XML with all the required variables.
E104User Authentication Failed.
E105This account has no API rights.
E106You can call API every X seconds.
E107This account has no rights to use this action.
E108XML Parse error: $error.
E109API not activated.
E112IP was not whitelisted. API call rejected.
E113Set throughput exceeded for this API action. API call rejected.
E114Phone number is blacklisted. API call rejected.
E120Account has reached the API request limit.
E503Internal error.
CodeDescription
E141The API key account and master account are not related.
E142The account-name value is required.
E143The account-name value is already taken.
E144The login-password value is required.
E145The login-email value is invalid.
E146The login-email value is required.
E148The master account is invalid.
E149The master account is a sub-account and cannot create new accounts.
E154The account-category value is invalid.
E155The plan-id value is invalid.
E156The brand-city value is invalid.
E157The brand-state value is invalid.
E158The brand-zip value is invalid.
E159The country-id value is invalid.
E160The brand-type value is invalid.
E161The brand-website value is invalid.
E162The brand-logo value is invalid.
E163The plan-id value is required.
E407The master-account-id value is required.
E408The master-account-name value is required.

Country:

CountryCountry IDCountry Code
United States7+1
Afghanistan314+93
Albania20+355
Algeria21+213
Andorra22+376
Angola213+244
Anguilla214+1
Antigua and Barbuda215+1
Argentina212+54
Armenia23+374
Aruba24+297
Australia25+61
Austria149+43
Azerbaijan26+994
Bahamas216+1
Bahrain27+973
Bangladesh28+880
Barbados217+1
Belarus29+375
Belgium30+32
Belize218+501
Benin219+229
Bermuda31+1
Bhutan306+975
Bolivia32+591
Bosnia and Herzegovina33+387
Botswana34+267
Brazil157+55
Brunei308+673
Bulgaria36+359
Burkina Faso37+226
Burundi38+257
Cambodia39+855
Cameroon150+237
Canada40+1
Cape Verde41+238
Cayman Islands311+1
Central African Republic315+236
Chad151+235
Chile152+56
China188+86
Colombia220+57
Comoros Island221+269
Cook Islands222+682
Costa Rica223+506
Croatia43+385
Cuba224+53
Cyprus45+357
Czech Republic46+420
Democratic Republic of the Congo42+243
Denmark47+45
Djibouti226+253
Dominica Islands227+1
Dominican Republic48+1
East Timor316+670
Ecuador228+593
Egypt49+20
El Salvador50+503
Equatorial Guinea229+240
Eritrea230+291
Estonia51+372
Ethiopia231+251
Faeroe Islands232+298
Falkland Islands233+500
Fiji53+679
Finland54+358
France19+33
French Guiana234+594
French Polynesia235+689
Gabon236+241
Gambia56+220
Georgia57+995
Germany58+49
Ghana59+233
Gibraltar60+350
Greece61+30
Greenland62+299
Grenada237+1
Guadeloupe238+590
Guatemala240+502
Guinea Bissau241+245
Guinea Republic242+224
Guyana243+592
Haiti244+509
Honduras245+504
Hong Kong65+852
Hungary66+36
Iceland67+354
India5+91
Indonesia68+62
Iran246+98
Iraq247+964
Ireland69+353
Israel71+972
Italy72+39
Ivory Coast248+225
Jamaica73+1
Japan249+81
Jersey317+44
Jordan75+962
Kazakstan76+7
Kenya77+254
Kiribati250+686
Kuwait78+965
Kyrgyzstan253+996
Laos254+856
Latvia80+371
Lebanon81+961
Lesotho255+266
Liberia256+231
Libya257+218
Liechtenstein82+423
Lithuania83+370
Luxembourg258+352
Macau259+853
Macedonia86+389
Madagascar87+261
Malawi88+265
Malaysia89+60
Maldives90+960
Mali260+223
Malta91+356
Martinique261+596
Mauritania93+222
Mauritius94+230
Mayotte Islands262+262
Mexico155+52
Micronesia263+691
Moldova264+373
Monaco96+377
Mongolia97+976
Montenegro318+382
Montserrat265+1
Morocco98+212
Mozambique99+258
Myanmar266+95
Namibia267+264
Nauru268+674
Nepal100+977
Netherlands101+31
Netherlands Antilles269+599
New Caledonia270+687
New Zealand102+64
Nicaragua271+505
Niger106+227
Nigeria103+234
Niue Island272+683
Norfolk Island273+672
North Korea251+850
Northern Mariana Islands313+1
Norway104+47
Oman105+968
Pakistan156+92
Palau274+680
Palestinian Territory305+970
Panama275+507
Papua New Guinea276+675
Paraguay108+595
Peru109+51
Philippines110+63
Poland16+48
Portugal111+351
Puerto Rico277+1
Qatar112+974
Republic of the Congo225+242
Reunion113+262
Romania114+40
Russia115+7
Rwanda116+250
Saint Kitts and Nevis289+1
Saint Lucia290+1
Saint Pierre and Miquelon319+508
Saint Vincent and Grenadines312+1
Samoa (American)278+1
Samoa (Western)279+685
San Marino280+378
Sao Tome & Principe281+239
Saudi Arabia117+966
Senegal282+221
Serbia283+381
Seychelles119+248
Sierra Leone284+232
Singapore121+65
Slovakia285+421
Slovenia123+386
Solomon Islands286+677
Somalia287+252
South Africa124+27
South Korea252+82
South Sudan320+211
Spain125+34
Sri Lanka126+94
St Helena288+290
Sudan291+249
Suriname127+597
Swaziland128+268
Sweden129+46
Switzerland130+41
Syria292+963
Taiwan293+886
Tajikistan294+992
Tanzania295+255
Thailand134+66
Togo296+228
Tonga297+676
Trinidad and Tobago298+1
Tunisia135+216
Turkey136+90
Turkmenistan137+993
Turks and Caicos Islands299+1
Tuvalu300+688
Uganda139+256
Ukraine140+380
United Arab Emirates301+971
United Kingdom141+44
Uruguay302+598
Uzbekistan143+998
Vanuatu303+678
Venezuela144+58
Vietnam145+84
Virgin Islands (British)310+1
Wallis and Futuna Islands304+681
Yemen146+967
Zambia147+260
Zimbabwe148+263
Go to Top