Parliament REST API
Introduction
The Hootsuite Amplify API is built on REST principles and uses JSON as a data interchange format.
All URLs referenced in this document use the following base: https://platform.hootsuite.com/amplify/. The Amplify API is served over HTTPS to ensure data privacy.
API Access
If you need help getting access to the API, please visit Hootsuite's documentation.
User Permissions
Ensure the user you authenticate with has Content Admin permissions both enabled within Amplify, otherwise you might get 403 Forbidden responses for some of the requests. You can set this permission level within User Management in Amplify dashboard app in Hootsuite.
Response Format
All responses are returned in JSON. A successful response is wrapped in a top level data envelope which is an object or array depending on whether a single item or a collection is returned. If a single item is returned the data field will be an object.
Successful single item response:
{
"data": {}
}
Successful collection response:
{
"data": [{}, {}, {}]
}
Response Codes
The Amplify API uses HTTP status codes to indicate the status of your request.
| Code | Description |
|---|---|
| 200 OK | Resource was successfully retrieved or updated. |
| 400 Bad Request | Invalid request, possibly due to missing parameters |
| 401 Unauthorized | Missing or invalid authentication |
| 403 Forbidden | Access denied |
| 404 Not Found | Requested resource does not exist |
| 500 Server Error | Unexpected error occurred on the server |
Error Handling
If the response was unsuccessful, an errors array will be returned along with a generic message:
{
"message": "",
"errors": [{
"uuid": "1a4d81f1-39b0-4734-ad76-46f093895e5a",
"code": "2000",
"message": "Message does not exist."
}]
}
uuid is a unique ID for purposes of tracing the error, while code and message map to the error codes below.
Error Codes
Here is a list of error codes and descriptions returned by our API:
| Error Code | Description |
|---|---|
| 2000 | Document does not exist. |
| 3000 | Access forbidden to document. |
| 3001 | User does not have the permission for requested action. |
Authentication
For information about Authentication, visit our official documentation.
Pagination
Requests that return multiple items will be paginated to 30 items by default. You can specify further pages with the page parameter and number of items per page with per_page parameter. Maximum allowed per page is 100.
curl "https://platform.hootsuite.com/amplify/v1/me/messages?page=2&per_page=100"
Note that page numbering starts with 1 and omitting the page parameter will return the first page.
Link Header
Every valid request to a resource endpoint is responded with a Link header which includes pagination information. You should form calls with these Link header values instead of constructing your own URLs:
Link: <https://platform.hootsuite.com/amplify/v1/me/messages?page=3&per_page=30>; rel="next", <https://platform.hootsuite.com/amplify/v1/me/messages?page=9&per_page=30>; rel="last"
Note that this example includes a line break for readability, the actual response doesn't.
This Link response header contains one or more Hypermedia link relations, some of which may require expansion as URI templates.
The possible rel values are:
| Name | Description |
|---|---|
| next | The link relation for the immediate next page of results. |
| last | The link relation for the last page of results. |
| first | The link relation for the first page of results. |
| prev | The link relation for the immediate previous page of results. |
Terms of Service
https://hootsuite.com/legal/dev-api-terms