x-workspace-key header.| Role | Notes |
|---|---|
OWNER | Created automatically for the account that creates the workspace. Not listed as a member and cannot be assigned. |
ADMIN | Can be invited and set as a role. May use x-workspace-key for the workspace. |
EDITOR | Can be invited and set as a role. |
VIEWER | Can be invited and set as a role. |
x-workspace-keyx-workspace-key with a workspace ID to run a request in that workspace. Without it, requests run in the key owner's primary workspace. The caller must be an OWNER or ADMIN of that workspace; otherwise the API returns 403, and an unknown workspace ID returns 404. A call that charges money bills the owner of the workspace: the key owner, or the workspace owner when the header points at a workspace owned by someone else.global flag that spans every workspace the key owner belongs to, whatever the role. List Workspaces (List Workspaces) shows the workspaces you can use and your role in each.x-workspace-key is returned as currentWorkspace and left out of workspaces, so a page can hold fewer items than limit.billingDetails to save them in the same call, but note that the workspace is not rolled back if saving them fails. You can also save them later with Add Billing Details.email, workspaceId and role (ADMIN, EDITOR or VIEWER). An invitation email is sent and the invitation expires after 48 hours. It returns 409 if the person is already a member or a non-expired pending invitation exists; an expired one is replaced. It returns 404 if the workspace does not exist or is not owned by the account.status is PENDING, ACCEPTED, REJECTED, REVOKED or EXPIRED. All matching invitations come back in one response; page and limit only affect the pagination fields.id to change a role. The workspace field names each member's workspace.memberId as a query parameter and role in the body (ADMIN, EDITOR or VIEWER). OWNER is rejected with 422. The change takes effect immediately and a workspace invitations webhook event with action role_changed is emitted.email. A pending invitation is checked first and marked REVOKED; if there is none, the person is removed as a member. Only one record is affected per call, so call again to remove further invitations or memberships for the same email. The member loses access immediately.totalSearchedCount on the members list is counted for the workspace selected by x-workspace-key, so it can be lower than the number of members returned across workspaces.