How to access the API
Step 1: Select an API key
If you have not done it already, create an API key for your account (see Get an API key for more detail). An API key provides two information that should remain confidential at all time: a public key and a secret key (click on See more to display an API secret key):

Step 2: Select an API method
The Calaméo API provides many methods to manage subscribers, fetch publications listings, etc. According to the method you select you will have to send your request to the correct endpoint. Almost all requests must be made to the following endpoint:
http://api.calameo.com/1.0
You can send the request parameters as part of the URL (GET) or inside the HTTP body (POST).
When dealing with document uploads, the appropriate endpoint is:
http://upload.calameo.com/1.0
Step3: Make the request
To perform an action against the Calaméo API, some parameters are always required:
| Name | Type | Description |
|---|---|---|
| apikey[required] | string | API public key. The request will be carried out on behalf of the associated account. |
| signature[required] | string | Signature of the request. See how to sign your requests. |
| action[required] | string | Method to execute against the API platform. |
Sending the parameters using HTTP GET or HTTP POST request does not impact the response.
http://api.calameo.com/1.0?apikey=<apiKey>&signature=<signature>&action=<method>&...
Some optional parameters may also be included:
| Name | Type | Description |
|---|---|---|
| expires | timestamp | An UNIX timestamp specifying an expiration date and time for the request. |
| output | string | Format of the response. Either XML (default), JSON or PHP. |
http://api.calameo.com/1.0?apikey=<apiKey>&signature=<signature>&action=<method>&expires=<expires>&output=<output>&...
Step 4: Parse the response
The response from the API platform has the same structure for XML, JSON and PHP formats:
| Name | Type | Description |
|---|---|---|
| requestid | string | Unique ID of the request. |
| requests | integer | Total number of requests made during the last hour (for rate limiting). |
| status | string | Status of the response. Either ok (success), error (failure). |
| content | mixed | Response payload |
Step 5: Handle errors
If the API platform encounters a problem, the response status is then error and the content object is replaced with a simple error object containing the error code and a message explaining what went wrong.
See the complete error codes table.
Here are some examples of error in each output formats: