# API & tool reference

Base URL: https://api.incele.ai. REST uses account bearer keys; MCP uses OAuth tokens at https://api.incele.ai/mcp. Every workspace tool requires a top-level workspaceId. REST uses the workspace path parameter.

## list_products

GET /v1/workspaces/{workspaceId}/products

Required permission: products:read. Target: workspace.

List all products, including inactive products, with pagination, search, and status filters.

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "query": {
      "default": {},
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "number"
          },
          {
            "type": "boolean"
          }
        ]
      }
    },
    "workspaceId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    }
  },
  "required": [
    "query",
    "workspaceId"
  ],
  "additionalProperties": false
}
```

## get_product

GET /v1/workspaces/{workspaceId}/products/{id}

Required permission: products:read. Target: workspace.

Fetch one product owned by this workspace, including inactive products.

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "workspaceId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    }
  },
  "required": [
    "id",
    "workspaceId"
  ],
  "additionalProperties": false
}
```

## create_product

POST /v1/workspaces/{workspaceId}/products

Required permission: products:write. Target: workspace.

Create a product. Data: name, brand, sku, barcode, stock, status (ACTIVE/INACTIVE/DELETED), description, information, imageIds, tagIds, sales. Existing business validation applies.

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 500
        },
        "brand": {
          "type": "string",
          "minLength": 1,
          "maxLength": 300
        },
        "sku": {
          "type": "string",
          "minLength": 1,
          "maxLength": 300
        },
        "barcode": {
          "type": "string",
          "minLength": 1,
          "maxLength": 300
        },
        "stock": {
          "type": "integer",
          "minimum": 0,
          "maximum": 999999
        },
        "status": {
          "type": "string",
          "enum": [
            "ACTIVE",
            "INACTIVE",
            "DELETED"
          ]
        },
        "description": {
          "default": "",
          "type": "string",
          "maxLength": 100000
        },
        "information": {
          "type": "string",
          "maxLength": 500000
        },
        "imageIds": {
          "default": [],
          "maxItems": 100,
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          }
        },
        "tagIds": {
          "default": [],
          "maxItems": 100,
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          }
        },
        "sales": {
          "default": [],
          "maxItems": 100,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1
              },
              "link": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "name",
              "link"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "name",
        "brand",
        "sku",
        "barcode",
        "stock",
        "status",
        "description",
        "information",
        "imageIds",
        "tagIds",
        "sales"
      ],
      "additionalProperties": false
    },
    "workspaceId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    }
  },
  "required": [
    "data",
    "workspaceId"
  ],
  "additionalProperties": false
}
```

## update_product

PUT /v1/workspaces/{workspaceId}/products/{id}

Required permission: products:write. Target: workspace.

Update a product using its current full editable values; read it first. Same data fields as create_product.

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "data": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 500
        },
        "brand": {
          "type": "string",
          "minLength": 1,
          "maxLength": 300
        },
        "sku": {
          "type": "string",
          "minLength": 1,
          "maxLength": 300
        },
        "barcode": {
          "type": "string",
          "minLength": 1,
          "maxLength": 300
        },
        "stock": {
          "type": "integer",
          "minimum": 0,
          "maximum": 999999
        },
        "status": {
          "type": "string",
          "enum": [
            "ACTIVE",
            "INACTIVE",
            "DELETED"
          ]
        },
        "description": {
          "default": "",
          "type": "string",
          "maxLength": 100000
        },
        "information": {
          "type": "string",
          "maxLength": 500000
        },
        "imageIds": {
          "default": [],
          "maxItems": 100,
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          }
        },
        "tagIds": {
          "default": [],
          "maxItems": 100,
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          }
        },
        "sales": {
          "default": [],
          "maxItems": 100,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1
              },
              "link": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "name",
              "link"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "name",
        "brand",
        "sku",
        "barcode",
        "stock",
        "status",
        "description",
        "information",
        "imageIds",
        "tagIds",
        "sales"
      ],
      "additionalProperties": false
    },
    "workspaceId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    }
  },
  "required": [
    "id",
    "data",
    "workspaceId"
  ],
  "additionalProperties": false
}
```

## delete_product

DELETE /v1/workspaces/{workspaceId}/products/{id}

Required permission: products:write. Target: workspace.

Permanently delete a product and its associations.

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "workspaceId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    }
  },
  "required": [
    "id",
    "workspaceId"
  ],
  "additionalProperties": false
}
```

## list_collections

GET /v1/workspaces/{workspaceId}/collections

Required permission: collections:read. Target: workspace.

List collections with pagination and search.

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "query": {
      "default": {},
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "number"
          },
          {
            "type": "boolean"
          }
        ]
      }
    },
    "workspaceId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    }
  },
  "required": [
    "query",
    "workspaceId"
  ],
  "additionalProperties": false
}
```

