# Builder

> Manage your workspace Brand Kit, create and edit AI template remixes, and publish hosted landing pages or custom domains.

## Read workspace Brand Kit

`GET https://shaw.ai/api/builder/brand-kit`

Read the organization's Brand Kit (brand name, domain, tagline, logo, colors, heading/body fonts, and voice tone).

```json
{
  "openapi": "3.1.0",
  "info": {
    "description": "Shaw's API for people and agents. Everything you can do in the app, you can do here with an API key or an OAuth token, within the scopes you grant it.\n\nA scope only narrows a credential: every request still runs as the person who owns it, with their role in the organization.\n\nRoutes under /api/skills, /api/harness-profiles, /api/data-sync, /api/templates, /api/seo are reachable with the matching read or write scope (GET reads, everything else writes) even where no typed operation is listed here.\n\nWebhook events: approval.decided, session.completed, schedule.run.started, schedule.run.failed.\n\nMCP: https://shaw.ai/mcp (also https://shaw.ai/portal/mcp).",
    "title": "Shaw API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://shaw.ai"
    }
  ],
  "paths": {
    "/api/builder/brand-kit": {
      "get": {
        "description": "Read the organization's Brand Kit (brand name, domain, tagline, logo, colors, heading/body fonts, and voice tone).",
        "operationId": "get_brand_kit",
        "parameters": [
          {
            "$ref": "#/components/parameters/Tenant"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Ok"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "pages:read"
            ]
          }
        ],
        "summary": "Read workspace Brand Kit",
        "tags": [
          "Builder"
        ],
        "x-mcp-tool": "get_brand_kit",
        "x-requires-confirmation": false,
        "x-required-scope": "pages:read"
      }
    }
  },
  "components": {
    "parameters": {
      "Tenant": {
        "description": "The organization to act for (an id from `GET /api/me`). Defaults to the key's pinned organization, else your first organization. You must be a member of it.",
        "in": "header",
        "name": "X-Shaw-Tenant",
        "required": false,
        "schema": {
          "type": "string"
        }
      }
    },
    "responses": {
      "Error": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "error": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "The request was refused or failed; `error` is a stable code."
      },
      "Forbidden": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "error": {
                  "enum": [
                    "insufficient_scope",
                    "bearer_not_allowed",
                    "forbidden_workspace",
                    "tenant_pinned"
                  ],
                  "type": "string"
                },
                "message": {
                  "type": "string"
                },
                "scope": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "The credential lacks the scope, can't call this route, or can't act for the organization."
      },
      "Ok": {
        "content": {
          "application/json": {
            "schema": {}
          }
        },
        "description": "Success. The body is JSON."
      },
      "Unauthorized": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "error": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "The credential is missing, invalid, expired or revoked.",
        "headers": {
          "WWW-Authenticate": {
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "apiKey": {
        "bearerFormat": "sk_…",
        "description": "A personal API key created in Settings → Developers. Send it as `Authorization: Bearer sk_…`.",
        "scheme": "bearer",
        "type": "http"
      },
      "oauth2": {
        "description": "OAuth 2.1 authorization code with S256 PKCE. Clients can register themselves (RFC 7591).",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://shaw.ai/api/auth/oauth2/authorize",
            "refreshUrl": "https://shaw.ai/api/auth/oauth2/token",
            "scopes": {
              "org:read": "See which organizations you belong to, their profile and runtime status.",
              "org:write": "Create organizations and rename the ones you administer.",
              "sessions:read": "Read chat sessions, their messages and artifacts.",
              "sessions:write": "Start, rename, fork, compact and archive chat sessions and send messages.",
              "approvals:review": "Approve or reject the actions a session is waiting on.",
              "files:read": "Read shared files and documents.",
              "files:write": "Create, edit and delete shared files and documents.",
              "memory:read": "Read the knowledge base and shared memory.",
              "memory:write": "Add, edit, restore and delete knowledge entries.",
              "schedules:read": "Read scheduled automations.",
              "schedules:write": "Change and run scheduled automations.",
              "campaigns:read": "Read synced advertising, sales and Meta/Google campaign data.",
              "campaigns:write": "Run syncs and publish or change ad campaigns.",
              "reports:read": "Read SEO reports and research.",
              "reports:write": "Run and change SEO reports and research.",
              "pages:read": "Read template catalog metadata, code size/credits, Brand Kit, remixes, hosted pages, custom domains, and Email Studio drafts.",
              "pages:write": "Update Brand Kit, create or edit remixes, publish hosted pages or domains, and edit or publish Email Studio drafts.",
              "connectors:read": "See which apps and providers are connected, without any credentials.",
              "connectors:manage": "Disconnect apps, forget saved provider keys and manage MCP servers. Connecting an app or entering a credential needs you signed in.",
              "members:read": "See who belongs to an organization and their roles.",
              "members:manage": "Invite people and change or remove members.",
              "settings:read": "Read workspace settings, tool policy, skills and models.",
              "settings:write": "Change workspace settings, tool policy and skills.",
              "webhooks:manage": "Create, list and delete outbound webhooks.",
              "events:read": "Read the activity feed and webhook delivery log.",
              "tools:read": "Use read-only integration tools (Shopify, Klaviyo and others) the organization has connected.",
              "tools:write": "Use integration tools that change data in connected apps. Writes still follow the organization's tool policy."
            },
            "tokenUrl": "https://shaw.ai/api/auth/oauth2/token"
          }
        },
        "type": "oauth2"
      }
    },
    "schemas": {}
  }
}
```

## Update workspace Brand Kit

`PUT https://shaw.ai/api/builder/brand-kit`

```json
{
  "openapi": "3.1.0",
  "info": {
    "description": "Shaw's API for people and agents. Everything you can do in the app, you can do here with an API key or an OAuth token, within the scopes you grant it.\n\nA scope only narrows a credential: every request still runs as the person who owns it, with their role in the organization.\n\nRoutes under /api/skills, /api/harness-profiles, /api/data-sync, /api/templates, /api/seo are reachable with the matching read or write scope (GET reads, everything else writes) even where no typed operation is listed here.\n\nWebhook events: approval.decided, session.completed, schedule.run.started, schedule.run.failed.\n\nMCP: https://shaw.ai/mcp (also https://shaw.ai/portal/mcp).",
    "title": "Shaw API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://shaw.ai"
    }
  ],
  "paths": {
    "/api/builder/brand-kit": {
      "put": {
        "operationId": "update_brand_kit",
        "parameters": [
          {
            "$ref": "#/components/parameters/Tenant"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "description": "Complete Brand Kit object (`brandName`, `domain`, `tagline`, `logoUrl`, `primaryColor`, `accentColor`, `backgroundColor`, `textColor`, `headingFont`, `bodyFont`, `tone`).",
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Ok"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "pages:write"
            ]
          }
        ],
        "summary": "Update workspace Brand Kit",
        "tags": [
          "Builder"
        ],
        "x-mcp-tool": "update_brand_kit",
        "x-requires-confirmation": false,
        "x-required-scope": "pages:write"
      }
    }
  },
  "components": {
    "parameters": {
      "Tenant": {
        "description": "The organization to act for (an id from `GET /api/me`). Defaults to the key's pinned organization, else your first organization. You must be a member of it.",
        "in": "header",
        "name": "X-Shaw-Tenant",
        "required": false,
        "schema": {
          "type": "string"
        }
      }
    },
    "responses": {
      "Error": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "error": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "The request was refused or failed; `error` is a stable code."
      },
      "Forbidden": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "error": {
                  "enum": [
                    "insufficient_scope",
                    "bearer_not_allowed",
                    "forbidden_workspace",
                    "tenant_pinned"
                  ],
                  "type": "string"
                },
                "message": {
                  "type": "string"
                },
                "scope": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "The credential lacks the scope, can't call this route, or can't act for the organization."
      },
      "Ok": {
        "content": {
          "application/json": {
            "schema": {}
          }
        },
        "description": "Success. The body is JSON."
      },
      "Unauthorized": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "error": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "The credential is missing, invalid, expired or revoked.",
        "headers": {
          "WWW-Authenticate": {
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "apiKey": {
        "bearerFormat": "sk_…",
        "description": "A personal API key created in Settings → Developers. Send it as `Authorization: Bearer sk_…`.",
        "scheme": "bearer",
        "type": "http"
      },
      "oauth2": {
        "description": "OAuth 2.1 authorization code with S256 PKCE. Clients can register themselves (RFC 7591).",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://shaw.ai/api/auth/oauth2/authorize",
            "refreshUrl": "https://shaw.ai/api/auth/oauth2/token",
            "scopes": {
              "org:read": "See which organizations you belong to, their profile and runtime status.",
              "org:write": "Create organizations and rename the ones you administer.",
              "sessions:read": "Read chat sessions, their messages and artifacts.",
              "sessions:write": "Start, rename, fork, compact and archive chat sessions and send messages.",
              "approvals:review": "Approve or reject the actions a session is waiting on.",
              "files:read": "Read shared files and documents.",
              "files:write": "Create, edit and delete shared files and documents.",
              "memory:read": "Read the knowledge base and shared memory.",
              "memory:write": "Add, edit, restore and delete knowledge entries.",
              "schedules:read": "Read scheduled automations.",
              "schedules:write": "Change and run scheduled automations.",
              "campaigns:read": "Read synced advertising, sales and Meta/Google campaign data.",
              "campaigns:write": "Run syncs and publish or change ad campaigns.",
              "reports:read": "Read SEO reports and research.",
              "reports:write": "Run and change SEO reports and research.",
              "pages:read": "Read template catalog metadata, code size/credits, Brand Kit, remixes, hosted pages, custom domains, and Email Studio drafts.",
              "pages:write": "Update Brand Kit, create or edit remixes, publish hosted pages or domains, and edit or publish Email Studio drafts.",
              "connectors:read": "See which apps and providers are connected, without any credentials.",
              "connectors:manage": "Disconnect apps, forget saved provider keys and manage MCP servers. Connecting an app or entering a credential needs you signed in.",
              "members:read": "See who belongs to an organization and their roles.",
              "members:manage": "Invite people and change or remove members.",
              "settings:read": "Read workspace settings, tool policy, skills and models.",
              "settings:write": "Change workspace settings, tool policy and skills.",
              "webhooks:manage": "Create, list and delete outbound webhooks.",
              "events:read": "Read the activity feed and webhook delivery log.",
              "tools:read": "Use read-only integration tools (Shopify, Klaviyo and others) the organization has connected.",
              "tools:write": "Use integration tools that change data in connected apps. Writes still follow the organization's tool policy."
            },
            "tokenUrl": "https://shaw.ai/api/auth/oauth2/token"
          }
        },
        "type": "oauth2"
      }
    },
    "schemas": {}
  }
}
```

## Import Brand Kit from website or Shopify

`POST https://shaw.ai/api/builder/brand-kit/import`

