Workspace API

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

2 endpoints. Every request needs an API key or a session token — see Authentication. To send one of these calls from the browser, use the interactive reference.

GEThttps://api.spirestock.com/api/v1/workspace/config

Retrieve the current workspace configuration including branding, organizational details, and operational settings.

Example request

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

Example response

{
  "response_code": 200,
  "data": {
    "config": {
      "id": 1,
      "organization_id": 5,
      "logo": "https://media.cdn.spirestock.com/orgs/acme-dairy/logo.png",
      "primary_color": "#1e40af",
      "secondary_color": "#f59e0b",
      "org_footer_name": "Acme Dairy Pvt. Ltd.",
      "org_address": "12 Industrial Area, Delhi",
      "gstin": "07AAACA1234A1Z5",
      "fssai": "10012345000001",
      "contact_number": "+911234567890",
      "order_timing": "06:00-22:00",
      "page_limit": 20,
      "chatbot_enabled": false
    },
    "workspace": {
      "workspace_id": "ws_abc123",
      "slug": "acme-dairy",
      "display_name": "Acme Dairy",
      "domain": null,
      "plan": "professional",
      "status": 1,
      "max_users": 500
    }
  }
}
PUThttps://api.spirestock.com/api/v1/workspace/config

Update workspace configuration. Only admin users can modify workspace settings.

Request body

  • logo (string)Logo URL
  • primary_color (string)Brand primary color hex code
  • secondary_color (string)Brand secondary color hex code
  • org_footer_name (string)Organization footer/legal name
  • org_address (string)Organization address
  • contact_number (string)Contact phone number

Example request

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

{
  "response_code": 200,
  "message": "Config updated",
  "data": {
    "id": 1,
    "organization_id": 5,
    "primary_color": "#2563eb",
    "org_footer_name": "Acme Dairy Co. Pvt. Ltd.",
    "contact_number": "+911234567890"
  }
}