---
title: "Workspace API — SpireStock REST API"
description: "Read and update workspace settings, branding and configuration, including the public workspace lookup used before sign-in."
source: https://developers.spirestock.com/api-reference/workspace
---

# Workspace API

Read and update workspace settings, branding and configuration, including the public workspace lookup used before sign-in.

Base URL: `https://api.spirestock.com/api/v1`. Every request needs an API key (`X-API-Key`) or a session token (`Authorization: Bearer`); see https://developers.spirestock.com/api-reference/auth.

## Endpoints

- [GET /workspace/config](https://developers.spirestock.com/api-reference/workspace#get-workspace-config)
- [PUT /workspace/config](https://developers.spirestock.com/api-reference/workspace#put-workspace-config)
- [GET /workspace/members](https://developers.spirestock.com/api-reference/workspace#get-workspace-members)

## GET /workspace/config

Retrieve the current workspace configuration including branding, organizational details, and operational settings. Stored credentials (smtp_password, whatsapp_api_token, whatsapp_verify_token, whatsapp_app_secret, firebase_server_key, google_app_key) are never returned; each appears as has_<field>, true when a value is saved.

Access: API key `read` scope; any staff user (reference data).

**Example request**

```bash
curl https://api.spirestock.com/api/v1/workspace/config \
  -H "Authorization: Bearer YOUR_TOKEN"
```

**Example response**

```json
{
  "response_code": 200,
  "data": {
    "config": {
      "id": 1,
      "organization_id": 5,
      "logo": null,
      "page_limit": 20,
      "org_footer_name": "Acme Dairy Pvt. Ltd.",
      "org_address": "12 Industrial Area, Delhi",
      "org_state_name": "State A",
      "org_state_code": "22",
      "org_pan": "AAAAA0000A",
      "org_bank_account_no": "000000000001",
      "org_bank_name": "Sample Bank",
      "org_bank_branch_name": "Main Branch",
      "org_bank_ifsc": "BANK0000001",
      "org_code": "ORG-001",
      "org_latitude": "12.9716000",
      "org_longitude": "77.5946000",
      "gstin": "07AAACA1234A1Z5",
      "cin": "U00000AA2020PTC000001",
      "fssai": "10012345000001",
      "order_timing": "06:00-22:00",
      "user_tracking_time": "60",
      "live_tracking_enabled": true,
      "mark_attendance_time": "6:00 AM",
      "attendance_periphery": null,
      "refresh_time": "300000",
      "battery_percentage": "1",
      "travel_amount": 3.5,
      "contact_number": "+911234567890",
      "primary_color": "#1e40af",
      "secondary_color": "#f59e0b",
      "login_bg_image": null,
      "login_logo": null,
      "login_tagline": null,
      "website_url": null,
      "custom_subdomain": null,
      "smtp_host": null,
      "smtp_port": null,
      "smtp_user": null,
      "has_smtp_password": false,
      "smtp_from": null,
      "smtp_from_name": null,
      "chatbot_enabled": false,
      "chatbot_bot_id": null,
      "chatbot_embed_type": "live_chat",
      "chatbot_widget_position": "right",
      "chatbot_widget_offset_x": 20,
      "chatbot_widget_offset_bottom": 20,
      "chatbot_widget_color": null,
      "chatbot_widget_gradient_start": null,
      "chatbot_widget_gradient_end": null,
      "chatbot_auto_open": false,
      "chatbot_auto_open_delay": 3,
      "chatbot_disabled_urls": null,
      "chatbot_disable_sub_urls": false,
      "whatsapp_enabled": false,
      "whatsapp_phone_number_id": null,
      "whatsapp_business_account_id": null,
      "has_whatsapp_api_token": false,
      "has_whatsapp_verify_token": false,
      "has_whatsapp_app_secret": false,
      "whatsapp_api_version": "v19.0",
      "has_firebase_server_key": false,
      "has_google_app_key": false,
      "is_active": 1,
      "feature_modules": {
        "source": "existing",
        "modules": {
          "hr": true,
          "foc": true,
          "crates": true,
          "wallet": true,
          "batches": true,
          "returns": true,
          "accounts": true,
          "expenses": true,
          "tracking": true,
          "developer": true,
          "logistics": true,
          "incentives": true,
          "credit_risk": true,
          "field_sales": true,
          "gamification": true,
          "subscriptions": true,
          "scheduled_reports": true,
          "sales_intelligence": true
        },
        "decided_at": "2026-10-22T08:12:26.563Z"
      },
      "createdAt": "2026-10-22T02:12:40.631Z",
      "updatedAt": "2026-10-22T08:57:58.618Z"
    },
    "workspace": {
      "id": 21,
      "workspace_id": "ws_abc123",
      "organization_id": 6,
      "slug": "acme-dairy",
      "display_name": "Acme Dairy",
      "domain": null,
      "status": 1,
      "plan": "professional",
      "trial_ends_at": null,
      "trial_notifications_sent": {},
      "billing_read_only": false,
      "read_only_until": null,
      "archived_at": null,
      "archive_restored_at": null,
      "max_users": 500,
      "signup_method": null,
      "signup_ip": null,
      "signup_country": null,
      "signup_country_code": null,
      "signup_region": null,
      "signup_city": null,
      "signup_isp": null,
      "signup_device_type": null,
      "signup_timezone": null,
      "createdAt": "2026-10-22T02:12:40.627Z",
      "updatedAt": "2026-10-22T02:39:01.100Z"
    },
    "platform_chatbot": null
  }
}
```

## PUT /workspace/config

Update workspace configuration. Only admin users can modify workspace settings. Credentials are write-only: send a new value to replace one, leave it out or send it blank to keep the stored value, and send clear_<field>: true to remove it.

Access: API key `write` scope; workspace administrators only.

**Request body**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `logo` | string | no | Logo URL |
| `primary_color` | string | no | Brand primary color hex code |
| `secondary_color` | string | no | Brand secondary color hex code |
| `org_footer_name` | string | no | Organization footer/legal name |
| `org_address` | string | no | Organization address |
| `contact_number` | string | no | Contact phone number |
| `smtp_password` | string | no | Write-only. Blank keeps the stored value; the same applies to whatsapp_api_token, whatsapp_verify_token, whatsapp_app_secret, firebase_server_key and google_app_key |
| `clear_smtp_password` | boolean | no | true removes the stored value; clear_<field> works for each credential field |

**Example request**

```bash
curl -X PUT https://api.spirestock.com/api/v1/workspace/config \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "primary_color": "#2563eb",
    "org_footer_name": "Acme Dairy Co. Pvt. Ltd.",
    "contact_number": "+911234567890"
  }'
```

**Example response**

```json
{
  "response_code": 200,
  "message": "Configuration saved",
  "data": {
    "id": 1,
    "organization_id": 5,
    "logo": null,
    "page_limit": 20,
    "org_footer_name": "Acme Dairy Co. Pvt. Ltd.",
    "org_address": "Plot 1, Industrial Area, Town A",
    "org_state_name": "State A",
    "org_state_code": "22",
    "org_pan": "AAAAA0000A",
    "org_bank_account_no": "000000000001",
    "org_bank_name": "Sample Bank",
    "org_bank_branch_name": "Main Branch",
    "org_bank_ifsc": "BANK0000001",
    "org_code": "ORG-001",
    "org_latitude": "12.9716000",
    "org_longitude": "77.5946000",
    "gstin": "22AAAAA0000A1Z5",
    "cin": "U00000AA2020PTC000001",
    "fssai": "10000000000001",
    "order_timing": "2:00 PM",
    "user_tracking_time": "60",
    "live_tracking_enabled": true,
    "mark_attendance_time": "6:00 AM",
    "attendance_periphery": null,
    "refresh_time": "300000",
    "battery_percentage": "1",
    "travel_amount": 3.5,
    "contact_number": "+911234567890",
    "primary_color": "#2563eb",
    "secondary_color": "#3b82f6",
    "login_bg_image": null,
    "login_logo": null,
    "login_tagline": null,
    "website_url": null,
    "custom_subdomain": null,
    "smtp_host": null,
    "smtp_port": null,
    "smtp_user": null,
    "has_smtp_password": false,
    "smtp_from": null,
    "smtp_from_name": null,
    "chatbot_enabled": false,
    "chatbot_bot_id": null,
    "chatbot_embed_type": "live_chat",
    "chatbot_widget_position": "right",
    "chatbot_widget_offset_x": 20,
    "chatbot_widget_offset_bottom": 20,
    "chatbot_widget_color": null,
    "chatbot_widget_gradient_start": null,
    "chatbot_widget_gradient_end": null,
    "chatbot_auto_open": false,
    "chatbot_auto_open_delay": 3,
    "chatbot_disabled_urls": null,
    "chatbot_disable_sub_urls": false,
    "whatsapp_enabled": false,
    "whatsapp_phone_number_id": null,
    "whatsapp_business_account_id": null,
    "has_whatsapp_api_token": false,
    "has_whatsapp_verify_token": false,
    "has_whatsapp_app_secret": false,
    "whatsapp_api_version": "v19.0",
    "has_firebase_server_key": false,
    "has_google_app_key": false,
    "is_active": 1,
    "feature_modules": {
      "source": "existing",
      "modules": {
        "hr": true,
        "foc": true,
        "crates": true,
        "wallet": true,
        "batches": true,
        "returns": true,
        "accounts": true,
        "expenses": true,
        "tracking": true,
        "developer": true,
        "logistics": true,
        "incentives": true,
        "credit_risk": true,
        "field_sales": true,
        "gamification": true,
        "subscriptions": true,
        "scheduled_reports": true,
        "sales_intelligence": true
      },
      "decided_at": "2026-10-22T08:12:26.563Z"
    },
    "createdAt": "2026-10-22T02:12:40.631Z",
    "updatedAt": "2026-10-22T08:57:58.618Z"
  }
}
```

## GET /workspace/members

Active users of the workspace (staff and customers) with role and last login. It used to return the whole tenant in one response; it is now paged. Sorted by first name, then id.

Access: API key `read` scope; staff need Manage Users (3) — list.

Paged (page and limit): see https://developers.spirestock.com/api-reference#pagination.

**Parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `search` | string | no | Case-insensitive contains on first name, last name, email, role name, SAP id or store name; max 100 characters, % and _ match literally |
| `page` | number | no | Page number; junk or a value below 1 reads as 1 (default 1) |
| `limit` | number | no | Page size, default 50, max 100 (larger values are clamped) (default 50) |

**Example request**

```bash
curl "https://api.spirestock.com/api/v1/workspace/members?page=2&limit=50" \
  -H "X-API-Key: YOUR_API_KEY"
```

**Example response**

```json
{
  "response_code": 200,
  "data": [
    {
      "id": 49227,
      "first_name": ".",
      "last_name": ".",
      "official_email": null,
      "role_id": 398,
      "role_name": "Retailer",
      "last_login": null,
      "created_at": "2024-04-03T03:04:56.000Z"
    }
  ],
  "pagination": {
    "total": 10112,
    "page": 2,
    "limit": 2,
    "total_pages": 5056
  }
}
```
