- Client Implementations / API Wrappers
- Rate Limiting
- Errors and HTTP status codes
- Request payloads to MOCO must be sent as valid JSON with a mandatory
Content-Type: application/json-header. Responses are also sent as JSON.
- All requests have to be authenticated with a user-specific key
- Example responses showcase the happy case, i.e. usually the
- Collections are usually paginated
- Zapier triggers are not triggered for API requests
updated_atare sent for all entities in UTC, as ISO8601 format.
- For synchronization almost all resources can be filtered by
updated_afterpassing a time in UTC, as ISO8601 format.
- MOCO does not support any client-libraries at the moment. However, there are currently the following unofficial clients available, which you can use at your risk: Python Client
All the entities exposed via the API can be found in their respective sections
Here’s a list of API client implementations, not maintained by us. Feel free to open up a PR to point to your implementation so others can re-use it.
By default all requests are scoped to the authenticated user. Some resources cannot be written in behalf of other users like
User Presences. This reflects the behaviour in the UI. But you can login as another user provided that the authenticated user has permission to Staff. To achieve the same behaviour in the API, one can set the following x-header:
X-IMPERSONATE-USER-ID=123 (user id to act in behalf of)
You can expect to be able to fire 15 requests within a time frame of 15 seconds. If you exceed this limit, the server responds with
429 Too Many Requests.
Responses are paginated with a common default of 100 entries per page. In the HTTP response header, the current page, the entries per page and the number of total entries is reported. There is also a link header to links to the consecutive page.
- X-Page – 3
- X-Per-Page – 100
- X-Total – 415
- Link –
If there is not Link header with
rel="next", the current page is the last page.
The MOCO-API is mostly conformant with the general HTTP status codes.
Here are the most comment errors you will see:
- 401 Unauthorized - Check the error message in the response body
- 403 Forbidden - Check your Authentication or your MOCO user permission
- 404 Not Found - Check that resource exists (maybe it was deleted in the meantime)
- 422 Unprocessable Entity - Check the provided error message in the response body
- 429 Too Many Requests - Check Rate Limiting
Sorting is controlled by the
sort_by query parameter. Its value is the field name that should be sorted, followed by an optional sorting order (
desc, default is