Fleet API authentication, limits and errors

Authenticate to the Fleet public API, its limit of 600 requests a minute, its error codes and the full reference.

Reference documents

Document

Address

Use

Interactive reference

https://app.emdashfleet.com/api/v1/docs

Every operation, with its parameters and answers.

OpenAPI document

https://app.emdashfleet.com/api/v1/openapi.json

OpenAPI 3.2.1, for a code generator or a request tool.

Base address

https://app.emdashfleet.com/api/v1

The start of every operation's address.

Public plans

https://app.emdashfleet.com/api/v1/public/plans

GET returns the code, name and limits of each public plan, never a price. It needs no API token.

Authentication

Rule

Detail

Header

Send Authorization: Bearer <token> on every request.

Token format

ef_ followed by 40 characters. Fleet shows the full token once, when you create it, and keeps only a hash and a hint.

Who creates one

An Owner, an Admin or a Developer, in the API Tokens tab. See Create and revoke API tokens.

Expiry

30, 90 or 365 days, chosen at creation. The default is 90 days. Every token expires.

What a token may do

Only what both its own permissions and its creator's current role allow. It stops working when its creator is suspended or removed.

Which workspaces

Only the workspaces listed on the token, and only the account that owns the token.

What a token cannot do

Create an account, or take an action that asks you to sign in again. Use the dashboard for these.

Revoking

Revoke a token in the API Tokens tab. Fleet refuses it at once.

Rate limit

Rule

Detail

Limit

600 requests a minute for each token.

Counter

The response carries X-RateLimit-Remaining, the number of requests left in the current minute.

Over the limit

The 601st request in a minute gets 429, the code rate_limited and X-RateLimit-Remaining: 0. Retry in the next minute.

Errors

Status

Code

When

400

invalid_request

The request body or a parameter is not valid.

401

invalid_token

Not a token, or the token is revoked or expired, or its creator is no longer an active member. The answer carries WWW-Authenticate: Bearer error="invalid_token".

403

forbidden

The token does not hold the permission the operation needs.

403

session_required

The operation names no account of the token, so only a signed-in session can call it.

404

not_found

The item does not exist, or it belongs to another account.

409

account_pending_deletion

The account awaits deletion, so Fleet refuses any operation that changes something. The answer carries deletionDueAt.

429

rate_limited

The token went over 600 requests in a minute.

Versioning

Rule

Detail

Path

Every operation is under /api/v1. No other version path is served.

Compatibility

The beta makes no compatibility promise. Any change, even an addition, ships in /api/v1.

Notice

Fleet announces each change in the dashboard 14 days before it ships.

Report a problem with this page