```json
{
  "openapi": "3.1.0",
  "info": {
    "description": "Shaw's API for people and agents. Everything you can do in the app, you can do here with an API key or an OAuth token, within the scopes you grant it.\n\nA scope only narrows a credential: every request still runs as the person who owns it, with their role in the organization.\n\nRoutes under /api/skills, /api/harness-profiles, /api/data-sync, /api/templates, /api/seo are reachable with the matching read or write scope (GET reads, everything else writes) even where no typed operation is listed here.\n\nWebhook events: approval.decided, session.completed, schedule.run.started, schedule.run.failed.\n\nMCP: https://shaw.ai/mcp (also https://shaw.ai/portal/mcp).",
    "title": "Shaw API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://shaw.ai"
    }
  ],
  "paths": {
    "/api/builder/brand-kit/import": {
      "post": {
        "operationId": "import_brand_kit",
        "parameters": [
          {
            "$ref": "#/components/parameters/Tenant"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "save": {
                    "description": "Set true to persist imported values to the Brand Kit.",
                    "type": "boolean"
                  },
                  "source": {
                    "description": "Import from a public website URL or connected Shopify store.",
                    "type": "string",
                    "enum": [
                      "url",
                      "shopify"
                    ]
                  },
                  "url": {
                    "description": "Public `https://` URL or domain when `source` is `url`.",
                    "type": "string"
                  }
                },
                "required": [
                  "source"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Ok"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "pages:write"
            ]
          }
        ],
        "summary": "Import Brand Kit from website or Shopify",
        "tags": [
          "Builder"
        ],
        "x-mcp-tool": "import_brand_kit",
        "x-requires-confirmation": false,
        "x-required-scope": "pages:write"
      }
    }
  },
  "components": {
    "parameters": {
      "Tenant": {
        "description": "The organization to act for (an id from `GET /api/me`). Defaults to the key's pinned organization, else your first organization. You must be a member of it.",
        "in": "header",
        "name": "X-Shaw-Tenant",
        "required": false,
        "schema": {
          "type": "string"
        }
      }
    },
    "responses": {
      "Error": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "error": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "The request was refused or failed; `error` is a stable code."
      },
      "Forbidden": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "error": {
                  "enum": [
                    "insufficient_scope",
                    "bearer_not_allowed",
                    "forbidden_workspace",
                    "tenant_pinned"
                  ],
                  "type": "string"
                },
                "message": {
                  "type": "string"
                },
                "scope": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "The credential lacks the scope, can't call this route, or can't act for the organization."
      },
      "Ok": {
        "content": {
          "application/json": {
            "schema": {}
          }
        },
        "description": "Success. The body is JSON."
      },
      "Unauthorized": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "error": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "The credential is missing, invalid, expired or revoked.",
        "headers": {
          "WWW-Authenticate": {
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "apiKey": {
        "bearerFormat": "sk_…",
        "description": "A personal API key created in Settings → Developers. Send it as `Authorization: Bearer sk_…`.",
        "scheme": "bearer",
        "type": "http"
      },
      "oauth2": {
        "description": "OAuth 2.1 authorization code with S256 PKCE. Clients can register themselves (RFC 7591).",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://shaw.ai/api/auth/oauth2/authorize",
            "refreshUrl": "https://shaw.ai/api/auth/oauth2/token",
            "scopes": {
              "org:read": "See which organizations you belong to, their profile and runtime status.",
              "org:write": "Create organizations and rename the ones you administer.",
              "sessions:read": "Read chat sessions, their messages and artifacts.",
              "sessions:write": "Start, rename, fork, compact and archive chat sessions and send messages.",
              "approvals:review": "Approve or reject the actions a session is waiting on.",
              "files:read": "Read shared files and documents.",
              "files:write": "Create, edit and delete shared files and documents.",
              "memory:read": "Read the knowledge base and shared memory.",
              "memory:write": "Add, edit, restore and delete knowledge entries.",
              "schedules:read": "Read scheduled automations.",
              "schedules:write": "Change and run scheduled automations.",
              "campaigns:read": "Read synced advertising, sales and Meta/Google campaign data.",
              "campaigns:write": "Run syncs and publish or change ad campaigns.",
              "reports:read": "Read SEO reports and research.",
              "reports:write": "Run and change SEO reports and research.",
              "pages:read": "Read template catalog metadata, code size/credits, Brand Kit, remixes, hosted pages, custom domains, and Email Studio drafts.",
              "pages:write": "Update Brand Kit, create or edit remixes, publish hosted pages or domains, and edit or publish Email Studio drafts.",
              "connectors:read": "See which apps and providers are connected, without any credentials.",
              "connectors:manage": "Disconnect apps, forget saved provider keys and manage MCP servers. Connecting an app or entering a credential needs you signed in.",
              "members:read": "See who belongs to an organization and their roles.",
              "members:manage": "Invite people and change or remove members.",
              "settings:read": "Read workspace settings, tool policy, skills and models.",
              "settings:write": "Change workspace settings, tool policy and skills.",
              "webhooks:manage": "Create, list and delete outbound webhooks.",
              "events:read": "Read the activity feed and webhook delivery log.",
              "tools:read": "Use read-only integration tools (Shopify, Klaviyo and others) the organization has connected.",
              "tools:write": "Use integration tools that change data in connected apps. Writes still follow the organization's tool policy."
            },
            "tokenUrl": "https://shaw.ai/api/auth/oauth2/token"
          }
        },
        "type": "oauth2"
      }
    },
    "schemas": {}
  }
}
```

## List your template remixes

`GET https://shaw.ai/api/templates/remixes/history`

List recent AI remixes created by your account along with your daily remix quota.

```json
{
  "openapi": "3.1.0",
  "info": {
    "description": "Shaw's API for people and agents. Everything you can do in the app, you can do here with an API key or an OAuth token, within the scopes you grant it.\n\nA scope only narrows a credential: every request still runs as the person who owns it, with their role in the organization.\n\nRoutes under /api/skills, /api/harness-profiles, /api/data-sync, /api/templates, /api/seo are reachable with the matching read or write scope (GET reads, everything else writes) even where no typed operation is listed here.\n\nWebhook events: approval.decided, session.completed, schedule.run.started, schedule.run.failed.\n\nMCP: https://shaw.ai/mcp (also https://shaw.ai/portal/mcp).",
    "title": "Shaw API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://shaw.ai"
    }
  ],
  "paths": {
    "/api/templates/remixes/history": {
      "get": {
        "description": "List recent AI remixes created by your account along with your daily remix quota.",
        "operationId": "list_remixes",
        "parameters": [
          {
            "$ref": "#/components/parameters/Tenant"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Ok"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "pages:read"
            ]
          }
        ],
        "summary": "List your template remixes",
        "tags": [
          "Builder"
        ],
        "x-mcp-tool": "list_remixes",
        "x-requires-confirmation": false,
        "x-required-scope": "pages:read"
      }
    }
  },
  "components": {
    "parameters": {
      "Tenant": {
        "description": "The organization to act for (an id from `GET /api/me`). Defaults to the key's pinned organization, else your first organization. You must be a member of it.",
        "in": "header",
        "name": "X-Shaw-Tenant",
        "required": false,
        "schema": {
          "type": "string"
        }
      }
    },
    "responses": {
      "Error": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "error": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "The request was refused or failed; `error` is a stable code."
      },
      "Forbidden": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "error": {
                  "enum": [
                    "insufficient_scope",
                    "bearer_not_allowed",
                    "forbidden_workspace",
                    "tenant_pinned"
                  ],
                  "type": "string"
                },
                "message": {
                  "type": "string"
                },
                "scope": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "The credential lacks the scope, can't call this route, or can't act for the organization."
      },
      "Ok": {
        "content": {
          "application/json": {
            "schema": {}
          }
        },
        "description": "Success. The body is JSON."
      },
      "Unauthorized": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "error": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "The credential is missing, invalid, expired or revoked.",
        "headers": {
          "WWW-Authenticate": {
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "apiKey": {
        "bearerFormat": "sk_…",
        "description": "A personal API key created in Settings → Developers. Send it as `Authorization: Bearer sk_…`.",
        "scheme": "bearer",
        "type": "http"
      },
      "oauth2": {
        "description": "OAuth 2.1 authorization code with S256 PKCE. Clients can register themselves (RFC 7591).",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://shaw.ai/api/auth/oauth2/authorize",
            "refreshUrl": "https://shaw.ai/api/auth/oauth2/token",
            "scopes": {
              "org:read": "See which organizations you belong to, their profile and runtime status.",
              "org:write": "Create organizations and rename the ones you administer.",
              "sessions:read": "Read chat sessions, their messages and artifacts.",
              "sessions:write": "Start, rename, fork, compact and archive chat sessions and send messages.",
              "approvals:review": "Approve or reject the actions a session is waiting on.",
              "files:read": "Read shared files and documents.",
              "files:write": "Create, edit and delete shared files and documents.",
              "memory:read": "Read the knowledge base and shared memory.",
              "memory:write": "Add, edit, restore and delete knowledge entries.",
              "schedules:read": "Read scheduled automations.",
              "schedules:write": "Change and run scheduled automations.",
              "campaigns:read": "Read synced advertising, sales and Meta/Google campaign data.",
              "campaigns:write": "Run syncs and publish or change ad campaigns.",
              "reports:read": "Read SEO reports and research.",
              "reports:write": "Run and change SEO reports and research.",
              "pages:read": "Read template catalog metadata, code size/credits, Brand Kit, remixes, hosted pages, custom domains, and Email Studio drafts.",
              "pages:write": "Update Brand Kit, create or edit remixes, publish hosted pages or domains, and edit or publish Email Studio drafts.",
              "connectors:read": "See which apps and providers are connected, without any credentials.",
              "connectors:manage": "Disconnect apps, forget saved provider keys and manage MCP servers. Connecting an app or entering a credential needs you signed in.",
              "members:read": "See who belongs to an organization and their roles.",
              "members:manage": "Invite people and change or remove members.",
              "settings:read": "Read workspace settings, tool policy, skills and models.",
              "settings:write": "Change workspace settings, tool policy and skills.",
              "webhooks:manage": "Create, list and delete outbound webhooks.",
              "events:read": "Read the activity feed and webhook delivery log.",
              "tools:read": "Use read-only integration tools (Shopify, Klaviyo and others) the organization has connected.",
              "tools:write": "Use integration tools that change data in connected apps. Writes still follow the organization's tool policy."
            },
            "tokenUrl": "https://shaw.ai/api/auth/oauth2/token"
          }
        },
        "type": "oauth2"
      }
    },
    "schemas": {}
  }
}
```

## Create a brand remix of a template

`POST https://shaw.ai/api/templates/remixes`

Create a brand-adapted AI remix of a template page. Spends LOC-based credits on first use of the template (returns 402 `You need more credits` if unaffordable) and counts toward daily remix limits.

