Register a DWD workspace
Register a Google Workspace or Microsoft 365 tenant
Google: supply adminEmail, a super-admin mailbox the service account impersonates for Directory discovery. Microsoft: supply the tenantId and state returned by the admin-consent redirect. Registering only makes the tenant's mailboxes discoverable - nothing is connected until .../sync runs.
Path Parameters
"google" | "microsoft"Required when provider=google. A Google Workspace super-admin mailbox the service account impersonates for Directory discovery.
Required when provider=microsoft. Tenant id from the admin-consent redirect.
Required when provider=microsoft. Opaque state echoed back from the admin-consent redirect; binds the consent to the requesting caller. Obtain the consent URL from GET .../provider-workspaces/microsoft/consent-url.
Response Body
curl -X POST "https://lynx-api.trulyinbox.com/v2/workspaces/0/provider-workspaces" \ -H "Content-Type: application/json" \ -d '{ "adminEmail": "admin@acme.com", "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" }'{
"data": {
"id": 0,
"provider": "google",
"adminEmail": "string",
"tenantId": {},
"status": "active",
"lastSyncedAt": "2019-08-24T14:15:22Z",
"domains": [
{
"domain": "string",
"mailboxCount": 0
}
]
},
"meta": {
"request_id": "req_2f1c…",
"timestamp": "2019-08-24T14:15:22Z"
}
}{
"error": {
"code": "invalid_request",
"message": "string",
"details": {},
"retry_after": 34
},
"meta": {
"request_id": "req_2f1c…",
"timestamp": "2019-08-24T14:15:22Z"
}
}{
"error": {
"code": "invalid_request",
"message": "string",
"details": {},
"retry_after": 34
},
"meta": {
"request_id": "req_2f1c…",
"timestamp": "2019-08-24T14:15:22Z"
}
}