Meili FMS API (2.0.0)

Authentication

JWT (Json Web Token) authentication

JWT is the most common authentication method you will use. These are used in our frontend application.

Also these are the only tokens that can be used inter-domain in the same deployment

Authorization: Bearer [YOUR TOKEN]

User Persistent token authentication

Persistent tokens are similar to user tokens, but they will not be invalidated after a time period or when logging out.

Authorization: API-Key [YOUR TOKEN]

Token authentication

Every user also has a long-lived token. It stays valid until the user logs out, which replaces it.

Authorization: Token [YOUR TOKEN]

SDK Token authentication

SDK tokens are used for authenticating sdk based URLs and can be namespaced to prevent from too much access. They are only accepted on /sdk/ routes, not on the /api/ routes documented here.

Authorization: SDK-Key [YOUR TOKEN]

Required Headers

Content-Type
Must be application/json for requests with a JSON body.

User-Agent (required)
Every API request must include a valid User-Agent header identifying the client
(e.g. Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:122.0) Gecko/20100101 Firefox/122.0).
Requests without a User-Agent header will be rejected.

Errors

Most errors return detail, a single message, and errors, the same messages in a structured form:

{
  "errors": { "title": ["This field is required."] },
  "detail": "title: This field is required"
}

errors is an object keyed by field for validation errors, an array for errors that are not tied to a field, and a string for errors such as 401, 403 and 404. It can also be left out.

A few routes return {"error": "..."} instead, as noted in their responses.

Two more status codes can apply to many routes:

  • 402: the feature needs a premium plan, or a resource limit has been reached.
  • 423: license validation failed.

Pagination and sorting

Paginated lists return count, page, next, previous and results. Use page and size to move through them, or no_pagination=true to get every result as a plain array. Not every list is paginated, and default page sizes differ, so check the parameters of each endpoint.

Where an endpoint supports it, ordering=field sorts the results. Prefix the field with - for descending order.

Request IDs

Every response includes an X-Request-ID header. You can send your own value (1 to 64 letters, digits or hyphens), otherwise one is generated. Quote it when reporting a problem.

2nd generation (V2)

You will occasionally see that some sections have a V2 suffix, which means that those endpoints are second generation ones. The main difference between the two other than section specific changes is the possibility to expand related properties that are displayed as related keys (in most cases those are UUIDs).

To expand a property simply add expand query parameter with the desired key to expand.

Our API supports multiple expand keywords in the URL.

Example:

https://app.meilirobots.com/api/v2/teams/your-team/tasks/

{
  ...
  "user": "b2a4038eaa6341d7a3cbe7c29635b1e3",
  ...
}

https://app.meilirobots.com/api/v2/teams/your-team/tasks/?expand=user

{
  ...
  "user": {
    "uuid": "b2a4038eaa6341d7a3cbe7c29635b1e3",
    ...
  }
  ...
}
Overview
Servers
https://app.meilirobots.com/
https://<your-deployment>.meilirobots.com/