CalryOTA Docs
Workspace

Update workspace

Updates workspace details and returns the updated workspace

PATCH
/api/v1/workspace

Authorization

x-calry-api-key
x-calry-api-key<token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X PATCH "https://example.com/api/v1/workspace" \  -H "Content-Type: application/json" \  -d '{}'
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "My Workspace",
  "slug": "my-workspace",
  "defaultCurrency": "USD",
  "defaultDiscountPercentage": 10,
  "createdAt": "2025-01-01T00:00:00.000Z",
  "updatedAt": "2025-01-02T00:00:00.000Z"
}
{
  "timestamp": "2025-03-05T11:45:49.631Z",
  "path": "<URL_PATH>",
  "message": "Authentication failed",
  "details": []
}
{
  "message": "Validation Failed",
  "details": [
    {
      "property": "defaultCurrency",
      "messages": [
        "Invalid currency code"
      ]
    }
  ],
  "timestamp": "2025-03-05T11:45:49.631Z",
  "path": "/api/v1/workspace"
}