Workspaces

Register Workspace

POST/v1/workspaces
POST
/v1/workspaces

Register a workspace for bulk connect

Registers the customer's Google Workspace admin email or Microsoft tenantId. Neither runs an OAuth flow here — Google requires domain-wide delegation already granted via the Admin Console; Microsoft requires admin consent already completed for the tenant. The credentials are validated on registration: if delegation/consent is missing or the admin email/tenantId is invalid, the call returns 422 and no workspace is created.

Authorization

X-Api-Key<token>

In: header

Request Body

application/jsonRequired

providerstring

Example: "google"Value in: "google" | "microsoft"

adminEmailstring

Required when provider is "google". The Google Workspace super-admin email. Domain-wide delegation for this domain must already be granted to the TrulyInbox service account in the Google Admin Console before calling this endpoint.

Example: "admin@customerdomain.com"

tenantIdstring

Required when provider is "microsoft". The Azure AD tenant ID for which the partner has already completed Microsoft admin consent for the TrulyInbox app.

Example: "3f2504e0-4f89-11d3-9a0c-0305e82c3301"

Responses

201
201 response
{
  "workspaceId": "aB3xY7Qk",
  "provider": "google",
  "adminEmail": "admin@customerdomain.com",
  "tenantId": "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
  "status": "created"
}

Request

curl -X POST \
  "https://lupus-edge.trulyinbox.com/v1/workspaces" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "provider": "google",
  "adminEmail": "admin@customerdomain.com",
  "tenantId": "3f2504e0-4f89-11d3-9a0c-0305e82c3301"
}'

Response

No response body