Context
Companies, locations, and the ids filled in for you.
A company API client belongs to exactly one company, so working across
several means holding credentials for each. Run pxb auth once per company,
then:
pxb company list
pxb company use acme
Within a company, many endpoints require a locationId — customers,
products, orders, appointments, gallery, hours. Pin one and it is filled in
automatically, in query strings and request bodies alike:
pxb location list
pxb location use headquarters
pxb customer list -q limit=5
# 200 GET customers
# using locationId=Headquarters (loc_abc123)
Anything you pass explicitly wins, and --no-context turns it off for a
single call. Each profile keeps its own pinned location, so switching company
never carries the wrong one across.
pxb location clear unpins it again.
Personal clients
A personal client — created in personal settings, or through the agent
handshake at /agents — acts as its owner rather than as one company's
integration. Authenticating with one works the same way, but it acts in the
account's default company (or its only one). The CLI has no company switch for
these yet: to act in a specific company, call the API directly and send the
X-Company-Id header.
In your terminal: pxb help context