Deprecated - please use the JSON API instead.

registration/register

Note: previous version (v1.1) of this call is documented here.

Used to register a user.

URL

https://www[12].bulksms.com/eapi/registration/register/1/1.2/

Example

https://www1.bulksms.com/eapi/registration/register/1/1.2/?username=johndoe&password=1234678&givenname=John&surname=Doe&email=johndoe@example.com&msisdn=1111111111&billing_country=za&type=commercial

Required parameters (and example values):

Parameter description min length max length validation
username   1 30 alphanumeric and underscore
password   6 10 alphanumeric, punctuation and whitespace
givenname   1 20 alpha, punctuation and whitespace
surname   1 30 alpha, punctuation and whitespace
email   1 60 email
msisdn   5 16 numeric, no spaces or dashes
billing_country user’s two-letter ISO country code 2 2 alphabetical, case-insensitive, valid ISO 3166 two-letter country code for a country supported on the BulkSMS platform.
type commercial or non-profit     either exactly commercial or non_profit (case-insensitive); if non_profit, BulkSMS must offer such registrations in the specified country.

Optional parameters:

Parameter description min length max length validation
no_registration_sms (0 or 1,default 0) - set to 1 to suppress a welcome SMS to the registrant’s msisdn - -  
no_registration_email (0 or 1,default 0) - set to 1 to suppress a welcome email to the registrant’s email address - -  

Returns:

status_code|status_description|[CREATION_EXTRA_FLAGS]

Possible return values upon success: 0|newly_created_userid|NO_FREE_CREDITS_AVAILABLE

CREATION_EXTRA_FLAGS:

  • An optional, comma-separated list of values.
  • Allowed characters: A-Z, 0-9, _
  • Possible values:
    • NO_FREE_CREDITS_AVAILABLE: returned if free credits are not available for whatever reason.

Possible return values upon error: 1|Username not available 3|Some validation error text 4|Some user creation error text 5|Unknown error 9999|Function retired (if you receive this response, this function is no longer available and has likely been replaced with a new API)

You should never depend on the value of status_description - only depend on status_code, which is a constant. However, status_description can contain useful information about the nature of failures when you are developing your initial application.

All above responses imply an HTTP status code of 200 (OK).

The server may also respond with an HTTP status code of 302 and a Location header (redirect), in which case the client must follow the redirect.

Any other HTTP status code should be considered transient, i.e. you should attempt to resend after some interval.