The FusionCMS API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.
Authentication
At this time, the FusionCMS API uses personal access tokens to authenticate requests. You can view and manage your API keys on your account page after enabling personal access tokens in the control panel. Once a token has been generated, it must be included with every request, and should be delivered in a HTTP header:
Authorization: Bearer <Personal Access Token>
Errors
FusionCMS' API uses conventional HTTP response codes to indicate the success or failure of an API request. In general, codes in the 2xx
range indicate success, codes in the 4xx
range indicate an error that failed given the information provided (e.g., a required parameter was omitted, etc.), and codes in the 5xx
range indicate an error at the server level.
All error responses will be returned within an error array of your request. Error responses will include the following information:
- Status Code
- Message
Here's an example of a returned 404 response:
{
"error": [
"message": "Category not found.",
"status_code": 404
]
}
Pagination
Requests that return multiple items will be paginated to 30 items by default. You can specify further pages with the ?page parameter. You may also set a custom page size up to 100 with the ?per_page parameter. Page numbering is 1-based, where omitting the ?page parameter will return the first page.