Introduction Amaxwire publishing API v1.2

This is a short user guide for our press release publishing API. This API is currently in beta and will be expanded in the near future.

Our API has predictable resource-oriented URLs, accepts form-encoded post bodies, and returns JSON-encoded responses.

You can use the Amaxwire API in test mode, which does not affect your live data and does not forward press releases directly. You can easily switch between test mode with a single parameter.

 

Authentication

The Amaxwire API uses API keys to authenticate requests. You can view and manage your API keys here. You will need a public and private key.

To ensure the security of your API keys, it's important not to share them in publicly accessible areas like GitHub or client-side code. Keep in mind that these keys can be used for posting press releases and articles, so safeguarding them is crucial.

All API requests must be made over HTTPS. Requests over regular HTTP may work fine, but we do not guarantee this. API requests without authentication will also fail.

Our publish API works via a post request. The core url you can send a post request to is:

https://amaxwire.com/api/create/

To post press releases through our API, you must have sufficient credits. You can purchase these via our price overview. And you must be registered as a business. If you are registered as an individual or journalist, you will receive a 403 error. You can convert your profile to a business account here.

If everything is in order, you will receive via json a status code 200 and the url to your preliminary press release. All press releases on Amaxwire are vetted by our editorial team before they are made available to everyone. 

Publishing a press release or article

To publish a post on our network you need to authenticate with a public api (public_key) and a password (auth_key). These are all post fields that can be posted with curl along with the other parameters that make a press release.

Below you will find (in bold) an overview of all available parameters. You need to include them exactly the same way in your POST request.

Request Parameters - The basics 

Parameter Required
Type Description
public_key  yes string Your public API key, you can (re)create one here
auth_key  yes string Your private API key, you can (re)create one here
addnewsroom    string Add to your newsroom? Value 1 for yes, 0 for if you do not want to add this press release to your newsroom. If you are a PR agency and want to publish a press release for a client, you may not want to add it to your newsroom.
ptitle  yes string The title of your press release, requirements: minimum length of 10 characters and a maximum length of 140 characters.
pmeta  yes string A short introduction of your press release, this will in most cases be used as the meta description on other pages requirements: minimum length of 30 characters and a maximum length of 240 characters.
ptext  yes string The body of your press release. HTML is permitted, and we encourage its use. Accepted html tags: h1, h2, h3, h4, h5, p, u, em, strong, ul, li, br, a, table ,tr and td requirements: minimum length of 500 characters
testmode   string With this parameter, press releases are not forwarded to the editorial team for approval. Press releases in test mode are automatically deleted after 24 hours. Value 1 for testmode

 

Request Parameters - Press release details

Parameter Required
Type Description
psite yes string A url to a/your website with more information for the reader.
industry  yes array An array containing the IDs of the distribution channels (categories) in which you want to publish your press releases. You can find the most current list of our channels here. You can add a maximum of 3 channel id's
pdateday    string The day of your required publication date. requirements: a number from 1 to 31. If no publication date is specified, the current date is used.
pdatemonth    string The month of your required publication date. requirements: a number from 1 to 12. If no publication date is specified, the current date is used.
pdateyear    string The month of your required publication date. requirements: A four digit number. eg 2024. If no publication date is specified, the current date is used.
pdatehour    string The hour of your required publication date. requirements: 24 hour notation, a number from 0 to 23. If no publication date is specified, the current date is used.
pdateminute    string The minute of your required publication date. requirements: a number from 0 to 59. If no publication date is specified, the current date is used.
plang  yes string The language of your press release. You can submit a press release in any language. However, we have specific press channels for English, German, Dutch and Spanish. requirements: Alpha-2 code, eg: US, UK,  DE

<input type="input" name="industry[]">
<input type="input" name="industry[]">
<input type="input" name="industry[]">
...

  industry example if you use a html post form

 

Request Parameters - PR / Company contact

Who can the media contact for an interview or more information? 

 

Parameter Required
Type Description
company   yes string The name of the company publishing this press release, if you are a PR agency this will be the name of your client company. If you leave this empty, we will use the company name out your business profile
cname   string A contact name for the reader/journalist to get in touch with.
cphone   string A phone number for the reader/journalist to get in touch with.
cmobile   string A mobile phone number for the reader/journalist to get in touch with.
cmail   string An email address for the reader/journalist to get in touch with.
pcountry   yes string The country of publication, this will appear with the press release. If you leave this empty, we will use the company name out your business profile
pprovince   string The state or province of publication, this will appear with the press release. 
pcity   yes string The city of publication, this will appear with the press release.  If you leave this empty, we will use the company name out your business profile
pnoteto    string A note to the reader. Your press release will automatically be forwarded to affiliated news websites. Therefore, please include in this field anything you do not want to see directly on an external news website, e.g. special contact information, information about your company etc. requirements:  a maximum length of 10.000 characters.

 

Request Parameters - Add images to your press release

 

Parameter Required
Type Description
imgurl       array An array containing the full urls to your image, you can send up to 20 images per press release

<input type="input" name="imgurl[]">
<input type="input" name="imgurl[]">
<input type="input" name="imgurl[]">
...

You can add up to 20 images to your press release

$postfields['public_key']     = 'your public key';
$postfields['auth_key']     = 'your private key';
$postfields['intention']     = 'publish';

$postfields['addnewsroom']     = $_POST['addnewsroom'];
$postfields['ptitle']         = $_POST['ptitle'];    

//add your desired parameters here

$string = http_build_query( $postfields );

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://amaxwire.com/api/create/');

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $string);

$headers = array();
$headers[] = 'Content-Type: application/x-www-form-urlencoded';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);

 Response Status codes & errors

When retrieving a json or posting a request, you can expect the following status codes.

  • 200 - all ok
  • 401 - authentication error / wrong credentials
  • 403 - Not having the right permissions*
  • 418 - nothing to do
  • 425 - too many requests, max once every 5 mins
  • 429 - too many requests, max once every 15 mins
  • 432 - not enough credits for this action
  • 434 - one field not complete or does not meet requirements

* To submit a press release, you must have a business account. You can convert your account here.

Amaxwire, the smart way to get noticed online
Don't have an account? Sign up!

Discover the true potential of your news! Get your news in front of journalists, bloggers and influencers. And increase your online presence in no time.

Sign up   Login