{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dpf-it-com/json-schema/dpf-it-com-create-workspace-response-schema.json",
  "title": "CreateWorkspaceResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dpf-it-com-workspaces-api-openapi.yml#/components/schemas/CreateWorkspaceResponse",
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean"
    },
    "data": {
      "type": "object",
      "properties": {
        "workspaceId": {
          "type": "string",
          "format": "uuid"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "createdBy": {
          "type": "string",
          "format": "uuid"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "userPermission": {
          "type": "string",
          "enum": [
            "full",
            "read-only"
          ],
          "description": "The caller's permission on the new workspace (always `full`). Same field name returned by get-workspace and get-workspaces."
        },
        "permission": {
          "type": "string",
          "enum": [
            "full",
            "read-only"
          ],
          "description": "Deprecated alias for `userPermission`, kept for older clients."
        },
        "permissions": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "userId": {
                "type": "string",
                "format": "uuid"
              },
              "email": {
                "type": "string",
                "format": "email"
              },
              "firstName": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "User's first name (null for placeholder/unregistered users)"
              },
              "lastName": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "User's last name (null for placeholder/unregistered users)"
              },
              "permission": {
                "type": "string",
                "enum": [
                  "full",
                  "read-only"
                ]
              }
            }
          },
          "description": "Array of user permissions for this workspace"
        }
      }
    }
  }
}