Roles, personal tokens and machine tokens
Every member of a workspace has one role in it. The role decides what they can see and change there, in the app and through tokens alike. A member can hold different roles in different workspaces.
The four roles
Section titled “The four roles”Roles are ranked, and each includes everything the roles below it may do: Viewer < Editor < Admin < Owner.
Viewer sees the workspace: its projects, mocks, request logs, insights, members and subscription. A Viewer can create personal tokens and leave the workspace, and change nothing else.
Editor works on the contents of projects:
- create projects, and rename them or change their description or subdomain;
- create, edit, delete and restore mocks, and manage scenarios;
- activate chaos profiles, send test webhooks and replay deliveries;
- promote captures to mocks and delete request logs;
- apply a project’s configuration document.
Admin runs the workspace:
- delete projects, and change a project’s settings: logging, templating, its gateway mode and upstream;
- define chaos profiles, webhooks and alert rules, and see webhook signing secrets;
- generate mocks with AI;
- invite members, change their roles and remove them;
- create and revoke machine tokens, and revoke other members’ personal tokens;
- add custom domains and change workspace settings;
- read the workspace’s activity trail.
Owner has every right in the workspace. Only an Owner can manage billing, archive and restore projects, make someone an Owner, demote or remove another Owner, transfer ownership, choose the billing contact and delete the workspace. Each of these needs the Owner signed in to MockHub, because a token never holds the Owner role.
A workspace has at least one Owner, and can have as many as its plan allows (see the limits page); a personal workspace always has exactly one. Owners are equals: none outranks another, and any of them can demote or remove the others. Every Owner is emailed when the Owners change, except the one who changed them. See Add another Owner.
One Owner is the workspace’s billing contact: the payment provider’s invoices and receipts, and MockHub’s emails about plan changes and the Pro trial, go to their address. Being the billing contact gives no right beyond being an Owner. In a workspace with one Owner, that Owner is the billing contact.
An Admin can give other people only roles below their own: Viewer or Editor. Only an Owner can make someone an Admin or an Owner.
A hidden button is never the only protection. Every action is checked by MockHub when it is performed, whatever the app shows.
Personal tokens
Section titled “Personal tokens”A personal token lets a program act as you. It starts with mh_sk_, and every member, Viewers included, can create one under Settings → Tokens.
- It has a role of its own, Viewer, Editor or Admin, chosen when you create it and never above yours. It acts with the lower of that role and your current one: if an Admin lowers your role, the token is lowered with it, and if they raise it, the token stays where it was.
- It works only in the workspace it was created in.
- It cannot change your account: your profile, password, sign-in methods, invitations, new workspaces and new tokens need you signed in to MockHub.
- It is deleted when you leave the workspace or are removed from it, and rejoining does not bring it back.
- It expires after the period you choose when creating it, and cannot be extended.
- The token is shown once, when you create it. MockHub stores only a fingerprint of it.
- You can always revoke your own tokens. An Admin can revoke anyone’s.
Because it can act as you, treat a personal token like your password.
Machine tokens
Section titled “Machine tokens”A machine token belongs to the workspace, not to a person. It starts with mh_mt_ and suits shared assistants, pipelines and anything that must keep working when people come and go. Machine tokens are available on Free, Pro and Team, and the plan sets how many a workspace can have.
- An Admin creates it and gives it a role of its own: Viewer, Editor or Admin.
- Reaches can wall it off to a single project; it then sees nothing else in the workspace.
- It works with projects, mocks, their configuration, their request logs and their data store only. It cannot create projects, and everything else in the workspace is refused.
- It keeps working when the person who created it leaves the workspace or deletes their account. It is deleted, with every other token they created, if their email address was never verified and a GitHub or Google account with that address then signs in for the first time. See Create a machine token.
Choosing between them
Section titled “Choosing between them”| You want a program to… | Use |
|---|---|
| Work for you, with your permissions | A personal token |
| Look at everything and change nothing | A machine token with the Viewer role |
| Change mocks in one project and nothing else | A machine token that Reaches it |
| Keep working for a team when people leave | A machine token |
| Create projects | A personal token of an Editor or higher |
Limits
Section titled “Limits”- A token cannot be narrower than a role. There is no “may create mocks but not delete them”. Combine a role, a project restriction and, for an AI assistant, its own permission settings.
- Nothing protects one Owner from another. Any Owner can demote or remove the others, or delete the workspace; the emails to every other Owner, and support’s 14 days to recover a deleted workspace, are how a mistaken or hostile change gets noticed.
- The last Owner cannot leave or be removed, and the billing contact stays an Owner until another Owner is made the contact.
- Nobody is invited as an Owner. Invite them with another role, then make them an Owner.
- The billing contact is always one of the Owners. There is no contact for invoices only, such as a finance team, and no second invoice address.