> ## Documentation Index
> Fetch the complete documentation index at: https://docs.1club.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Update website-level settings

> Changes the website's name, theme behaviour and site-wide SEO defaults. Every field is optional; omitted fields are left alone.
`supportedLocales` and `defaultLocale` are **organization-level** and need the additional `organization:write` scope. They also decide which languages the member portal, the mobile app and outbound email offer, and they take effect immediately rather than on publish - so they are a separate grant from editing the draft. They are reachable here at all because they are what decides which localized URLs the website serves: a page or section translated into an unlisted locale has no URL to be served at and no `hreflang` alternate pointing to it. A `defaultLocale` outside `supportedLocales` is a 400.
Everything else in this body edits the **draft**, `seoSettings` included - it is stored in the site's settings, so a release carries it and the public site keeps serving the previously published values until you publish.
Deliberately cannot change the site's address (`slug`, `domain`), which website is the organization's default, or whether the site is switched on - those move a customer's public presence and are not side effects a content edit should have.




## OpenAPI

````yaml /openapi-platform.json patch /v1/platform/website
openapi: 3.0.0
info:
  title: 1club Platform API
  version: 1.0.0
  description: >-
    The 1club Platform API lets you programmatically access and manage your
    organization's data.


    ## Official API Contract


    This documentation is the official source of truth for the 1club Platform
    API.

    If an integration relies on undocumented endpoints, fields, response shapes,
    or internal behavior outside this spec, we can't guarantee backward
    compatibility.

    Build against what's documented here to stay stable as the platform evolves.


    ## Authentication


    All requests require a customer API key passed as a Bearer token:


    ```

    Authorization: Bearer 1club_sk_live_...

    ```


    Generate API keys from the admin portal under **Settings > API Tokens**.

    The key is tied to your organization - all responses are scoped to your
    org's data.


    ## Rate Limiting


    - **100 requests per minute** per API key

    - When exceeded, the API returns `429 Too Many Requests` with a
    `Retry-After` header

    - Rate limit headers are included in every response:
      - `X-RateLimit-Limit` - max requests per window
      - `X-RateLimit-Remaining` - requests remaining
      - `X-RateLimit-Reset` - seconds until the window resets

    ## Errors


    | Status | Meaning |

    |--------|---------|

    | `400` | Invalid request parameters |

    | `401` | Missing or invalid API key |

    | `404` | Resource not found (or doesn't belong to your organization) |

    | `429` | Rate limit exceeded |

    | `500` | Internal server error |
  contact:
    name: 1club API Support
    email: support@1club.ai
servers:
  - url: https://api.1club.ai
    description: Production API
security:
  - customerApiAuth: []
tags: []
paths:
  /v1/platform/website:
    patch:
      tags:
        - Website
      summary: Update website-level settings
      description: >
        Changes the website's name, theme behaviour and site-wide SEO defaults.
        Every field is optional; omitted fields are left alone.

        `supportedLocales` and `defaultLocale` are **organization-level** and
        need the additional `organization:write` scope. They also decide which
        languages the member portal, the mobile app and outbound email offer,
        and they take effect immediately rather than on publish - so they are a
        separate grant from editing the draft. They are reachable here at all
        because they are what decides which localized URLs the website serves: a
        page or section translated into an unlisted locale has no URL to be
        served at and no `hreflang` alternate pointing to it. A `defaultLocale`
        outside `supportedLocales` is a 400.

        Everything else in this body edits the **draft**, `seoSettings` included
        - it is stored in the site's settings, so a release carries it and the
        public site keeps serving the previously published values until you
        publish.

        Deliberately cannot change the site's address (`slug`, `domain`), which
        website is the organization's default, or whether the site is switched
        on - those move a customer's public presence and are not side effects a
        content edit should have.
      parameters:
        - in: query
          name: siteId
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                themeSupport:
                  type: string
                  enum:
                    - both
                    - light
                    - dark
                  description: >-
                    `both` lets a visitor switch; `light`/`dark` fixes the
                    theme.
                defaultTheme:
                  type: string
                  enum:
                    - light
                    - dark
                    - system
                  description: Only meaningful when themeSupport is `both`.
                seoSettings:
                  type: object
                  description: >
                    Site-wide SEO defaults, replacing the whole object - read
                    the current one from `GET /website` first. Every field is a
                    fallback a page can override.
                  additionalProperties: false
                  properties:
                    siteDescription:
                      type: string
                      nullable: true
                      description: >
                        Meta description for pages that set none, and the
                        `description` in the site's Organization / LocalBusiness
                        / WebSite structured data.
                    defaultOgImage:
                      type: string
                      format: uri
                      nullable: true
                      description: >-
                        Social-share image for pages with no `ogImage`. Get a
                        URL from `GET /media`.
                    verification:
                      type: object
                      nullable: true
                      additionalProperties: false
                      description: >-
                        Search-console ownership tokens, rendered as meta tags
                        on every page.
                      properties:
                        google:
                          type: string
                          nullable: true
                          description: Google Search Console token
                        bing:
                          type: string
                          nullable: true
                          description: Bing Webmaster Tools token
                supportedLocales:
                  type: array
                  description: >
                    Locales this organization serves, in display order.
                    Organization-level, requires `organization:write`, and
                    applies immediately - see the endpoint description. Must
                    contain `defaultLocale`.
                  items:
                    type: string
                    enum:
                      - en
                      - es
                      - fr
                      - de
                      - bg
                      - cs
                defaultLocale:
                  type: string
                  enum:
                    - en
                    - es
                    - fr
                    - de
                    - bg
                    - cs
                  description: >-
                    Locale served at the site root. Organization-level, requires
                    `organization:write`.
      responses:
        '200':
          description: The updated website
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlatformWebsite'
        '400':
          description: Invalid body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlatformError'
        '401':
          $ref: '#/components/responses/PlatformUnauthorized'
        '403':
          description: >-
            API key is missing `website:write`, or `organization:write` when the
            body carries locale fields
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlatformError'
        '429':
          $ref: '#/components/responses/PlatformRateLimited'
      security:
        - customerApiAuth: []
components:
  schemas:
    PlatformWebsite:
      type: object
      description: >-
        A website belonging to the organization. Every field here describes the
        **draft**, except `url`, `published`, `activeReleaseVersion` and
        `lastPublishedAt`, which describe what the public is currently being
        served.
      properties:
        id:
          type: integer
        name:
          type: string
        slug:
          type: string
          description: Platform host label - the site answers on `<slug>.1club.me`.
        domain:
          type: string
          nullable: true
          description: Custom domain, when one is pointed at this site.
        isDefault:
          type: boolean
          description: >-
            True for the site an organization-wide caller means by "the
            website". Exactly one per organization.
        isActive:
          type: boolean
          description: >-
            False means the site is switched off and serves nothing publicly,
            whatever the draft contains.
        url:
          type: string
          description: Public URL - the custom domain when set, else the platform host.
        previewUrl:
          type: string
          description: >-
            The same site rendered from the unpublished draft - the link to
            review edits before publishing. Carries a signed grant that expires
            24 hours after this response was generated; read the website again
            for a fresh one. Anyone holding the link can view the draft, so it
            is shareable without a login but should be treated as sensitive.
        published:
          type: boolean
          description: >-
            Whether the site has ever been published. False means nothing is
            publicly reachable yet.
        activeReleaseVersion:
          type: integer
          nullable: true
        lastPublishedAt:
          type: string
          format: date-time
          nullable: true
        themeSupport:
          type: string
          enum:
            - both
            - light
            - dark
          nullable: true
        defaultTheme:
          type: string
          enum:
            - light
            - dark
            - system
          nullable: true
        supportedLocales:
          type: array
          nullable: true
          items:
            type: string
          description: >-
            Locales the site serves, which is what its `hreflang` alternates and
            `sitemap.xml` advertise. Organization-level - see `PATCH
            /v1/platform/website`.
        defaultLocale:
          type: string
          nullable: true
          description: Locale served at the site root. Organization-level.
        seoSettings:
          type: object
          description: >-
            Site-wide SEO defaults. Each field is a fallback a page can
            override.
          additionalProperties: false
          properties:
            siteDescription:
              type: string
              description: >-
                Meta-description fallback, and the `description` in the site's
                structured data.
            defaultOgImage:
              type: string
              description: Social-share image for pages with no `ogImage` of their own.
            verification:
              type: object
              description: >-
                Search-console ownership tokens, rendered as meta tags on every
                page.
              properties:
                google:
                  type: string
                bing:
                  type: string
        pages:
          type: array
          description: Present when fetching one website; omitted from the site list.
          items:
            $ref: '#/components/schemas/PlatformWebsitePage'
        layout:
          type: object
          description: Header and footer, rendered on every page.
          properties:
            header:
              $ref: '#/components/schemas/PlatformWebsiteSection'
            footer:
              $ref: '#/components/schemas/PlatformWebsiteSection'
        hasCustomCss:
          type: boolean
        updatedAt:
          type: string
          format: date-time
    PlatformError:
      type: object
      properties:
        error:
          type: string
    PlatformWebsitePage:
      type: object
      description: A page on the website draft.
      properties:
        slug:
          type: string
          description: >-
            URL path segment. The homepage is served at "/" regardless of its
            slug.
        title:
          type: string
        isHomepage:
          type: boolean
        sectionCount:
          type: integer
        sectionTypes:
          type: array
          items:
            type: string
        sections:
          type: array
          description: Present when fetching a single page; omitted from list responses.
          items:
            $ref: '#/components/schemas/PlatformWebsiteSection'
        metaTitle:
          type: string
          nullable: true
        metaDescription:
          type: string
          nullable: true
        ogImage:
          type: string
          nullable: true
        noindex:
          type: boolean
          description: >-
            True when the page asks search engines not to index it and is left
            out of `sitemap.xml`.
        translations:
          type: object
          nullable: true
          description: >-
            Per-locale `metaTitle`/`metaDescription` overrides, keyed by locale:
            { "bg": { "metaTitle": "…" } }. Present when fetching a single page.
          additionalProperties:
            type: object
            properties:
              metaTitle:
                type: string
              metaDescription:
                type: string
        seo:
          $ref: '#/components/schemas/PlatformWebsitePageSeo'
        url:
          type: string
          description: The page's public URL once published.
    PlatformWebsiteSection:
      type: object
      description: >-
        One section of a page or of the site layout. `config` fields depend on
        `type` - see GET /v1/platform/website/section-types for the definitions.
      properties:
        type:
          type: string
          description: Section type, e.g. "hero", "plans", "faq", "header".
        config:
          type: object
          additionalProperties: true
        translations:
          type: object
          additionalProperties: true
          description: >-
            Per-locale overrides for the section's translatable string fields,
            keyed by locale then field: { "bg": { "headline": "…" } }. Config
            values themselves stay in the default language.
    PlatformWebsitePageSeo:
      type: object
      description: >-
        What the published page will actually put in its `<head>`, after every
        fallback has been applied - the authored fields alone do not answer "is
        my SEO right?". Present when fetching a single page. Read-only.
      properties:
        metaTitle:
          type: string
          description: The `<title>`, after falling back to the page title.
        metaDescription:
          type: string
          nullable: true
          description: After falling back to `seoSettings.siteDescription`.
        ogImage:
          type: string
          nullable: true
          description: After falling back to `seoSettings.defaultOgImage`.
        canonicalUrl:
          type: string
          description: >-
            The `rel=canonical` the default-locale render emits, locale prefix
            included.
        indexable:
          type: boolean
          description: Whether search engines are asked to index this page.
        notIndexableReason:
          type: string
          nullable: true
          enum:
            - page_noindex
            - site_unpublished
            - site_inactive
          description: >-
            Why `indexable` is false. An unpublished or switched-off site is not
            indexable however the page is configured.
        localizedLocales:
          type: array
          items:
            type: string
          description: Locales carrying their own metaTitle/metaDescription overrides.
  responses:
    PlatformUnauthorized:
      description: Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PlatformError'
    PlatformRateLimited:
      description: Rate limit exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PlatformError'
  securitySchemes:
    customerApiAuth:
      type: http
      scheme: bearer
      description: >-
        Organization-scoped bearer credential: a customer API key
        (1club_sk_live_...) or an MCP OAuth access token.

````