```json
{
  "openapi": "3.1.0",
  "info": {
    "description": "Shaw's API for people and agents. Everything you can do in the app, you can do here with an API key or an OAuth token, within the scopes you grant it.\n\nA scope only narrows a credential: every request still runs as the person who owns it, with their role in the organization.\n\nRoutes under /api/skills, /api/harness-profiles, /api/data-sync, /api/templates, /api/seo are reachable with the matching read or write scope (GET reads, everything else writes) even where no typed operation is listed here.\n\nWebhook events: approval.decided, session.completed, schedule.run.started, schedule.run.failed.\n\nMCP: https://shaw.ai/mcp (also https://shaw.ai/portal/mcp).",
    "title": "Shaw API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://shaw.ai"
    }
  ],
  "paths": {
    "/api/templates/remixes": {
      "post": {
        "description": "Create a brand-adapted AI remix of a template page. Spends LOC-based credits on first use of the template (returns 402 `You need more credits` if unaffordable) and counts toward daily remix limits.",
        "operationId": "create_remix",
        "parameters": [
          {
            "$ref": "#/components/parameters/Tenant"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "imageModel": {
                    "description": "Optional image model id.",
                    "type": "string"
                  },
                  "keep": {
                    "description": "Aspects to preserve from the original: `layout`, `colors`, `images`.",
                    "items": {},
                    "type": "array"
                  },
                  "notes": {
                    "description": "Additional copy, section, or Brand Kit instructions.",
                    "type": "string"
                  },
                  "path": {
                    "description": "Page path to remix (defaults to `/`).",
                    "type": "string"
                  },
                  "template": {
                    "description": "Template id (`tpl_...`) or slug to remix.",
                    "type": "string"
                  },
                  "version": {
                    "description": "Optional template version id.",
                    "type": "string"
                  },
                  "yourBrand": {
                    "description": "Brand name or domain this remix is for.",
                    "type": "string"
                  }
                },
                "required": [
                  "template",
                  "yourBrand"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Ok"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "pages:write"
            ]
          }
        ],
        "summary": "Create a brand remix of a template",
        "tags": [
          "Builder"
        ],
        "x-mcp-tool": "create_remix",
        "x-requires-confirmation": true,
        "x-required-scope": "pages:write"
      }
    }
  },
  "components": {
    "parameters": {
      "Tenant": {
        "description": "The organization to act for (an id from `GET /api/me`). Defaults to the key's pinned organization, else your first organization. You must be a member of it.",
        "in": "header",
        "name": "X-Shaw-Tenant",
        "required": false,
        "schema": {
          "type": "string"
        }
      }
    },
    "responses": {
      "Error": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "error": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "The request was refused or failed; `error` is a stable code."
      },
      "Forbidden": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "error": {
                  "enum": [
                    "insufficient_scope",
                    "bearer_not_allowed",
                    "forbidden_workspace",
                    "tenant_pinned"
                  ],
                  "type": "string"
                },
                "message": {
                  "type": "string"
                },
                "scope": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "The credential lacks the scope, can't call this route, or can't act for the organization."
      },
      "Ok": {
        "content": {
          "application/json": {
            "schema": {}
          }
        },
        "description": "Success. The body is JSON."
      },
      "Unauthorized": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "error": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "The credential is missing, invalid, expired or revoked.",
        "headers": {
          "WWW-Authenticate": {
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "apiKey": {
        "bearerFormat": "sk_…",
        "description": "A personal API key created in Settings → Developers. Send it as `Authorization: Bearer sk_…`.",
        "scheme": "bearer",
        "type": "http"
      },
      "oauth2": {
        "description": "OAuth 2.1 authorization code with S256 PKCE. Clients can register themselves (RFC 7591).",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://shaw.ai/api/auth/oauth2/authorize",
            "refreshUrl": "https://shaw.ai/api/auth/oauth2/token",
            "scopes": {
              "org:read": "See which organizations you belong to, their profile and runtime status.",
              "org:write": "Create organizations and rename the ones you administer.",
              "sessions:read": "Read chat sessions, their messages and artifacts.",
              "sessions:write": "Start, rename, fork, compact and archive chat sessions and send messages.",
              "approvals:review": "Approve or reject the actions a session is waiting on.",
              "files:read": "Read shared files and documents.",
              "files:write": "Create, edit and delete shared files and documents.",
              "memory:read": "Read the knowledge base and shared memory.",
              "memory:write": "Add, edit, restore and delete knowledge entries.",
              "schedules:read": "Read scheduled automations.",
              "schedules:write": "Change and run scheduled automations.",
              "campaigns:read": "Read synced advertising, sales and Meta/Google campaign data.",
              "campaigns:write": "Run syncs and publish or change ad campaigns.",
              "reports:read": "Read SEO reports and research.",
              "reports:write": "Run and change SEO reports and research.",
              "pages:read": "Read template catalog metadata, code size/credits, Brand Kit, remixes, hosted pages, custom domains, and Email Studio drafts.",
              "pages:write": "Update Brand Kit, create or edit remixes, publish hosted pages or domains, and edit or publish Email Studio drafts.",
              "connectors:read": "See which apps and providers are connected, without any credentials.",
              "connectors:manage": "Disconnect apps, forget saved provider keys and manage MCP servers. Connecting an app or entering a credential needs you signed in.",
              "members:read": "See who belongs to an organization and their roles.",
              "members:manage": "Invite people and change or remove members.",
              "settings:read": "Read workspace settings, tool policy, skills and models.",
              "settings:write": "Change workspace settings, tool policy and skills.",
              "webhooks:manage": "Create, list and delete outbound webhooks.",
              "events:read": "Read the activity feed and webhook delivery log.",
              "tools:read": "Use read-only integration tools (Shopify, Klaviyo and others) the organization has connected.",
              "tools:write": "Use integration tools that change data in connected apps. Writes still follow the organization's tool policy."
            },
            "tokenUrl": "https://shaw.ai/api/auth/oauth2/token"
          }
        },
        "type": "oauth2"
      }
    },
    "schemas": {}
  }
}
```

## Inspect structured remix details

`GET https://shaw.ai/api/templates/remixes/{remixId}/detail`

Read the structured copy swaps, color palette, link overrides, and image briefs for a remix you own.

```json
{
  "openapi": "3.1.0",
  "info": {
    "description": "Shaw's API for people and agents. Everything you can do in the app, you can do here with an API key or an OAuth token, within the scopes you grant it.\n\nA scope only narrows a credential: every request still runs as the person who owns it, with their role in the organization.\n\nRoutes under /api/skills, /api/harness-profiles, /api/data-sync, /api/templates, /api/seo are reachable with the matching read or write scope (GET reads, everything else writes) even where no typed operation is listed here.\n\nWebhook events: approval.decided, session.completed, schedule.run.started, schedule.run.failed.\n\nMCP: https://shaw.ai/mcp (also https://shaw.ai/portal/mcp).",
    "title": "Shaw API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://shaw.ai"
    }
  ],
  "paths": {
    "/api/templates/remixes/{remixId}/detail": {
      "get": {
        "description": "Read the structured copy swaps, color palette, link overrides, and image briefs for a remix you own.",
        "operationId": "get_remix",
        "parameters": [
          {
            "$ref": "#/components/parameters/Tenant"
          },
          {
            "description": "The remix id (`rmx_...`).",
            "in": "path",
            "name": "remixId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Ok"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "pages:read"
            ]
          }
        ],
        "summary": "Inspect structured remix details",
        "tags": [
          "Builder"
        ],
        "x-mcp-tool": "get_remix",
        "x-requires-confirmation": false,
        "x-required-scope": "pages:read"
      }
    }
  },
  "components": {
    "parameters": {
      "Tenant": {
        "description": "The organization to act for (an id from `GET /api/me`). Defaults to the key's pinned organization, else your first organization. You must be a member of it.",
        "in": "header",
        "name": "X-Shaw-Tenant",
        "required": false,
        "schema": {
          "type": "string"
        }
      }
    },
    "responses": {
      "Error": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "error": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "The request was refused or failed; `error` is a stable code."
      },
      "Forbidden": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "error": {
                  "enum": [
                    "insufficient_scope",
                    "bearer_not_allowed",
                    "forbidden_workspace",
                    "tenant_pinned"
                  ],
                  "type": "string"
                },
                "message": {
                  "type": "string"
                },
                "scope": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "The credential lacks the scope, can't call this route, or can't act for the organization."
      },
      "Ok": {
        "content": {
          "application/json": {
            "schema": {}
          }
        },
        "description": "Success. The body is JSON."
      },
      "Unauthorized": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "error": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "The credential is missing, invalid, expired or revoked.",
        "headers": {
          "WWW-Authenticate": {
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "apiKey": {
        "bearerFormat": "sk_…",
        "description": "A personal API key created in Settings → Developers. Send it as `Authorization: Bearer sk_…`.",
        "scheme": "bearer",
        "type": "http"
      },
      "oauth2": {
        "description": "OAuth 2.1 authorization code with S256 PKCE. Clients can register themselves (RFC 7591).",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://shaw.ai/api/auth/oauth2/authorize",
            "refreshUrl": "https://shaw.ai/api/auth/oauth2/token",
            "scopes": {
              "org:read": "See which organizations you belong to, their profile and runtime status.",
              "org:write": "Create organizations and rename the ones you administer.",
              "sessions:read": "Read chat sessions, their messages and artifacts.",
              "sessions:write": "Start, rename, fork, compact and archive chat sessions and send messages.",
              "approvals:review": "Approve or reject the actions a session is waiting on.",
              "files:read": "Read shared files and documents.",
              "files:write": "Create, edit and delete shared files and documents.",
              "memory:read": "Read the knowledge base and shared memory.",
              "memory:write": "Add, edit, restore and delete knowledge entries.",
              "schedules:read": "Read scheduled automations.",
              "schedules:write": "Change and run scheduled automations.",
              "campaigns:read": "Read synced advertising, sales and Meta/Google campaign data.",
              "campaigns:write": "Run syncs and publish or change ad campaigns.",
              "reports:read": "Read SEO reports and research.",
              "reports:write": "Run and change SEO reports and research.",
              "pages:read": "Read template catalog metadata, code size/credits, Brand Kit, remixes, hosted pages, custom domains, and Email Studio drafts.",
              "pages:write": "Update Brand Kit, create or edit remixes, publish hosted pages or domains, and edit or publish Email Studio drafts.",
              "connectors:read": "See which apps and providers are connected, without any credentials.",
              "connectors:manage": "Disconnect apps, forget saved provider keys and manage MCP servers. Connecting an app or entering a credential needs you signed in.",
              "members:read": "See who belongs to an organization and their roles.",
              "members:manage": "Invite people and change or remove members.",
              "settings:read": "Read workspace settings, tool policy, skills and models.",
              "settings:write": "Change workspace settings, tool policy and skills.",
              "webhooks:manage": "Create, list and delete outbound webhooks.",
              "events:read": "Read the activity feed and webhook delivery log.",
              "tools:read": "Use read-only integration tools (Shopify, Klaviyo and others) the organization has connected.",
              "tools:write": "Use integration tools that change data in connected apps. Writes still follow the organization's tool policy."
            },
            "tokenUrl": "https://shaw.ai/api/auth/oauth2/token"
          }
        },
        "type": "oauth2"
      }
    },
    "schemas": {}
  }
}
```

