Update an email workspace

​

Updates an existing email workspace. Only the fields you send are changed.

  • For Google Workspace workspaces, pass a replacement service account key via file_key_json and/or a new name.
  • For Microsoft 365 / Outlook workspaces, rotate any of the app credentials — outlook_client_id, outlook_client_secret, outlook_client_secret_value, outlook_tenant_id, outlook_client_secret_expires_at — and/or the name. Rotating the client id, tenant id or secret value invalidates the cached access token, which is re-minted from the new credentials the next time the workspace is used.

Path Parameters

  • The ID of the workspace to update.

Body·

required
application/json

Update an email workspace

  • New human-readable name for the workspace.

  • Replacement Google service account key JSON. Only applicable to Google workspaces.

  • Replacement Outlook app client ID. Only applicable to Outlook workspaces.

  • Replacement Outlook app client secret identifier. Only applicable to Outlook workspaces.

  • Replacement Outlook client secret expiration date, as DD/MM/YYYY or YYYY-MM-DD. Only applicable to Outlook workspaces.

  • Replacement Outlook app client secret value. Only applicable to Outlook workspaces.

  • Replacement Outlook tenant ID. Only applicable to Outlook workspaces.

Responses

  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/v1/email_workspaces/{id}
curl http://api.mailreach.co/api/v1/email_workspaces/42 \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: YOUR_SECRET_TOKEN' \
  --data '{
  "name": "Acme Sales",
  "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"
}