EzineArticles API

EzineArticles API - Create A New Account

The new account creation API method allows you to create new account and become an EzineArticles Expert Author.

« Return to API home

Parameters for New Account Creation

ParameterPossible ValuesPurposeDefault
emailEmail address is used as account login.Required
passwordSix characters minimum and must contain at least one number.Required
first_nameInitial author name will be created from your first & last name. Additional pen names can be added after your account is created.Required
address1Mailing address.Required
cityCity name.Required
stateAccount owner's Province or State name.Required
zipPostal or Zip codeRequired
businessAccount owner's business name.
urlAccount owner's web site url.Required
referrerApplication name or web site url used to create this account.Required
newsletter_subscribetrue, falseTo Subscribe To The Weekly/Periodic EzineArticles Newslettertrue
training_series_subscribetrue, falseTo Subscribe To The EzineArticles 12+ Part Email-Based Training Seriestrue

New Account Creation Example

Using PHP:


$data['submit'] = 'account.create.new';
$data['key'] = '{your api key}';
$data['response_format'] = 'xml';

$data['email'] = '{email address}';
$data['password'] = '{password}';
$data['first_name'] = '{first name}';
$data['last_name'] = '{last name}';
$data['address1'] = '{address}';
$data['city'] = '{city}';
$data['state'] = '{state}';
$data['zip'] = '{postal/zip code}';
$data['country'] = '{country}';
$data['phone'] = '{phone}';
$data['business'] = '{business name}';
$data['url'] = '{web url address}';
$data['referrer'] = '{api application name}';

//traverse array and prepare data for posting (key1=value1)
foreach ( $data as $key => $value) {
  $post_items[] = $key . '=' . $value;

//create the final string to be posted using implode()
$post_string = implode ('&', $post_items);

//create cURL connection
$curl_connection = curl_init('http://api.ezinearticles.com/api.php');

//set options
curl_setopt($curl_connection, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($curl_connection, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl_connection, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl_connection, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($curl_connection, CURLOPT_HTTPHEADER, array("Expect:"));

//set data to be posted
curl_setopt($curl_connection, CURLOPT_POSTFIELDS, $post_string);

//perform our request
$result = curl_exec($curl_connection);

//API response information
$response = curl_multi_getcontent($curl_connection);

//close the connection


If above submit is successful, the API will return something similar to this:

<success>New account has been created.</success>
<time>2008-08-27 16:36:49</time>

Response Status Codes

If there is a problem with your API request, an error message will be shown in the format specified by the response_format parameter or in plain text if that parameter is missing.

200The request was successful. This code will accompany a response from the API.
404No results found. This code will accompany a message explaining that no results were found for your request.
400The request was invalid. This code will also be sent if you have exceeded your maximum hourly requests or your API Key is invalid.
500The API is experiencing a problem unrelated to your request that prevents it being performed at this time.