## Edit remix copy, colors, and links

`PATCH https://shaw.ai/api/templates/remixes/{remixId}`

```json
{
  "openapi": "3.1.0",
  "info": {
    "description": "Shaw's API for people and agents. Everything you can do in the app, you can do here with an API key or an OAuth token, within the scopes you grant it.\n\nA scope only narrows a credential: every request still runs as the person who owns it, with their role in the organization.\n\nRoutes under /api/skills, /api/harness-profiles, /api/data-sync, /api/templates, /api/seo are reachable with the matching read or write scope (GET reads, everything else writes) even where no typed operation is listed here.\n\nWebhook events: approval.decided, session.completed, schedule.run.started, schedule.run.failed.\n\nMCP: https://shaw.ai/mcp (also https://shaw.ai/portal/mcp).",
    "title": "Shaw API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://shaw.ai"
    }
  ],
  "paths": {
    "/api/templates/remixes/{remixId}": {
      "patch": {
        "operationId": "update_remix",
        "parameters": [
          {
            "$ref": "#/components/parameters/Tenant"
          },
          {
            "description": "The remix id (`rmx_...`).",
            "in": "path",
            "name": "remixId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "brandName": {
                    "description": "Updated brand name.",
                    "type": "string"
                  },
                  "colors": {
                    "description": "Array of `[fromHex, toHex]` color swap pairs.",
                    "items": {},
                    "type": "array"
                  },
                  "links": {
                    "description": "Array of `[originalHref, targetHref]` link swap pairs.",
                    "items": {},
                    "type": "array"
                  },
                  "texts": {
                    "description": "Array of `[originalText, replacementText]` copy swap pairs.",
                    "items": {},
                    "type": "array"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Ok"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "pages:write"
            ]
          }
        ],
        "summary": "Edit remix copy, colors, and links",
        "tags": [
          "Builder"
        ],
        "x-mcp-tool": "update_remix",
        "x-requires-confirmation": false,
        "x-required-scope": "pages:write"
      }
    }
  },
  "components": {
    "parameters": {
      "Tenant": {
        "description": "The organization to act for (an id from `GET /api/me`). Defaults to the key's pinned organization, else your first organization. You must be a member of it.",
        "in": "header",
        "name": "X-Shaw-Tenant",
        "required": false,
        "schema": {
          "type": "string"
        }
      }
    },
    "responses": {
      "Error": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "error": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "The request was refused or failed; `error` is a stable code."
      },
      "Forbidden": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "error": {
                  "enum": [
                    "insufficient_scope",
                    "bearer_not_allowed",
                    "forbidden_workspace",
                    "tenant_pinned"
                  ],
                  "type": "string"
                },
                "message": {
                  "type": "string"
                },
                "scope": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "The credential lacks the scope, can't call this route, or can't act for the organization."
      },
      "Ok": {
        "content": {
          "application/json": {
            "schema": {}
          }
        },
        "description": "Success. The body is JSON."
      },
      "Unauthorized": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "error": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "The credential is missing, invalid, expired or revoked.",
        "headers": {
          "WWW-Authenticate": {
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "apiKey": {
        "bearerFormat": "sk_…",
        "description": "A personal API key created in Settings → Developers. Send it as `Authorization: Bearer sk_…`.",
        "scheme": "bearer",
        "type": "http"
      },
      "oauth2": {
        "description": "OAuth 2.1 authorization code with S256 PKCE. Clients can register themselves (RFC 7591).",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://shaw.ai/api/auth/oauth2/authorize",
            "refreshUrl": "https://shaw.ai/api/auth/oauth2/token",
            "scopes": {
              "org:read": "See which organizations you belong to, their profile and runtime status.",
              "org:write": "Create organizations and rename the ones you administer.",
              "sessions:read": "Read chat sessions, their messages and artifacts.",
              "sessions:write": "Start, rename, fork, compact and archive chat sessions and send messages.",
              "approvals:review": "Approve or reject the actions a session is waiting on.",
              "files:read": "Read shared files and documents.",
              "files:write": "Create, edit and delete shared files and documents.",
              "memory:read": "Read the knowledge base and shared memory.",
              "memory:write": "Add, edit, restore and delete knowledge entries.",
              "schedules:read": "Read scheduled automations.",
              "schedules:write": "Change and run scheduled automations.",
              "campaigns:read": "Read synced advertising, sales and Meta/Google campaign data.",
              "campaigns:write": "Run syncs and publish or change ad campaigns.",
              "reports:read": "Read SEO reports and research.",
              "reports:write": "Run and change SEO reports and research.",
              "pages:read": "Read template catalog metadata, code size/credits, Brand Kit, remixes, hosted pages, custom domains, and Email Studio drafts.",
              "pages:write": "Update Brand Kit, create or edit remixes, publish hosted pages or domains, and edit or publish Email Studio drafts.",
              "connectors:read": "See which apps and providers are connected, without any credentials.",
              "connectors:manage": "Disconnect apps, forget saved provider keys and manage MCP servers. Connecting an app or entering a credential needs you signed in.",
              "members:read": "See who belongs to an organization and their roles.",
              "members:manage": "Invite people and change or remove members.",
              "settings:read": "Read workspace settings, tool policy, skills and models.",
              "settings:write": "Change workspace settings, tool policy and skills.",
              "webhooks:manage": "Create, list and delete outbound webhooks.",
              "events:read": "Read the activity feed and webhook delivery log.",
              "tools:read": "Use read-only integration tools (Shopify, Klaviyo and others) the organization has connected.",
              "tools:write": "Use integration tools that change data in connected apps. Writes still follow the organization's tool policy."
            },
            "tokenUrl": "https://shaw.ai/api/auth/oauth2/token"
          }
        },
        "type": "oauth2"
      }
    },
    "schemas": {}
  }
}
```

## Generate or redraw one remix picture

`POST https://shaw.ai/api/templates/remixes/{remixId}/pictures/{index}`

```json
{
  "openapi": "3.1.0",
  "info": {
    "description": "Shaw's API for people and agents. Everything you can do in the app, you can do here with an API key or an OAuth token, within the scopes you grant it.\n\nA scope only narrows a credential: every request still runs as the person who owns it, with their role in the organization.\n\nRoutes under /api/skills, /api/harness-profiles, /api/data-sync, /api/templates, /api/seo are reachable with the matching read or write scope (GET reads, everything else writes) even where no typed operation is listed here.\n\nWebhook events: approval.decided, session.completed, schedule.run.started, schedule.run.failed.\n\nMCP: https://shaw.ai/mcp (also https://shaw.ai/portal/mcp).",
    "title": "Shaw API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://shaw.ai"
    }
  ],
  "paths": {
    "/api/templates/remixes/{remixId}/pictures/{index}": {
      "post": {
        "operationId": "draw_remix_picture",
        "parameters": [
          {
            "$ref": "#/components/parameters/Tenant"
          },
          {
            "description": "Zero-based picture slot index.",
            "in": "path",
            "name": "index",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The remix id (`rmx_...`).",
            "in": "path",
            "name": "remixId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "imageModel": {
                    "description": "Optional image model id.",
                    "type": "string"
                  },
                  "prompt": {
                    "description": "Custom prompt when redrawing.",
                    "type": "string"
                  },
                  "redraw": {
                    "description": "Set true to regenerate an existing image.",
                    "type": "boolean"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Ok"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "pages:write"
            ]
          }
        ],
        "summary": "Generate or redraw one remix picture",
        "tags": [
          "Builder"
        ],
        "x-mcp-tool": "draw_remix_picture",
        "x-requires-confirmation": false,
        "x-required-scope": "pages:write"
      }
    }
  },
  "components": {
    "parameters": {
      "Tenant": {
        "description": "The organization to act for (an id from `GET /api/me`). Defaults to the key's pinned organization, else your first organization. You must be a member of it.",
        "in": "header",
        "name": "X-Shaw-Tenant",
        "required": false,
        "schema": {
          "type": "string"
        }
      }
    },
    "responses": {
      "Error": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "error": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "The request was refused or failed; `error` is a stable code."
      },
      "Forbidden": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "error": {
                  "enum": [
                    "insufficient_scope",
                    "bearer_not_allowed",
                    "forbidden_workspace",
                    "tenant_pinned"
                  ],
                  "type": "string"
                },
                "message": {
                  "type": "string"
                },
                "scope": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "The credential lacks the scope, can't call this route, or can't act for the organization."
      },
      "Ok": {
        "content": {
          "application/json": {
            "schema": {}
          }
        },
        "description": "Success. The body is JSON."
      },
      "Unauthorized": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "error": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "The credential is missing, invalid, expired or revoked.",
        "headers": {
          "WWW-Authenticate": {
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "apiKey": {
        "bearerFormat": "sk_…",
        "description": "A personal API key created in Settings → Developers. Send it as `Authorization: Bearer sk_…`.",
        "scheme": "bearer",
        "type": "http"
      },
      "oauth2": {
        "description": "OAuth 2.1 authorization code with S256 PKCE. Clients can register themselves (RFC 7591).",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://shaw.ai/api/auth/oauth2/authorize",
            "refreshUrl": "https://shaw.ai/api/auth/oauth2/token",
            "scopes": {
              "org:read": "See which organizations you belong to, their profile and runtime status.",
              "org:write": "Create organizations and rename the ones you administer.",
              "sessions:read": "Read chat sessions, their messages and artifacts.",
              "sessions:write": "Start, rename, fork, compact and archive chat sessions and send messages.",
              "approvals:review": "Approve or reject the actions a session is waiting on.",
              "files:read": "Read shared files and documents.",
              "files:write": "Create, edit and delete shared files and documents.",
              "memory:read": "Read the knowledge base and shared memory.",
              "memory:write": "Add, edit, restore and delete knowledge entries.",
              "schedules:read": "Read scheduled automations.",
              "schedules:write": "Change and run scheduled automations.",
              "campaigns:read": "Read synced advertising, sales and Meta/Google campaign data.",
              "campaigns:write": "Run syncs and publish or change ad campaigns.",
              "reports:read": "Read SEO reports and research.",
              "reports:write": "Run and change SEO reports and research.",
              "pages:read": "Read template catalog metadata, code size/credits, Brand Kit, remixes, hosted pages, custom domains, and Email Studio drafts.",
              "pages:write": "Update Brand Kit, create or edit remixes, publish hosted pages or domains, and edit or publish Email Studio drafts.",
              "connectors:read": "See which apps and providers are connected, without any credentials.",
              "connectors:manage": "Disconnect apps, forget saved provider keys and manage MCP servers. Connecting an app or entering a credential needs you signed in.",
              "members:read": "See who belongs to an organization and their roles.",
              "members:manage": "Invite people and change or remove members.",
              "settings:read": "Read workspace settings, tool policy, skills and models.",
              "settings:write": "Change workspace settings, tool policy and skills.",
              "webhooks:manage": "Create, list and delete outbound webhooks.",
              "events:read": "Read the activity feed and webhook delivery log.",
              "tools:read": "Use read-only integration tools (Shopify, Klaviyo and others) the organization has connected.",
              "tools:write": "Use integration tools that change data in connected apps. Writes still follow the organization's tool policy."
            },
            "tokenUrl": "https://shaw.ai/api/auth/oauth2/token"
          }
        },
        "type": "oauth2"
      }
    },
    "schemas": {}
  }
}
```