## create_collection

POST /v1/workspaces/{workspaceId}/collections

Required permission: collections:write. Target: workspace.

Create collection. Data: name, description, tagIds, imageId. Add products with add_collection_product.

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "description": {
          "default": "",
          "type": "string",
          "maxLength": 100000
        },
        "imageId": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 160
            },
            {
              "type": "null"
            }
          ]
        },
        "tagIds": {
          "default": [],
          "maxItems": 100,
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          }
        }
      },
      "required": [
        "name",
        "description",
        "tagIds"
      ],
      "additionalProperties": false
    },
    "workspaceId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    }
  },
  "required": [
    "data",
    "workspaceId"
  ],
  "additionalProperties": false
}
```

## update_collection

PUT /v1/workspaces/{workspaceId}/collections/{id}

Required permission: collections:write. Target: workspace.

Update collection with its full editable values.

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "data": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "description": {
          "default": "",
          "type": "string",
          "maxLength": 100000
        },
        "imageId": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 160
            },
            {
              "type": "null"
            }
          ]
        },
        "tagIds": {
          "default": [],
          "maxItems": 100,
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          }
        }
      },
      "required": [
        "name",
        "description",
        "tagIds"
      ],
      "additionalProperties": false
    },
    "workspaceId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    }
  },
  "required": [
    "id",
    "data",
    "workspaceId"
  ],
  "additionalProperties": false
}
```

## delete_collection

DELETE /v1/workspaces/{workspaceId}/collections/{id}

Required permission: collections:write. Target: workspace.

Permanently delete collection.

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "workspaceId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    }
  },
  "required": [
    "id",
    "workspaceId"
  ],
  "additionalProperties": false
}
```

## list_tags

GET /v1/workspaces/{workspaceId}/tags

Required permission: tags:read. Target: workspace.

List tags with pagination and search.

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "query": {
      "default": {},
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "number"
          },
          {
            "type": "boolean"
          }
        ]
      }
    },
    "workspaceId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    }
  },
  "required": [
    "query",
    "workspaceId"
  ],
  "additionalProperties": false
}
```

## create_tag

POST /v1/workspaces/{workspaceId}/tags

Required permission: tags:write. Target: workspace.

Create tag. Data: name.

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 160
        }
      },
      "required": [
        "name"
      ],
      "additionalProperties": false
    },
    "workspaceId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    }
  },
  "required": [
    "data",
    "workspaceId"
  ],
  "additionalProperties": false
}
```

## update_tag

PUT /v1/workspaces/{workspaceId}/tags/{id}

Required permission: tags:write. Target: workspace.

Update tag with its full editable values.

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "data": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 160
        }
      },
      "required": [
        "name"
      ],
      "additionalProperties": false
    },
    "workspaceId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    }
  },
  "required": [
    "id",
    "data",
    "workspaceId"
  ],
  "additionalProperties": false
}
```

## delete_tag

DELETE /v1/workspaces/{workspaceId}/tags/{id}

Required permission: tags:write. Target: workspace.

Permanently delete tag.

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "workspaceId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    }
  },
  "required": [
    "id",
    "workspaceId"
  ],
  "additionalProperties": false
}
```

## get_collection

GET /v1/workspaces/{workspaceId}/collections/{id}

Required permission: collections:read. Target: workspace.

Fetch one collection including its product and tag associations.

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "workspaceId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    }
  },
  "required": [
    "id",
    "workspaceId"
  ],
  "additionalProperties": false
}
```

## get_tag

GET /v1/workspaces/{workspaceId}/tags/{id}

Required permission: tags:read. Target: workspace.

Fetch one tag.

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "workspaceId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    }
  },
  "required": [
    "id",
    "workspaceId"
  ],
  "additionalProperties": false
}
```

## list_templates

GET /v1/templates

Required permission: website:read. Target: account.

List supported website template keys.

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {},
  "additionalProperties": false
}
```

## list_collection_products

GET /v1/workspaces/{workspaceId}/collections/{id}/products

Required permission: collections:read. Target: workspace.

List products in a collection.

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "query": {
      "default": {},
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "number"
          },
          {
            "type": "boolean"
          }
        ]
      }
    },
    "workspaceId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    }
  },
  "required": [
    "id",
    "query",
    "workspaceId"
  ],
  "additionalProperties": false
}
```

## add_collection_product

POST /v1/workspaces/{workspaceId}/collections/{id}/products/{productId}

Required permission: collections:write. Target: workspace.

add a workspace product in a workspace collection.

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "productId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "workspaceId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    }
  },
  "required": [
    "id",
    "productId",
    "workspaceId"
  ],
  "additionalProperties": false
}
```

