Skip to main content
Every request to the Factory API requires a Bearer API key. Each key is bound to a single factory, so you never pass a factory ID in your requests.

Create an API key

Generate keys in the Worklayer web app under Develop → API. See Get an API key for the exact steps. Keys start with wrk-, followed by 43 characters:
The key above is an example. Treat real API keys like production credentials: store them on your server and never commit them to source control or expose them in browser code.

Send your key

Pass the key in a single Authorization: Bearer <key> header:
The API returns 401 Unauthorized with a WWW-Authenticate: Bearer header when:
  • The Authorization header is missing, or more than one Authorization header is sent.
  • The header is not formatted as Bearer <key>, or the key format is invalid.
  • The key has been revoked.
  • The key’s factory is no longer available (for example, it was deleted).

Revoke a key

Revoke any key from Develop → API in the Worklayer web app. Revocation takes effect immediately—subsequent requests using that key return 401 Unauthorized.

Permissions and scope

An API key has access to: When you send a message to a Worker using an API key, that Worker executes with the factory owner’s permissions. Only the factory owner can create or revoke API keys. See Who can use a factory.