## List hosted landing pages

`GET https://shaw.ai/api/builder/pages`

```json
{
  "openapi": "3.1.0",
  "info": {
    "description": "Shaw's API for people and agents. Everything you can do in the app, you can do here with an API key or an OAuth token, within the scopes you grant it.\n\nA scope only narrows a credential: every request still runs as the person who owns it, with their role in the organization.\n\nRoutes under /api/skills, /api/harness-profiles, /api/data-sync, /api/templates, /api/seo are reachable with the matching read or write scope (GET reads, everything else writes) even where no typed operation is listed here.\n\nWebhook events: approval.decided, session.completed, schedule.run.started, schedule.run.failed.\n\nMCP: https://shaw.ai/mcp (also https://shaw.ai/portal/mcp).",
    "title": "Shaw API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://shaw.ai"
    }
  ],
  "paths": {
    "/api/builder/pages": {
      "get": {
        "operationId": "list_pages",
        "parameters": [
          {
            "$ref": "#/components/parameters/Tenant"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Ok"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "pages:read"
            ]
          }
        ],
        "summary": "List hosted landing pages",
        "tags": [
          "Builder"
        ],
        "x-mcp-tool": "list_pages",
        "x-requires-confirmation": false,
        "x-required-scope": "pages:read"
      }
    }
  },
  "components": {
    "parameters": {
      "Tenant": {
        "description": "The organization to act for (an id from `GET /api/me`). Defaults to the key's pinned organization, else your first organization. You must be a member of it.",
        "in": "header",
        "name": "X-Shaw-Tenant",
        "required": false,
        "schema": {
          "type": "string"
        }
      }
    },
    "responses": {
      "Error": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "error": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "The request was refused or failed; `error` is a stable code."
      },
      "Forbidden": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "error": {
                  "enum": [
                    "insufficient_scope",
                    "bearer_not_allowed",
                    "forbidden_workspace",
                    "tenant_pinned"
                  ],
                  "type": "string"
                },
                "message": {
                  "type": "string"
                },
                "scope": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "The credential lacks the scope, can't call this route, or can't act for the organization."
      },
      "Ok": {
        "content": {
          "application/json": {
            "schema": {}
          }
        },
        "description": "Success. The body is JSON."
      },
      "Unauthorized": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "error": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "The credential is missing, invalid, expired or revoked.",
        "headers": {
          "WWW-Authenticate": {
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "apiKey": {
        "bearerFormat": "sk_…",
        "description": "A personal API key created in Settings → Developers. Send it as `Authorization: Bearer sk_…`.",
        "scheme": "bearer",
        "type": "http"
      },
      "oauth2": {
        "description": "OAuth 2.1 authorization code with S256 PKCE. Clients can register themselves (RFC 7591).",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://shaw.ai/api/auth/oauth2/authorize",
            "refreshUrl": "https://shaw.ai/api/auth/oauth2/token",
            "scopes": {
              "org:read": "See which organizations you belong to, their profile and runtime status.",
              "org:write": "Create organizations and rename the ones you administer.",
              "sessions:read": "Read chat sessions, their messages and artifacts.",
              "sessions:write": "Start, rename, fork, compact and archive chat sessions and send messages.",
              "approvals:review": "Approve or reject the actions a session is waiting on.",
              "files:read": "Read shared files and documents.",
              "files:write": "Create, edit and delete shared files and documents.",
              "memory:read": "Read the knowledge base and shared memory.",
              "memory:write": "Add, edit, restore and delete knowledge entries.",
              "schedules:read": "Read scheduled automations.",
              "schedules:write": "Change and run scheduled automations.",
              "campaigns:read": "Read synced advertising, sales and Meta/Google campaign data.",
              "campaigns:write": "Run syncs and publish or change ad campaigns.",
              "reports:read": "Read SEO reports and research.",
              "reports:write": "Run and change SEO reports and research.",
              "pages:read": "Read template catalog metadata, code size/credits, Brand Kit, remixes, hosted pages, custom domains, and Email Studio drafts.",
              "pages:write": "Update Brand Kit, create or edit remixes, publish hosted pages or domains, and edit or publish Email Studio drafts.",
              "connectors:read": "See which apps and providers are connected, without any credentials.",
              "connectors:manage": "Disconnect apps, forget saved provider keys and manage MCP servers. Connecting an app or entering a credential needs you signed in.",
              "members:read": "See who belongs to an organization and their roles.",
              "members:manage": "Invite people and change or remove members.",
              "settings:read": "Read workspace settings, tool policy, skills and models.",
              "settings:write": "Change workspace settings, tool policy and skills.",
              "webhooks:manage": "Create, list and delete outbound webhooks.",
              "events:read": "Read the activity feed and webhook delivery log.",
              "tools:read": "Use read-only integration tools (Shopify, Klaviyo and others) the organization has connected.",
              "tools:write": "Use integration tools that change data in connected apps. Writes still follow the organization's tool policy."
            },
            "tokenUrl": "https://shaw.ai/api/auth/oauth2/token"
          }
        },
        "type": "oauth2"
      }
    },
    "schemas": {}
  }
}
```

## Publish a remix as a hosted Shaw landing page

`POST https://shaw.ai/api/builder/pages/publish`

```json
{
  "openapi": "3.1.0",
  "info": {
    "description": "Shaw's API for people and agents. Everything you can do in the app, you can do here with an API key or an OAuth token, within the scopes you grant it.\n\nA scope only narrows a credential: every request still runs as the person who owns it, with their role in the organization.\n\nRoutes under /api/skills, /api/harness-profiles, /api/data-sync, /api/templates, /api/seo are reachable with the matching read or write scope (GET reads, everything else writes) even where no typed operation is listed here.\n\nWebhook events: approval.decided, session.completed, schedule.run.started, schedule.run.failed.\n\nMCP: https://shaw.ai/mcp (also https://shaw.ai/portal/mcp).",
    "title": "Shaw API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://shaw.ai"
    }
  ],
  "paths": {
    "/api/builder/pages/publish": {
      "post": {
        "operationId": "publish_page",
        "parameters": [
          {
            "$ref": "#/components/parameters/Tenant"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "customDomain": {
                    "description": "Optional verified custom domain hostname to bind.",
                    "type": "string"
                  },
                  "description": {
                    "description": "SEO meta description.",
                    "type": "string"
                  },
                  "remixId": {
                    "description": "The remix id (`rmx_...`) to publish.",
                    "type": "string"
                  },
                  "slug": {
                    "description": "Hosted path slug under `/p/<slug>`.",
                    "type": "string"
                  },
                  "title": {
                    "description": "Page title.",
                    "type": "string"
                  }
                },
                "required": [
                  "remixId"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Ok"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "pages:write"
            ]
          }
        ],
        "summary": "Publish a remix as a hosted Shaw landing page",
        "tags": [
          "Builder"
        ],
        "x-mcp-tool": "publish_page",
        "x-requires-confirmation": true,
        "x-required-scope": "pages:write"
      }
    }
  },
  "components": {
    "parameters": {
      "Tenant": {
        "description": "The organization to act for (an id from `GET /api/me`). Defaults to the key's pinned organization, else your first organization. You must be a member of it.",
        "in": "header",
        "name": "X-Shaw-Tenant",
        "required": false,
        "schema": {
          "type": "string"
        }
      }
    },
    "responses": {
      "Error": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "error": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "The request was refused or failed; `error` is a stable code."
      },
      "Forbidden": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "error": {
                  "enum": [
                    "insufficient_scope",
                    "bearer_not_allowed",
                    "forbidden_workspace",
                    "tenant_pinned"
                  ],
                  "type": "string"
                },
                "message": {
                  "type": "string"
                },
                "scope": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "The credential lacks the scope, can't call this route, or can't act for the organization."
      },
      "Ok": {
        "content": {
          "application/json": {
            "schema": {}
          }
        },
        "description": "Success. The body is JSON."
      },
      "Unauthorized": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "error": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "The credential is missing, invalid, expired or revoked.",
        "headers": {
          "WWW-Authenticate": {
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "apiKey": {
        "bearerFormat": "sk_…",
        "description": "A personal API key created in Settings → Developers. Send it as `Authorization: Bearer sk_…`.",
        "scheme": "bearer",
        "type": "http"
      },
      "oauth2": {
        "description": "OAuth 2.1 authorization code with S256 PKCE. Clients can register themselves (RFC 7591).",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://shaw.ai/api/auth/oauth2/authorize",
            "refreshUrl": "https://shaw.ai/api/auth/oauth2/token",
            "scopes": {
              "org:read": "See which organizations you belong to, their profile and runtime status.",
              "org:write": "Create organizations and rename the ones you administer.",
              "sessions:read": "Read chat sessions, their messages and artifacts.",
              "sessions:write": "Start, rename, fork, compact and archive chat sessions and send messages.",
              "approvals:review": "Approve or reject the actions a session is waiting on.",
              "files:read": "Read shared files and documents.",
              "files:write": "Create, edit and delete shared files and documents.",
              "memory:read": "Read the knowledge base and shared memory.",
              "memory:write": "Add, edit, restore and delete knowledge entries.",
              "schedules:read": "Read scheduled automations.",
              "schedules:write": "Change and run scheduled automations.",
              "campaigns:read": "Read synced advertising, sales and Meta/Google campaign data.",
              "campaigns:write": "Run syncs and publish or change ad campaigns.",
              "reports:read": "Read SEO reports and research.",
              "reports:write": "Run and change SEO reports and research.",
              "pages:read": "Read template catalog metadata, code size/credits, Brand Kit, remixes, hosted pages, custom domains, and Email Studio drafts.",
              "pages:write": "Update Brand Kit, create or edit remixes, publish hosted pages or domains, and edit or publish Email Studio drafts.",
              "connectors:read": "See which apps and providers are connected, without any credentials.",
              "connectors:manage": "Disconnect apps, forget saved provider keys and manage MCP servers. Connecting an app or entering a credential needs you signed in.",
              "members:read": "See who belongs to an organization and their roles.",
              "members:manage": "Invite people and change or remove members.",
              "settings:read": "Read workspace settings, tool policy, skills and models.",
              "settings:write": "Change workspace settings, tool policy and skills.",
              "webhooks:manage": "Create, list and delete outbound webhooks.",
              "events:read": "Read the activity feed and webhook delivery log.",
              "tools:read": "Use read-only integration tools (Shopify, Klaviyo and others) the organization has connected.",
              "tools:write": "Use integration tools that change data in connected apps. Writes still follow the organization's tool policy."
            },
            "tokenUrl": "https://shaw.ai/api/auth/oauth2/token"
          }
        },
        "type": "oauth2"
      }
    },
    "schemas": {}
  }
}
```

