Create an email workspace

Creates a new email workspace used to batch-connect OAuth accounts.

  • For Google Workspace (provider: google), upload the service account JSON key via file_key_json.
  • For Microsoft 365 / Outlook (provider: outlook), pass the application's client ID, client secret value and tenant ID.

See the Google Workspace setup guide and the Outlook batch connect guide.

Body·
required
application/json

Create an email workspace

  • name
    Type: string
    required

    Human-readable name shown in the UI.

  • file_key_json
    Type: null

    Google service account key JSON. Required when provider is google.

  • outlook_client_id
    Type: string

    Outlook app client ID. Required when provider is outlook.

  • outlook_client_secret
    Type: string

    Outlook app client secret identifier. Required when provider is outlook.

  • outlook_client_secret_expires_at
    Type: string

    Outlook client secret expiration date in DD/MM/YYYY format.

  • outlook_client_secret_value
    Type: string

    Outlook app client secret value. Required when provider is outlook.

  • outlook_tenant_id
    Type: string

    Outlook tenant ID. Required when provider is outlook.

  • provider
    Type: stringenum

    Workspace provider. One of google (default) or outlook.

    values
    • google
    • outlook
Responses
  • application/json
  • application/json
  • application/json
Request Example for post/v1/email_workspaces
curl http://api.mailreach.co/api/v1/email_workspaces \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: YOUR_SECRET_TOKEN' \
  --data '{
  "name": "Acme Sales",
  "provider": "google",
  "file_key_json": null,
  "outlook_client_id": "82c5c74d-6ba1-42b1-9c1d-91f8a7b51b2a",
  "outlook_client_secret": "",
  "outlook_client_secret_value": "",
  "outlook_tenant_id": "1f9e4b2c-3f67-4f8e-9b3e-0f0f6a9b1e2d",
  "outlook_client_secret_expires_at": "29/01/2028"
}'
{
  "id": 42,
  "name": "Acme Sales",
  "created_at": "2026-02-14T09:30:00.000Z",
  "provider": "google",
  "outlook_tenant_id": "1f9e4b2c-3f67-4f8e-9b3e-0f0f6a9b1e2d",
  "outlook_client_id": "82c5c74d-6ba1-42b1-9c1d-91f8a7b51b2a",
  "outlook_client_secret_expires_at": "2028-01-29T00:00:00.000Z"
}