Skip to main content
Version: 1.0

Parliament REST API

Run in Postman

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.

CodeDescription
200 OKResource was successfully retrieved or updated.
400 Bad RequestInvalid request, possibly due to missing parameters
401 UnauthorizedMissing or invalid authentication
403 ForbiddenAccess denied
404 Not FoundRequested resource does not exist
500 Server ErrorUnexpected 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 CodeDescription
2000Document does not exist.
3000Access forbidden to document.
3001User 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.

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:

NameDescription
nextThe link relation for the immediate next page of results.
lastThe link relation for the last page of results.
firstThe link relation for the first page of results.
prevThe link relation for the immediate previous page of results.