API Overview
The PostageApp API uses many of the same standards as other APIs you may be familiar with, as all requests are simple POST requests that accept and return JSON responses. All authentication is via an API key, which is provided for you with each project.
Content Type to JSON
When POSTing to our API, which accepts and returns JSON, be sure
to set the Content-Type of your POST request to
application/json so that your request can be properly
processed.
An easy example using curl that you can drop into Terminal that gives you your account information when successfully submitted.
curl -v \
-H "Content-type: application/json" \
-X POST \
-d ' { "api_key" : "PROJECT API KEY" } ' \
https://api.postageapp.com/v.1.0/get_account_info.json
Responses
All responses will typically look like this:
{ "response" : {
“uid” : “ResponseUID goes here”,
“status” : “ok”
},
"data" : {
"message” : {
“id” : “DataID goes here”
}
}
}
An error would look like this:
{ "response" : {
"uid" : “ResponseUID goes here”,
"status" : "Error of the API call”,
"message" : "Message of the error”
}
}
Available Libraries
Official
- Ruby on Rails Works with Ruby, Rails 2 / 3, Sinatra, and Rack applications
- PHP with CodeIgniter
- PHP with CakePHP