## add_product_tag

POST /v1/workspaces/{workspaceId}/products/{id}/tags/{tagId}

Required permission: products:write. Target: workspace.

add a workspace tag on a workspace product.

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "tagId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "workspaceId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    }
  },
  "required": [
    "id",
    "tagId",
    "workspaceId"
  ],
  "additionalProperties": false
}
```

## add_collection_tag

POST /v1/workspaces/{workspaceId}/collections/{id}/tags/{tagId}

Required permission: collections:write. Target: workspace.

add a workspace tag on a workspace collection.

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "tagId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "workspaceId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    }
  },
  "required": [
    "id",
    "tagId",
    "workspaceId"
  ],
  "additionalProperties": false
}
```

## remove_collection_product

DELETE /v1/workspaces/{workspaceId}/collections/{id}/products/{productId}

Required permission: collections:write. Target: workspace.

remove a workspace product in a workspace collection.

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "productId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "workspaceId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    }
  },
  "required": [
    "id",
    "productId",
    "workspaceId"
  ],
  "additionalProperties": false
}
```

## remove_product_tag

DELETE /v1/workspaces/{workspaceId}/products/{id}/tags/{tagId}

Required permission: products:write. Target: workspace.

remove a workspace tag on a workspace product.

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "tagId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "workspaceId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    }
  },
  "required": [
    "id",
    "tagId",
    "workspaceId"
  ],
  "additionalProperties": false
}
```

## remove_collection_tag

DELETE /v1/workspaces/{workspaceId}/collections/{id}/tags/{tagId}

Required permission: collections:write. Target: workspace.

remove a workspace tag on a workspace collection.

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "tagId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "workspaceId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    }
  },
  "required": [
    "id",
    "tagId",
    "workspaceId"
  ],
  "additionalProperties": false
}
```

## list_media

GET /v1/workspaces/{workspaceId}/media

Required permission: media:read. Target: workspace.

List uploaded images with pagination, usage, and search.

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "query": {
      "default": {},
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "number"
          },
          {
            "type": "boolean"
          }
        ]
      }
    },
    "workspaceId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    }
  },
  "required": [
    "query",
    "workspaceId"
  ],
  "additionalProperties": false
}
```

## get_media

GET /v1/workspaces/{workspaceId}/media/{id}

Required permission: media:read. Target: workspace.

Fetch uploaded media metadata.

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "workspaceId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    }
  },
  "required": [
    "id",
    "workspaceId"
  ],
  "additionalProperties": false
}
```

## upload_media

POST /v1/workspaces/{workspaceId}/media

Required permission: media:write. Target: workspace.

Upload an image as base64 (maximum 3 MiB decoded). Returns media id for imageIds fields. REST also supports multipart upload at /v1/media/upload.

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "fileName": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "mimeType": {
      "type": "string",
      "enum": [
        "image/jpeg",
        "image/png",
        "image/webp",
        "image/gif",
        "image/avif"
      ]
    },
    "base64": {
      "type": "string",
      "minLength": 4,
      "maxLength": 4194304
    },
    "workspaceId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    }
  },
  "required": [
    "fileName",
    "mimeType",
    "base64",
    "workspaceId"
  ],
  "additionalProperties": false
}
```

## replace_media

PUT /v1/workspaces/{workspaceId}/media/{id}

Required permission: media:write. Target: workspace.

Replace an uploaded image while retaining its media id.

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "fileName": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "mimeType": {
      "type": "string",
      "enum": [
        "image/jpeg",
        "image/png",
        "image/webp",
        "image/gif",
        "image/avif"
      ]
    },
    "base64": {
      "type": "string",
      "minLength": 4,
      "maxLength": 4194304
    },
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "workspaceId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    }
  },
  "required": [
    "fileName",
    "mimeType",
    "base64",
    "id",
    "workspaceId"
  ],
  "additionalProperties": false
}
```

## delete_media

DELETE /v1/workspaces/{workspaceId}/media/{id}

Required permission: media:write. Target: workspace.

Delete uploaded media and remove its references.

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "workspaceId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    }
  },
  "required": [
    "id",
    "workspaceId"
  ],
  "additionalProperties": false
}
```

## get_workspace

GET /v1/workspaces/{workspaceId}/workspace

Required permission: workspace:read. Target: workspace.