## Publish a remix to connected Shopify Online Store

`POST https://shaw.ai/api/builder/pages/publish-shopify`

```json
{
  "openapi": "3.1.0",
  "info": {
    "description": "Shaw's API for people and agents. Everything you can do in the app, you can do here with an API key or an OAuth token, within the scopes you grant it.\n\nA scope only narrows a credential: every request still runs as the person who owns it, with their role in the organization.\n\nRoutes under /api/skills, /api/harness-profiles, /api/data-sync, /api/templates, /api/seo are reachable with the matching read or write scope (GET reads, everything else writes) even where no typed operation is listed here.\n\nWebhook events: approval.decided, session.completed, schedule.run.started, schedule.run.failed.\n\nMCP: https://shaw.ai/mcp (also https://shaw.ai/portal/mcp).",
    "title": "Shaw API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://shaw.ai"
    }
  ],
  "paths": {
    "/api/builder/pages/publish-shopify": {
      "post": {
        "operationId": "publish_page_to_shopify",
        "parameters": [
          {
            "$ref": "#/components/parameters/Tenant"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "existingShopifyPageId": {
                    "description": "Existing Shopify Online Store page GID to update.",
                    "type": "string"
                  },
                  "handle": {
                    "description": "Shopify page URL handle.",
                    "type": "string"
                  },
                  "isPublished": {
                    "description": "Whether the Shopify page should be published live (default true).",
                    "type": "boolean"
                  },
                  "remixId": {
                    "description": "The remix id (`rmx_...`) to publish.",
                    "type": "string"
                  },
                  "slug": {
                    "description": "Optional hosted slug for asset paths.",
                    "type": "string"
                  },
                  "title": {
                    "description": "Shopify page title.",
                    "type": "string"
                  }
                },
                "required": [
                  "remixId"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Ok"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "pages:write"
            ]
          }
        ],
        "summary": "Publish a remix to connected Shopify Online Store",
        "tags": [
          "Builder"
        ],
        "x-mcp-tool": "publish_page_to_shopify",
        "x-requires-confirmation": true,
        "x-required-scope": "pages:write"
      }
    }
  },
  "components": {
    "parameters": {
      "Tenant": {
        "description": "The organization to act for (an id from `GET /api/me`). Defaults to the key's pinned organization, else your first organization. You must be a member of it.",
        "in": "header",
        "name": "X-Shaw-Tenant",
        "required": false,
        "schema": {
          "type": "string"
        }
      }
    },
    "responses": {
      "Error": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "error": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "The request was refused or failed; `error` is a stable code."
      },
      "Forbidden": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "error": {
                  "enum": [
                    "insufficient_scope",
                    "bearer_not_allowed",
                    "forbidden_workspace",
                    "tenant_pinned"
                  ],
                  "type": "string"
                },
                "message": {
                  "type": "string"
                },
                "scope": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "The credential lacks the scope, can't call this route, or can't act for the organization."
      },
      "Ok": {
        "content": {
          "application/json": {
            "schema": {}
          }
        },
        "description": "Success. The body is JSON."
      },
      "Unauthorized": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "error": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "The credential is missing, invalid, expired or revoked.",
        "headers": {
          "WWW-Authenticate": {
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "apiKey": {
        "bearerFormat": "sk_…",
        "description": "A personal API key created in Settings → Developers. Send it as `Authorization: Bearer sk_…`.",
        "scheme": "bearer",
        "type": "http"
      },
      "oauth2": {
        "description": "OAuth 2.1 authorization code with S256 PKCE. Clients can register themselves (RFC 7591).",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://shaw.ai/api/auth/oauth2/authorize",
            "refreshUrl": "https://shaw.ai/api/auth/oauth2/token",
            "scopes": {
              "org:read": "See which organizations you belong to, their profile and runtime status.",
              "org:write": "Create organizations and rename the ones you administer.",
              "sessions:read": "Read chat sessions, their messages and artifacts.",
              "sessions:write": "Start, rename, fork, compact and archive chat sessions and send messages.",
              "approvals:review": "Approve or reject the actions a session is waiting on.",
              "files:read": "Read shared files and documents.",
              "files:write": "Create, edit and delete shared files and documents.",
              "memory:read": "Read the knowledge base and shared memory.",
              "memory:write": "Add, edit, restore and delete knowledge entries.",
              "schedules:read": "Read scheduled automations.",
              "schedules:write": "Change and run scheduled automations.",
              "campaigns:read": "Read synced advertising, sales and Meta/Google campaign data.",
              "campaigns:write": "Run syncs and publish or change ad campaigns.",
              "reports:read": "Read SEO reports and research.",
              "reports:write": "Run and change SEO reports and research.",
              "pages:read": "Read template catalog metadata, code size/credits, Brand Kit, remixes, hosted pages, custom domains, and Email Studio drafts.",
              "pages:write": "Update Brand Kit, create or edit remixes, publish hosted pages or domains, and edit or publish Email Studio drafts.",
              "connectors:read": "See which apps and providers are connected, without any credentials.",
              "connectors:manage": "Disconnect apps, forget saved provider keys and manage MCP servers. Connecting an app or entering a credential needs you signed in.",
              "members:read": "See who belongs to an organization and their roles.",
              "members:manage": "Invite people and change or remove members.",
              "settings:read": "Read workspace settings, tool policy, skills and models.",
              "settings:write": "Change workspace settings, tool policy and skills.",
              "webhooks:manage": "Create, list and delete outbound webhooks.",
              "events:read": "Read the activity feed and webhook delivery log.",
              "tools:read": "Use read-only integration tools (Shopify, Klaviyo and others) the organization has connected.",
              "tools:write": "Use integration tools that change data in connected apps. Writes still follow the organization's tool policy."
            },
            "tokenUrl": "https://shaw.ai/api/auth/oauth2/token"
          }
        },
        "type": "oauth2"
      }
    },
    "schemas": {}
  }
}
```

## Delete a hosted landing page

`DELETE https://shaw.ai/api/builder/pages/{slug}`

```json
{
  "openapi": "3.1.0",
  "info": {
    "description": "Shaw's API for people and agents. Everything you can do in the app, you can do here with an API key or an OAuth token, within the scopes you grant it.\n\nA scope only narrows a credential: every request still runs as the person who owns it, with their role in the organization.\n\nRoutes under /api/skills, /api/harness-profiles, /api/data-sync, /api/templates, /api/seo are reachable with the matching read or write scope (GET reads, everything else writes) even where no typed operation is listed here.\n\nWebhook events: approval.decided, session.completed, schedule.run.started, schedule.run.failed.\n\nMCP: https://shaw.ai/mcp (also https://shaw.ai/portal/mcp).",
    "title": "Shaw API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://shaw.ai"
    }
  ],
  "paths": {
    "/api/builder/pages/{slug}": {
      "delete": {
        "operationId": "delete_page",
        "parameters": [
          {
            "$ref": "#/components/parameters/Tenant"
          },
          {
            "description": "Hosted landing page slug.",
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Ok"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "pages:write"
            ]
          }
        ],
        "summary": "Delete a hosted landing page",
        "tags": [
          "Builder"
        ],
        "x-mcp-tool": "delete_page",
        "x-requires-confirmation": true,
        "x-required-scope": "pages:write"
      }
    }
  },
  "components": {
    "parameters": {
      "Tenant": {
        "description": "The organization to act for (an id from `GET /api/me`). Defaults to the key's pinned organization, else your first organization. You must be a member of it.",
        "in": "header",
        "name": "X-Shaw-Tenant",
        "required": false,
        "schema": {
          "type": "string"
        }
      }
    },
    "responses": {
      "Error": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "error": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "The request was refused or failed; `error` is a stable code."
      },
      "Forbidden": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "error": {
                  "enum": [
                    "insufficient_scope",
                    "bearer_not_allowed",
                    "forbidden_workspace",
                    "tenant_pinned"
                  ],
                  "type": "string"
                },
                "message": {
                  "type": "string"
                },
                "scope": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "The credential lacks the scope, can't call this route, or can't act for the organization."
      },
      "Ok": {
        "content": {
          "application/json": {
            "schema": {}
          }
        },
        "description": "Success. The body is JSON."
      },
      "Unauthorized": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "error": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "The credential is missing, invalid, expired or revoked.",
        "headers": {
          "WWW-Authenticate": {
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "apiKey": {
        "bearerFormat": "sk_…",
        "description": "A personal API key created in Settings → Developers. Send it as `Authorization: Bearer sk_…`.",
        "scheme": "bearer",
        "type": "http"
      },
      "oauth2": {
        "description": "OAuth 2.1 authorization code with S256 PKCE. Clients can register themselves (RFC 7591).",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://shaw.ai/api/auth/oauth2/authorize",
            "refreshUrl": "https://shaw.ai/api/auth/oauth2/token",
            "scopes": {
              "org:read": "See which organizations you belong to, their profile and runtime status.",
              "org:write": "Create organizations and rename the ones you administer.",
              "sessions:read": "Read chat sessions, their messages and artifacts.",
              "sessions:write": "Start, rename, fork, compact and archive chat sessions and send messages.",
              "approvals:review": "Approve or reject the actions a session is waiting on.",
              "files:read": "Read shared files and documents.",
              "files:write": "Create, edit and delete shared files and documents.",
              "memory:read": "Read the knowledge base and shared memory.",
              "memory:write": "Add, edit, restore and delete knowledge entries.",
              "schedules:read": "Read scheduled automations.",
              "schedules:write": "Change and run scheduled automations.",
              "campaigns:read": "Read synced advertising, sales and Meta/Google campaign data.",
              "campaigns:write": "Run syncs and publish or change ad campaigns.",
              "reports:read": "Read SEO reports and research.",
              "reports:write": "Run and change SEO reports and research.",
              "pages:read": "Read template catalog metadata, code size/credits, Brand Kit, remixes, hosted pages, custom domains, and Email Studio drafts.",
              "pages:write": "Update Brand Kit, create or edit remixes, publish hosted pages or domains, and edit or publish Email Studio drafts.",
              "connectors:read": "See which apps and providers are connected, without any credentials.",
              "connectors:manage": "Disconnect apps, forget saved provider keys and manage MCP servers. Connecting an app or entering a credential needs you signed in.",
              "members:read": "See who belongs to an organization and their roles.",
              "members:manage": "Invite people and change or remove members.",
              "settings:read": "Read workspace settings, tool policy, skills and models.",
              "settings:write": "Change workspace settings, tool policy and skills.",
              "webhooks:manage": "Create, list and delete outbound webhooks.",
              "events:read": "Read the activity feed and webhook delivery log.",
              "tools:read": "Use read-only integration tools (Shopify, Klaviyo and others) the organization has connected.",
              "tools:write": "Use integration tools that change data in connected apps. Writes still follow the organization's tool policy."
            },
            "tokenUrl": "https://shaw.ai/api/auth/oauth2/token"
          }
        },
        "type": "oauth2"
      }
    },
    "schemas": {}
  }
}
```

