Authentication

Get access & a key

To call the /v2 API you need an account and an API key. Sign up in the web app, then create a key there. The application's own API keys documentation has the current steps. The key is scoped to your account (not to an individual person) and is what every /v2 request authenticates with.

The API key

Send the key on every request as the X-Api-Key header:

curl https://api.loadoptimizer.ai/v2/jobs/01975cba-67b9-7b7c-a2f1-3d29e4a01c44 \
  -H "X-Api-Key: ck_live_..."
Fact Detail
Header X-Api-Key, with a key that starts with ck_live_
Where you create it In the web app. See its API keys documentation for where. The full key is shown once, immediately after creation; after that only a hint remains (ck_live_… plus the last 4 characters). Creating and revoking keys is available on every plan, so you can build and wire up your integration first. Until your plan includes API access, calls made with the key are refused with the 403 below
Missing, invalid or revoked 401, with an empty body
Valid, but the plan has no API access 403 problem+json with code: "customer_api_not_entitled". Its detail names where to upgrade
Valid, but without the permission 403 problem+json with code: "permission_denied". Its detail names the permission. See Permissions
Revoking Takes effect within a minute
Rotating Create a new key, then revoke the old one. If your plan only allows one active key at a time, you must revoke first, then create: creating while already at the limit is rejected
Scope of a read Every job read is account-scoped. A job id that belongs to another account returns 404 job_not_found, never 403; so does a job deleted after its expiresAt

A key belongs to the account, not to a person: what it does is recorded as the key (see Users, API keys and who did what).

Key management itself (creating, listing and revoking keys) is a web-app action, not an API call: you sign in to the web app to do it, and a customer API key cannot invoke it.

Permissions

Every operation needs a permission, such as jobs.submit to submit a job or sku_libraries.read to read your SKU library. The contract (loadoptimizer-openapi.yaml) names it in each operation's security; where it names two, either one will do. Permissions come in groups of read and write per resource, and write includes read:

Group Permissions
jobs:readjobs.read
jobs:writejobs.read, jobs.validate, jobs.submit, jobs.cancel, jobs.rename, jobs.instructions.create, shares.revoke, shares.read
shares:manageshares.create, shares.revoke, shares.read
saved_loads:readsaved_loads.read
saved_loads:writesaved_loads.read, saved_loads.create, saved_loads.release
carrier_libraries:readcarrier_libraries.read
carrier_libraries:writecarrier_libraries.read, carrier_libraries.entries.create, carrier_libraries.entries.update, carrier_libraries.entries.delete
sku_libraries:readsku_libraries.read
sku_libraries:writesku_libraries.read, sku_libraries.entries.create, sku_libraries.entries.update, sku_libraries.entries.delete
cargo_classes:readcargo_classes.read
cargo_classes:writecargo_classes.read, cargo_classes.create, cargo_classes.update, cargo_classes.delete
stacking_rule_sets:readstacking_rule_sets.read
stacking_rule_sets:writestacking_rule_sets.read, stacking_rule_sets.create, stacking_rule_sets.update, stacking_rule_sets.delete

Deleting a cargo class also needs stacking_rule_sets.update, because it removes the class's rules from your rule sets.

A key created in the web app has every permission listed here. A request the key has no permission for is refused with 403 permission_denied, and detail names the permission. That check runs after the plan's customer-API access, so a key on a plan without it still hears customer_api_not_entitled first.

For libraries the permission depends on the kind: carrier and SKU libraries have their own. A library of a kind your key cannot read does not exist for it: you get 404 library_not_found, and GET /v2/libraries leaves it out. A key that can read neither kind gets 403 permission_denied from the operation's own check instead. A job line that references a library entry needs the read permission of that kind as well. The same goes for changing a library: a write permission on a library needs the read permission of the same kind, and without it the library does not exist for the key. The library permissions govern the library itself: a job keeps the values it was run with, and those stay readable with jobs.read, in its request and its result.

Errors

Status Meaning
401 Missing, invalid or revoked key. Empty body.
403 The key is valid, but the account's plan doesn't include the customer API (customer_api_not_entitled, with the upgrade link in detail), or the key lacks the permission (permission_denied).
404 Unknown job id, a job that belongs to a different account, or a job deleted after its expiresAt. They look identical: job_not_found.

See Errors & troubleshooting for the full code registry.

Account limits

The limits on job size, throughput, request rate and saved loads are on Limits & quotas.