Workspaces
Workspaces, roles and members
Create and rename workspaces, invite members, change roles, remove members, and what each role can do today.
A workspace is where a team and its plan live. Every account starts with one personal workspace in which it is the owner, and can create more. You see only the workspaces you belong to. A workspace you are not a member of answers 404, exactly like one that does not exist.
Create and rename
POST /workspaceswith aname(1 to 120 characters) creates a workspace and makes you its owner.GET /workspaceslists your workspaces with your role in each.GET /workspaces/{id}returns one.PATCH /workspaces/{id}renames a workspace. Only the owner may; anyone else gets 403.
Invite a member
Owners and admins invite people from the Members page, or with POST /workspaces/{workspaceId}/invitations: an email and a role. The person does not need an account yet. They open the link, sign in or register with that same address, and accept. An invitation lasts 7 days and stays on the pending list until it is accepted, revoked or replaced.
- The invitation email is queued when you create it. PerkHost does not confirm delivery, so if it does not arrive, resend it. When the server cannot send email, the response says
not_configuredand nothing is sent. - For the developer and billing roles the response also carries the link, once. Anyone who signs in as the invited address can use it.
- Owner and admin invitations are delivered by email only: the response has no link.
- Resending creates a new link and the earlier one stops working.
DELETE /workspaces/{workspaceId}/invitations/{invitationId}revokes an invitation. - Only an owner can invite an owner or an admin. An address that already belongs to a member, or already has a pending invitation, gets 409.
- An invitation opened while signed in as a different address is refused with 403, and an expired, revoked or unknown one answers 404.
Invitations are the only way into a workspace: nobody is added without opening the link and accepting, and the answer to an invitation is the same whether or not the address has an account. The number of members is limited by the workspace plan, and pending invitations count towards it. When the limit is reached the route answers 402 with the code plan_required. Read the limit from the subscription, not from this page. See "Plans and billing".
Change a role or remove a member
PATCH /workspaces/{workspaceId}/members/{userId}with aroleofowner,admin,developerorbillingchanges a member's role.DELETE /workspaces/{workspaceId}/members/{userId}removes a member and answers 204. The removed member's API tokens in this workspace stop working and the invitations they sent are dropped.- An owner can change or remove anyone. An admin can change or remove developers and billing members, and gets 403 on an owner or an admin.
- A workspace always keeps one owner. Demoting or removing the last owner gets 409: make another member an owner first.
- In the dashboard, a role change is staged until you save it, and removing a member asks you to type their email.
Roles
The table lists the roles you can give a member and what each may do on the routes that exist today. A dash means the route is refused with 403.
| Action | Owner | Admin | Developer | Billing |
|---|---|---|---|---|
| List members | Yes | Yes | Yes | - |
| Invite or add a developer or billing member, and resend or revoke a developer or billing invitation | Yes | Yes | - | - |
| Resend or revoke an owner or admin invitation | Yes | - | - | - |
| Invite an owner or an admin, or add an admin | Yes | - | - | - |
| Change the role of, or remove, a developer or billing member | Yes | Yes | - | - |
| Change the role of, or remove, an admin or owner | Yes | - | - | - |
| Rename the workspace | Yes | - | - | - |
| Read the subscription, open checkout and the billing portal | Yes | Yes | - | Yes |
| Read and change app environment variables | Yes | Yes | Yes | - |
| Receive the workspace event stream (a client member can too, once client accounts exist) | Yes | Yes | Yes | - |
| Manage your own API tokens | Yes | Yes | Yes | Yes |
| List and revoke other members' API tokens | Yes | Yes | - | - |
A fifth role, client, exists for the end customers of an agency. Client accounts are not available yet, so you cannot give anyone that role.