## List custom domains

`GET https://shaw.ai/api/builder/domains`

```json
{
  "openapi": "3.1.0",
  "info": {
    "description": "Shaw's API for people and agents. Everything you can do in the app, you can do here with an API key or an OAuth token, within the scopes you grant it.\n\nA scope only narrows a credential: every request still runs as the person who owns it, with their role in the organization.\n\nRoutes under /api/skills, /api/harness-profiles, /api/data-sync, /api/templates, /api/seo are reachable with the matching read or write scope (GET reads, everything else writes) even where no typed operation is listed here.\n\nWebhook events: approval.decided, session.completed, schedule.run.started, schedule.run.failed.\n\nMCP: https://shaw.ai/mcp (also https://shaw.ai/portal/mcp).",
    "title": "Shaw API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://shaw.ai"
    }
  ],
  "paths": {
    "/api/builder/domains": {
      "get": {
        "operationId": "list_domains",
        "parameters": [
          {
            "$ref": "#/components/parameters/Tenant"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Ok"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "pages:read"
            ]
          }
        ],
        "summary": "List custom domains",
        "tags": [
          "Builder"
        ],
        "x-mcp-tool": "list_domains",
        "x-requires-confirmation": false,
        "x-required-scope": "pages:read"
      }
    }
  },
  "components": {
    "parameters": {
      "Tenant": {
        "description": "The organization to act for (an id from `GET /api/me`). Defaults to the key's pinned organization, else your first organization. You must be a member of it.",
        "in": "header",
        "name": "X-Shaw-Tenant",
        "required": false,
        "schema": {
          "type": "string"
        }
      }
    },
    "responses": {
      "Error": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "error": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "The request was refused or failed; `error` is a stable code."
      },
      "Forbidden": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "error": {
                  "enum": [
                    "insufficient_scope",
                    "bearer_not_allowed",
                    "forbidden_workspace",
                    "tenant_pinned"
                  ],
                  "type": "string"
                },
                "message": {
                  "type": "string"
                },
                "scope": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "The credential lacks the scope, can't call this route, or can't act for the organization."
      },
      "Ok": {
        "content": {
          "application/json": {
            "schema": {}
          }
        },
        "description": "Success. The body is JSON."
      },
      "Unauthorized": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "error": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "The credential is missing, invalid, expired or revoked.",
        "headers": {
          "WWW-Authenticate": {
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "apiKey": {
        "bearerFormat": "sk_…",
        "description": "A personal API key created in Settings → Developers. Send it as `Authorization: Bearer sk_…`.",
        "scheme": "bearer",
        "type": "http"
      },
      "oauth2": {
        "description": "OAuth 2.1 authorization code with S256 PKCE. Clients can register themselves (RFC 7591).",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://shaw.ai/api/auth/oauth2/authorize",
            "refreshUrl": "https://shaw.ai/api/auth/oauth2/token",
            "scopes": {
              "org:read": "See which organizations you belong to, their profile and runtime status.",
              "org:write": "Create organizations and rename the ones you administer.",
              "sessions:read": "Read chat sessions, their messages and artifacts.",
              "sessions:write": "Start, rename, fork, compact and archive chat sessions and send messages.",
              "approvals:review": "Approve or reject the actions a session is waiting on.",
              "files:read": "Read shared files and documents.",
              "files:write": "Create, edit and delete shared files and documents.",
              "memory:read": "Read the knowledge base and shared memory.",
              "memory:write": "Add, edit, restore and delete knowledge entries.",
              "schedules:read": "Read scheduled automations.",
              "schedules:write": "Change and run scheduled automations.",
              "campaigns:read": "Read synced advertising, sales and Meta/Google campaign data.",
              "campaigns:write": "Run syncs and publish or change ad campaigns.",
              "reports:read": "Read SEO reports and research.",
              "reports:write": "Run and change SEO reports and research.",
              "pages:read": "Read template catalog metadata, code size/credits, Brand Kit, remixes, hosted pages, custom domains, and Email Studio drafts.",
              "pages:write": "Update Brand Kit, create or edit remixes, publish hosted pages or domains, and edit or publish Email Studio drafts.",
              "connectors:read": "See which apps and providers are connected, without any credentials.",
              "connectors:manage": "Disconnect apps, forget saved provider keys and manage MCP servers. Connecting an app or entering a credential needs you signed in.",
              "members:read": "See who belongs to an organization and their roles.",
              "members:manage": "Invite people and change or remove members.",
              "settings:read": "Read workspace settings, tool policy, skills and models.",
              "settings:write": "Change workspace settings, tool policy and skills.",
              "webhooks:manage": "Create, list and delete outbound webhooks.",
              "events:read": "Read the activity feed and webhook delivery log.",
              "tools:read": "Use read-only integration tools (Shopify, Klaviyo and others) the organization has connected.",
              "tools:write": "Use integration tools that change data in connected apps. Writes still follow the organization's tool policy."
            },
            "tokenUrl": "https://shaw.ai/api/auth/oauth2/token"
          }
        },
        "type": "oauth2"
      }
    },
    "schemas": {}
  }
}
```

## Add a custom domain for hosted pages

`POST https://shaw.ai/api/builder/domains`

```json
{
  "openapi": "3.1.0",
  "info": {
    "description": "Shaw's API for people and agents. Everything you can do in the app, you can do here with an API key or an OAuth token, within the scopes you grant it.\n\nA scope only narrows a credential: every request still runs as the person who owns it, with their role in the organization.\n\nRoutes under /api/skills, /api/harness-profiles, /api/data-sync, /api/templates, /api/seo are reachable with the matching read or write scope (GET reads, everything else writes) even where no typed operation is listed here.\n\nWebhook events: approval.decided, session.completed, schedule.run.started, schedule.run.failed.\n\nMCP: https://shaw.ai/mcp (also https://shaw.ai/portal/mcp).",
    "title": "Shaw API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://shaw.ai"
    }
  ],
  "paths": {
    "/api/builder/domains": {
      "post": {
        "operationId": "add_domain",
        "parameters": [
          {
            "$ref": "#/components/parameters/Tenant"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "hostname": {
                    "description": "Custom hostname (e.g. `lp.yourbrand.com`).",
                    "type": "string"
                  },
                  "pageSlug": {
                    "description": "Optional hosted page slug to bind.",
                    "type": "string"
                  }
                },
                "required": [
                  "hostname"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Ok"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "pages:write"
            ]
          }
        ],
        "summary": "Add a custom domain for hosted pages",
        "tags": [
          "Builder"
        ],
        "x-mcp-tool": "add_domain",
        "x-requires-confirmation": true,
        "x-required-scope": "pages:write"
      }
    }
  },
  "components": {
    "parameters": {
      "Tenant": {
        "description": "The organization to act for (an id from `GET /api/me`). Defaults to the key's pinned organization, else your first organization. You must be a member of it.",
        "in": "header",
        "name": "X-Shaw-Tenant",
        "required": false,
        "schema": {
          "type": "string"
        }
      }
    },
    "responses": {
      "Error": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "error": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "The request was refused or failed; `error` is a stable code."
      },
      "Forbidden": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "error": {
                  "enum": [
                    "insufficient_scope",
                    "bearer_not_allowed",
                    "forbidden_workspace",
                    "tenant_pinned"
                  ],
                  "type": "string"
                },
                "message": {
                  "type": "string"
                },
                "scope": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "The credential lacks the scope, can't call this route, or can't act for the organization."
      },
      "Ok": {
        "content": {
          "application/json": {
            "schema": {}
          }
        },
        "description": "Success. The body is JSON."
      },
      "Unauthorized": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "error": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "The credential is missing, invalid, expired or revoked.",
        "headers": {
          "WWW-Authenticate": {
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "apiKey": {
        "bearerFormat": "sk_…",
        "description": "A personal API key created in Settings → Developers. Send it as `Authorization: Bearer sk_…`.",
        "scheme": "bearer",
        "type": "http"
      },
      "oauth2": {
        "description": "OAuth 2.1 authorization code with S256 PKCE. Clients can register themselves (RFC 7591).",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://shaw.ai/api/auth/oauth2/authorize",
            "refreshUrl": "https://shaw.ai/api/auth/oauth2/token",
            "scopes": {
              "org:read": "See which organizations you belong to, their profile and runtime status.",
              "org:write": "Create organizations and rename the ones you administer.",
              "sessions:read": "Read chat sessions, their messages and artifacts.",
              "sessions:write": "Start, rename, fork, compact and archive chat sessions and send messages.",
              "approvals:review": "Approve or reject the actions a session is waiting on.",
              "files:read": "Read shared files and documents.",
              "files:write": "Create, edit and delete shared files and documents.",
              "memory:read": "Read the knowledge base and shared memory.",
              "memory:write": "Add, edit, restore and delete knowledge entries.",
              "schedules:read": "Read scheduled automations.",
              "schedules:write": "Change and run scheduled automations.",
              "campaigns:read": "Read synced advertising, sales and Meta/Google campaign data.",
              "campaigns:write": "Run syncs and publish or change ad campaigns.",
              "reports:read": "Read SEO reports and research.",
              "reports:write": "Run and change SEO reports and research.",
              "pages:read": "Read template catalog metadata, code size/credits, Brand Kit, remixes, hosted pages, custom domains, and Email Studio drafts.",
              "pages:write": "Update Brand Kit, create or edit remixes, publish hosted pages or domains, and edit or publish Email Studio drafts.",
              "connectors:read": "See which apps and providers are connected, without any credentials.",
              "connectors:manage": "Disconnect apps, forget saved provider keys and manage MCP servers. Connecting an app or entering a credential needs you signed in.",
              "members:read": "See who belongs to an organization and their roles.",
              "members:manage": "Invite people and change or remove members.",
              "settings:read": "Read workspace settings, tool policy, skills and models.",
              "settings:write": "Change workspace settings, tool policy and skills.",
              "webhooks:manage": "Create, list and delete outbound webhooks.",
              "events:read": "Read the activity feed and webhook delivery log.",
              "tools:read": "Use read-only integration tools (Shopify, Klaviyo and others) the organization has connected.",
              "tools:write": "Use integration tools that change data in connected apps. Writes still follow the organization's tool policy."
            },
            "tokenUrl": "https://shaw.ai/api/auth/oauth2/token"
          }
        },
        "type": "oauth2"
      }
    },
    "schemas": {}
  }
}
```