Read the selected workspace profile, business contact information and agent instructions.

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "workspaceId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    }
  },
  "required": [
    "workspaceId"
  ],
  "additionalProperties": false
}
```

## update_workspace

PUT /v1/workspaces/{workspaceId}/workspace

Required permission: workspace:write. Target: workspace.

Update workspace profile fields: name, subDomain, billingEmail, billingPhone, billingGsmCountryCode, isVisible and mainAgentPrompt. Billing email changes require an existing verification code; subdomain validation/cooldowns apply. Ownership, wallet and access policy are not delegated.

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 2,
          "maxLength": 80
        },
        "subDomain": {
          "type": "string",
          "minLength": 3,
          "maxLength": 32,
          "pattern": "^(?!-)[a-z0-9-]+(?<!-)$"
        },
        "billingEmail": {
          "type": "string",
          "format": "email",
          "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
        },
        "billingEmailOtpCode": {
          "type": "string",
          "pattern": "^\\d{6}$"
        },
        "billingPhone": {
          "type": "string",
          "maxLength": 40
        },
        "billingGsmCountryCode": {
          "type": "string"
        },
        "isVisible": {
          "default": true,
          "type": "boolean"
        },
        "mainAgentPrompt": {
          "default": "",
          "type": "string",
          "maxLength": 6000
        }
      },
      "additionalProperties": false
    },
    "workspaceId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    }
  },
  "required": [
    "data",
    "workspaceId"
  ],
  "additionalProperties": false
}
```

## get_website

GET /v1/workspaces/{workspaceId}/website/{templateKey}

Required permission: website:read. Target: workspace.

Read editable website content, theme, assets, translations, template layout and its JSON schema. Read this before updating.

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "templateKey": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "workspaceId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    }
  },
  "required": [
    "templateKey",
    "workspaceId"
  ],
  "additionalProperties": false
}
```

## update_website

PUT /v1/workspaces/{workspaceId}/website/{templateKey}

Required permission: website:write. Target: workspace.

Update editable website configuration. Use the editable object and editorSchema returned by get_website; readonly meta/template fields are excluded. Partial website updates are supported. Existing template validation applies.

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "templateKey": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "data": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    },
    "workspaceId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    }
  },
  "required": [
    "templateKey",
    "data",
    "workspaceId"
  ],
  "additionalProperties": false
}
```

## get_account

GET /v1/account

Required permission: account:read. Target: account.

Read your account profile and workspace creation limit.

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {},
  "additionalProperties": false
}
```

## update_account

PUT /v1/account

Required permission: account:write. Target: account.

Update your profile. Read it first. Email changes require an email verification code obtained in the dashboard. Roles, verification and workspace limits cannot be changed.

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 120
        },
        "email": {
          "type": "string",
          "format": "email",
          "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
        },
        "emailOtpCode": {
          "type": "string",
          "pattern": "^\\d{6}$"
        },
        "phone": {
          "type": "string",
          "maxLength": 40
        },
        "language": {
          "default": "",
          "type": "string",
          "maxLength": 24
        }
      },
      "required": [
        "name",
        "email",
        "phone",
        "language"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "data"
  ],
  "additionalProperties": false
}
```

## list_workspaces

GET /v1/workspaces

Required permission: workspaces:read. Target: account.

List your active owned workspaces and creation limit. Use a workspace ID returned here for subsequent workspace tools.

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "query": {
      "default": {
        "page": 1,
        "pageSize": 25
      },
      "type": "object",
      "properties": {
        "page": {
          "default": 1,
          "type": "integer",
          "minimum": 1,
          "maximum": 1000000
        },
        "pageSize": {
          "default": 25,
          "type": "integer",
          "minimum": 1,
          "maximum": 100
        }
      },
      "required": [
        "page",
        "pageSize"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "query"
  ],
  "additionalProperties": false
}
```

## create_workspace

POST /v1/workspaces

Required permission: workspaces:write. Target: account.

Create a workspace for the account with zero credits, subject to the administrator-configured ownership limit. Choose a template from list_templates. Customized websites require a phone number and notify the team.

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 2,
          "maxLength": 80
        },
        "subDomain": {
          "type": "string",
          "minLength": 3,
          "maxLength": 32,
          "pattern": "^(?!-)[a-z0-9-]+(?<!-)$"
        },
        "templateKey": {
          "type": "string",
          "enum": [
            "beauty-v1",
            "textile-v1",
            "customized"
          ]
        },
        "phone": {
          "type": "string",
          "maxLength": 40
        },
        "isVisible": {
          "default": true,
          "type": "boolean"
        },
        "mainAgentPrompt": {
          "default": "",
          "type": "string",
          "maxLength": 6000
        }
      },
      "required": [
        "name",
        "subDomain",
        "templateKey",
        "isVisible",
        "mainAgentPrompt"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "data"
  ],
  "additionalProperties": false
}
```
