Bypass user email verification with the APC API

The examples on this page show common ways to use the APC API — they’re not a complete API reference. For the full, interactive API documentation for your installation, including every available query, mutation, and type, go to https://houston.<your-base-domain>/v1, and click on the Docs tab. See Develop and test APC API queries for more on using the built-in GraphQL explorer.

If you don’t need certain users to verify their email before they join a Workspace, you can configure a bypass when you add them to a Workspace. This can be useful for minimizing friction when programmatically inviting many users to your platform.

To run this mutation, you need:

  • Workspace Admin permissions
  • A Workspace ID. To retrieve this value, run astro workspace list. Alternatively, open a Workspace in the Astro Private Cloud UI and copy the value after /w/ in your Workspace URL (for example https://app.basedomain/w/<workspace-id>).
  • The user’s email address.
  • The user’s desired role in the Workspace (WORKSPACE_VIEWER, WORKSPACE_EDITOR, WORKSPACE_ADMIN).

The following example mutation can be run to add a user to a Workspace as a WORKSPACE_VIEWER.

1mutation workspaceAddUser(
2 $workspaceUuid: Uuid = "<your-workspace-uuid>"
3 $email: String! = "<user-email-address>"
4 $role: Role! = WORKSPACE_VIEWER
5 $bypassInvite: Boolean! = true
6 ) {
7 workspaceAddUser(
8 workspaceUuid: $workspaceUuid
9 email: $email
10 role: $role
11 bypassInvite: $bypassInvite
12 ) {
13 id
14 }
15 }