## Verify DNS for a custom domain

`POST https://shaw.ai/api/builder/domains/{hostname}/verify`

```json
{
  "openapi": "3.1.0",
  "info": {
    "description": "Shaw's API for people and agents. Everything you can do in the app, you can do here with an API key or an OAuth token, within the scopes you grant it.\n\nA scope only narrows a credential: every request still runs as the person who owns it, with their role in the organization.\n\nRoutes under /api/skills, /api/harness-profiles, /api/data-sync, /api/templates, /api/seo are reachable with the matching read or write scope (GET reads, everything else writes) even where no typed operation is listed here.\n\nWebhook events: approval.decided, session.completed, schedule.run.started, schedule.run.failed.\n\nMCP: https://shaw.ai/mcp (also https://shaw.ai/portal/mcp).",
    "title": "Shaw API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://shaw.ai"
    }
  ],
  "paths": {
    "/api/builder/domains/{hostname}/verify": {
      "post": {
        "operationId": "verify_domain",
        "parameters": [
          {
            "$ref": "#/components/parameters/Tenant"
          },
          {
            "description": "Custom domain hostname.",
            "in": "path",
            "name": "hostname",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Ok"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "pages:write"
            ]
          }
        ],
        "summary": "Verify DNS for a custom domain",
        "tags": [
          "Builder"
        ],
        "x-mcp-tool": "verify_domain",
        "x-requires-confirmation": false,
        "x-required-scope": "pages:write"
      }
    }
  },
  "components": {
    "parameters": {
      "Tenant": {
        "description": "The organization to act for (an id from `GET /api/me`). Defaults to the key's pinned organization, else your first organization. You must be a member of it.",
        "in": "header",
        "name": "X-Shaw-Tenant",
        "required": false,
        "schema": {
          "type": "string"
        }
      }
    },
    "responses": {
      "Error": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "error": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "The request was refused or failed; `error` is a stable code."
      },
      "Forbidden": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "error": {
                  "enum": [
                    "insufficient_scope",
                    "bearer_not_allowed",
                    "forbidden_workspace",
                    "tenant_pinned"
                  ],
                  "type": "string"
                },
                "message": {
                  "type": "string"
                },
                "scope": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "The credential lacks the scope, can't call this route, or can't act for the organization."
      },
      "Ok": {
        "content": {
          "application/json": {
            "schema": {}
          }
        },
        "description": "Success. The body is JSON."
      },
      "Unauthorized": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "error": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "The credential is missing, invalid, expired or revoked.",
        "headers": {
          "WWW-Authenticate": {
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "apiKey": {
        "bearerFormat": "sk_…",
        "description": "A personal API key created in Settings → Developers. Send it as `Authorization: Bearer sk_…`.",
        "scheme": "bearer",
        "type": "http"
      },
      "oauth2": {
        "description": "OAuth 2.1 authorization code with S256 PKCE. Clients can register themselves (RFC 7591).",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://shaw.ai/api/auth/oauth2/authorize",
            "refreshUrl": "https://shaw.ai/api/auth/oauth2/token",
            "scopes": {
              "org:read": "See which organizations you belong to, their profile and runtime status.",
              "org:write": "Create organizations and rename the ones you administer.",
              "sessions:read": "Read chat sessions, their messages and artifacts.",
              "sessions:write": "Start, rename, fork, compact and archive chat sessions and send messages.",
              "approvals:review": "Approve or reject the actions a session is waiting on.",
              "files:read": "Read shared files and documents.",
              "files:write": "Create, edit and delete shared files and documents.",
              "memory:read": "Read the knowledge base and shared memory.",
              "memory:write": "Add, edit, restore and delete knowledge entries.",
              "schedules:read": "Read scheduled automations.",
              "schedules:write": "Change and run scheduled automations.",
              "campaigns:read": "Read synced advertising, sales and Meta/Google campaign data.",
              "campaigns:write": "Run syncs and publish or change ad campaigns.",
              "reports:read": "Read SEO reports and research.",
              "reports:write": "Run and change SEO reports and research.",
              "pages:read": "Read template catalog metadata, code size/credits, Brand Kit, remixes, hosted pages, custom domains, and Email Studio drafts.",
              "pages:write": "Update Brand Kit, create or edit remixes, publish hosted pages or domains, and edit or publish Email Studio drafts.",
              "connectors:read": "See which apps and providers are connected, without any credentials.",
              "connectors:manage": "Disconnect apps, forget saved provider keys and manage MCP servers. Connecting an app or entering a credential needs you signed in.",
              "members:read": "See who belongs to an organization and their roles.",
              "members:manage": "Invite people and change or remove members.",
              "settings:read": "Read workspace settings, tool policy, skills and models.",
              "settings:write": "Change workspace settings, tool policy and skills.",
              "webhooks:manage": "Create, list and delete outbound webhooks.",
              "events:read": "Read the activity feed and webhook delivery log.",
              "tools:read": "Use read-only integration tools (Shopify, Klaviyo and others) the organization has connected.",
              "tools:write": "Use integration tools that change data in connected apps. Writes still follow the organization's tool policy."
            },
            "tokenUrl": "https://shaw.ai/api/auth/oauth2/token"
          }
        },
        "type": "oauth2"
      }
    },
    "schemas": {}
  }
}
```

## Remove a custom domain

`DELETE https://shaw.ai/api/builder/domains/{hostname}`

```json
{
  "openapi": "3.1.0",
  "info": {
    "description": "Shaw's API for people and agents. Everything you can do in the app, you can do here with an API key or an OAuth token, within the scopes you grant it.\n\nA scope only narrows a credential: every request still runs as the person who owns it, with their role in the organization.\n\nRoutes under /api/skills, /api/harness-profiles, /api/data-sync, /api/templates, /api/seo are reachable with the matching read or write scope (GET reads, everything else writes) even where no typed operation is listed here.\n\nWebhook events: approval.decided, session.completed, schedule.run.started, schedule.run.failed.\n\nMCP: https://shaw.ai/mcp (also https://shaw.ai/portal/mcp).",
    "title": "Shaw API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://shaw.ai"
    }
  ],
  "paths": {
    "/api/builder/domains/{hostname}": {
      "delete": {
        "operationId": "delete_domain",
        "parameters": [
          {
            "$ref": "#/components/parameters/Tenant"
          },
          {
            "description": "Custom domain hostname.",
            "in": "path",
            "name": "hostname",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Ok"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "pages:write"
            ]
          }
        ],
        "summary": "Remove a custom domain",
        "tags": [
          "Builder"
        ],
        "x-mcp-tool": "delete_domain",
        "x-requires-confirmation": true,
        "x-required-scope": "pages:write"
      }
    }
  },
  "components": {
    "parameters": {
      "Tenant": {
        "description": "The organization to act for (an id from `GET /api/me`). Defaults to the key's pinned organization, else your first organization. You must be a member of it.",
        "in": "header",
        "name": "X-Shaw-Tenant",
        "required": false,
        "schema": {
          "type": "string"
        }
      }
    },
    "responses": {
      "Error": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "error": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "The request was refused or failed; `error` is a stable code."
      },
      "Forbidden": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "error": {
                  "enum": [
                    "insufficient_scope",
                    "bearer_not_allowed",
                    "forbidden_workspace",
                    "tenant_pinned"
                  ],
                  "type": "string"
                },
                "message": {
                  "type": "string"
                },
                "scope": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "The credential lacks the scope, can't call this route, or can't act for the organization."
      },
      "Ok": {
        "content": {
          "application/json": {
            "schema": {}
          }
        },
        "description": "Success. The body is JSON."
      },
      "Unauthorized": {
        "content": {
          "application/json": {
            "schema": {
              "properties": {
                "error": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          }
        },
        "description": "The credential is missing, invalid, expired or revoked.",
        "headers": {
          "WWW-Authenticate": {
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "apiKey": {
        "bearerFormat": "sk_…",
        "description": "A personal API key created in Settings → Developers. Send it as `Authorization: Bearer sk_…`.",
        "scheme": "bearer",
        "type": "http"
      },
      "oauth2": {
        "description": "OAuth 2.1 authorization code with S256 PKCE. Clients can register themselves (RFC 7591).",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://shaw.ai/api/auth/oauth2/authorize",
            "refreshUrl": "https://shaw.ai/api/auth/oauth2/token",
            "scopes": {
              "org:read": "See which organizations you belong to, their profile and runtime status.",
              "org:write": "Create organizations and rename the ones you administer.",
              "sessions:read": "Read chat sessions, their messages and artifacts.",
              "sessions:write": "Start, rename, fork, compact and archive chat sessions and send messages.",
              "approvals:review": "Approve or reject the actions a session is waiting on.",
              "files:read": "Read shared files and documents.",
              "files:write": "Create, edit and delete shared files and documents.",
              "memory:read": "Read the knowledge base and shared memory.",
              "memory:write": "Add, edit, restore and delete knowledge entries.",
              "schedules:read": "Read scheduled automations.",
              "schedules:write": "Change and run scheduled automations.",
              "campaigns:read": "Read synced advertising, sales and Meta/Google campaign data.",
              "campaigns:write": "Run syncs and publish or change ad campaigns.",
              "reports:read": "Read SEO reports and research.",
              "reports:write": "Run and change SEO reports and research.",
              "pages:read": "Read template catalog metadata, code size/credits, Brand Kit, remixes, hosted pages, custom domains, and Email Studio drafts.",
              "pages:write": "Update Brand Kit, create or edit remixes, publish hosted pages or domains, and edit or publish Email Studio drafts.",
              "connectors:read": "See which apps and providers are connected, without any credentials.",
              "connectors:manage": "Disconnect apps, forget saved provider keys and manage MCP servers. Connecting an app or entering a credential needs you signed in.",
              "members:read": "See who belongs to an organization and their roles.",
              "members:manage": "Invite people and change or remove members.",
              "settings:read": "Read workspace settings, tool policy, skills and models.",
              "settings:write": "Change workspace settings, tool policy and skills.",
              "webhooks:manage": "Create, list and delete outbound webhooks.",
              "events:read": "Read the activity feed and webhook delivery log.",
              "tools:read": "Use read-only integration tools (Shopify, Klaviyo and others) the organization has connected.",
              "tools:write": "Use integration tools that change data in connected apps. Writes still follow the organization's tool policy."
            },
            "tokenUrl": "https://shaw.ai/api/auth/oauth2/token"
          }
        },
        "type": "oauth2"
      }
    },
    "schemas": {}
  }
}
```
