An API client setup for agencies with many clients

An agency works on five clients' APIs at once. Each client has its own staging server, its own keys, and sometimes its own developers who want to see the requests. And at the end of a project, the client expects to get their API work back.

A setup that keeps all of that straight comes down to one rule: one workspace per client.

A workspace per client

A workspace is a permission boundary: whoever is in it sees its collections and environments. Put each client in its own:

WorkspaceMembers
Agency internalyour team, your own tools and APIs
Client: Acmethe Acme project team; Acme's developers as guests
Client: Globexthe Globex project team

Now a developer who only works on Globex never sees Acme's production key, and a client never sees another client's name in a collection list. See one workspace or many for the general rule.

The same environment names everywhere

Use Local, Staging and Production in every client's environments, even when the client calls them something else. Your team switches between clients several times a day; the same names mean the same muscle memory, and the same CI scripts with a different workspace and collection.

Write the client's own names in the environment's description, or in the collection's Overview: "Staging = Acme's uat2".

Client developers as guests

On the Team plan, invite the client's developers as guests: they get Editor or Viewer in that client's workspace only, see nothing else of your organization, and their access can expire on the project's end date. See guest access for contractors.

When a contract is extended, extend the access. When it ends, it ends on its own.

Credentials

  • Put the client's keys in that workspace's environments as secret variables, never in request headers or collection variables.
  • Prefer keys the client issued to your agency, not a personal key of someone on their side. When the project ends, the client revokes one key.
  • If the client keeps secrets in their own vault, the CLI can read them at run time. See keep API secrets out of collections.

CI for each client

Each client's pipeline gets its own token. On the Team plan, an organization API token per client project doesn't belong to a person and can be revoked on its own. The pipeline runs that client's collection and nothing else:

Terminal
requestarium run-collection "Acme Orders API" --workspace "Client: Acme" --env Staging

Hand-over at the end

Clients usually want three things: the requests, the tests, and the docs.

  • Git. If the client has a repository, sync the collection to it. The collection then lives in their repo as files, with history, and they can keep using it with any tool that reads them.
  • Export. Export each collection as Requestarium JSON with its environment groups, or as Postman Collection v2.1 or OpenAPI 3 if they use other tools.
  • Docs. Shared collection docs or a Confluence page for people who won't open an API client.

Then remove the workspace's guests, and delete the workspace when the warranty period is over.