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

# Apply SEO fix

> <Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Applies the fix for one check from an SEO scan and returns what it did.

Get the checks from [Run SEO scan](/api-reference/run-seo-scan) or [Get last SEO scan](/api-reference/get-last-seo-scan). Each check Base44 can act on carries a `fix_action`. Send its `type` as `fix_type` and its `params` as `params`.

These actions change the app's SEO settings. Each one replaces the value it sets, including a value someone edited by hand:
- `enable_llms_txt` turns on the generated `/llms.txt`.
- `enable_ai_crawlers` allows known AI crawlers in the generated `robots.txt`.
- `generate_json_ld` replaces `custom_json_ld` with markup generated from the app's entities.
- `generate_page_meta` replaces the title and description of every page except the home page. Each page keeps its `noindex` and `og_image` values.
- `generate_website_schema`, `generate_organization_schema` and `generate_faq_schema` replace the saved WebSite, Organization and FAQPage markup.
- `generate_breadcrumb_schema` turns on `synthesized_breadcrumb_enabled` and deletes the saved `breadcrumb_schema`.
- `generate_canonical` sets `canonical_url` to the app's current URL.

These actions change the app itself:
- `generate_description` replaces the app's description with one an AI model writes from the app's name, pages and entities. When the model's answer doesn't pass Base44's length and wording checks, Base44 saves a description built from a template instead.
- `suggest_shorter_title` shortens an app name longer than 60 characters to 57 or fewer, cutting at a word boundary. A name of 60 characters or fewer is left as it is.

The rest change nothing. `set_app_title`, `edit_app_description`, `edit_public_access`, `open_seo_advanced`, `set_og_image`, `connect_domain`, `edit_slug`, `enable_https` and `publish_app` return a `redirect` naming the builder screen where the app's owner makes the fix. `fix_with_ai` marks a check that needs a change to the app's code, which the builder makes by sending the action's `params.prompt` to the app's AI chat.

No action edits the app's code, creates a checkpoint or uses the workspace's credits.

A call can succeed and still report `success` as `false` when the action had nothing to apply, such as `generate_json_ld` on an app with no entity Base44 can match to a Schema.org type.

Calling an action again applies it again. Most land on the same result every time, but `generate_description` writes a new description on each call.

Saving itself is immediate. The live site is served from a separate copy, which is updated right after, but that update isn't guaranteed to happen in the same moment and can lag. A successful call means the change is stored, not that the live site has caught up.

This is limited to 30 requests a minute per caller for each app, shared with the app's other SEO endpoints. Some workspaces have a different limit.

<Warning>The response includes fields beyond the ones documented here. Don't rely on undocumented response fields, as they can change at any time. Send only the `fix_type` values documented here. Other values are not supported and their behavior can change.</Warning>



## OpenAPI

````yaml /developers/references/app-management/app-management-openapi.json post /api/apps/{app_id}/seo/fix
openapi: 3.1.0
info:
  title: Base44 App Management API
  version: 1.0.0
servers:
  - url: https://app.base44.com
security:
  - PersonalAccessTokenAuth: []
paths:
  /api/apps/{app_id}/seo/fix:
    post:
      summary: Apply SEO fix
      description: >-
        <Info>This API is in beta. Endpoints, fields, and behavior may still
        change, so avoid depending on it in production.</Info>


        Applies the fix for one check from an SEO scan and returns what it did.


        Get the checks from [Run SEO scan](/api-reference/run-seo-scan) or [Get
        last SEO scan](/api-reference/get-last-seo-scan). Each check Base44 can
        act on carries a `fix_action`. Send its `type` as `fix_type` and its
        `params` as `params`.


        These actions change the app's SEO settings. Each one replaces the value
        it sets, including a value someone edited by hand:

        - `enable_llms_txt` turns on the generated `/llms.txt`.

        - `enable_ai_crawlers` allows known AI crawlers in the generated
        `robots.txt`.

        - `generate_json_ld` replaces `custom_json_ld` with markup generated
        from the app's entities.

        - `generate_page_meta` replaces the title and description of every page
        except the home page. Each page keeps its `noindex` and `og_image`
        values.

        - `generate_website_schema`, `generate_organization_schema` and
        `generate_faq_schema` replace the saved WebSite, Organization and
        FAQPage markup.

        - `generate_breadcrumb_schema` turns on `synthesized_breadcrumb_enabled`
        and deletes the saved `breadcrumb_schema`.

        - `generate_canonical` sets `canonical_url` to the app's current URL.


        These actions change the app itself:

        - `generate_description` replaces the app's description with one an AI
        model writes from the app's name, pages and entities. When the model's
        answer doesn't pass Base44's length and wording checks, Base44 saves a
        description built from a template instead.

        - `suggest_shorter_title` shortens an app name longer than 60 characters
        to 57 or fewer, cutting at a word boundary. A name of 60 characters or
        fewer is left as it is.


        The rest change nothing. `set_app_title`, `edit_app_description`,
        `edit_public_access`, `open_seo_advanced`, `set_og_image`,
        `connect_domain`, `edit_slug`, `enable_https` and `publish_app` return a
        `redirect` naming the builder screen where the app's owner makes the
        fix. `fix_with_ai` marks a check that needs a change to the app's code,
        which the builder makes by sending the action's `params.prompt` to the
        app's AI chat.


        No action edits the app's code, creates a checkpoint or uses the
        workspace's credits.


        A call can succeed and still report `success` as `false` when the action
        had nothing to apply, such as `generate_json_ld` on an app with no
        entity Base44 can match to a Schema.org type.


        Calling an action again applies it again. Most land on the same result
        every time, but `generate_description` writes a new description on each
        call.


        Saving itself is immediate. The live site is served from a separate
        copy, which is updated right after, but that update isn't guaranteed to
        happen in the same moment and can lag. A successful call means the
        change is stored, not that the live site has caught up.


        This is limited to 30 requests a minute per caller for each app, shared
        with the app's other SEO endpoints. Some workspaces have a different
        limit.


        <Warning>The response includes fields beyond the ones documented here.
        Don't rely on undocumented response fields, as they can change at any
        time. Send only the `fix_type` values documented here. Other values are
        not supported and their behavior can change.</Warning>
      operationId: apply_seo_fix_api_apps__app_id__seo_fix_post
      parameters:
        - name: app_id
          in: path
          required: true
          schema:
            type: string
            description: ID of the app to fix.
            title: App Id
          description: ID of the app to fix.
          example: 6820f3a4e7b91d003c45a1f2
      requestBody:
        required: true
        content:
          application/json:
            schema:
              title: ApplySEOFix
              type: object
              required:
                - fix_type
              properties:
                fix_type:
                  type: string
                  enum:
                    - enable_llms_txt
                    - enable_ai_crawlers
                    - generate_json_ld
                    - generate_page_meta
                    - generate_website_schema
                    - generate_organization_schema
                    - generate_faq_schema
                    - generate_breadcrumb_schema
                    - generate_canonical
                    - generate_description
                    - suggest_shorter_title
                    - set_app_title
                    - edit_app_description
                    - edit_public_access
                    - open_seo_advanced
                    - set_og_image
                    - connect_domain
                    - edit_slug
                    - enable_https
                    - publish_app
                    - fix_with_ai
                  description: >-
                    Action to apply, the `type` of a check's `fix_action` in
                    [Get last SEO scan](/api-reference/get-last-seo-scan).
                  example: enable_llms_txt
                params:
                  type: object
                  additionalProperties: true
                  default: {}
                  description: >-
                    Arguments for the action, the `params` of the same
                    `fix_action`, sent as they are. Defaults to an empty object.
                  example: {}
            example:
              fix_type: enable_llms_txt
              params: {}
      responses:
        '200':
          description: What the action did.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SEOFixResponse'
        '400':
          description: '`fix_type` isn''t an action Base44 knows.'
        '401':
          description: Missing or invalid credentials.
        '403':
          description: >-
            You don't have access to this app, you used a workspace API key, or
            you used a read-only personal access token. These endpoints accept a
            user's credentials only, and none of them accept a read-only
            credential, including the ones that only read.
        '404':
          description: App not found.
        '422':
          description: >-
            The body is missing or isn't a JSON object, `fix_type` is missing or
            isn't a string, or `params` isn't an object.
        '429':
          description: >-
            Rate limit exceeded. The base limit is 30 requests per minute,
            shared with the app's other SEO endpoints. See [Rate
            limits](/developers/references/apps-api/get-started/rate-limits) for
            the multiplier your plan gets.
components:
  schemas:
    SEOFixResponse:
      properties:
        result:
          $ref: '#/components/schemas/SEOFixResult'
          description: What the action did.
      type: object
      required:
        - result
      title: SEOFixResponse
      description: The outcome of a fix action.
    SEOFixResult:
      properties:
        success:
          type: boolean
          title: Success
          description: >-
            Whether the action was applied. It's `false` when the action had
            nothing to apply, and `message` says why.
          example: true
        message:
          type: string
          title: Message
          description: What the action did, written for the app's owner.
          example: llms.txt enabled
        redirect:
          anyOf:
            - type: string
              enum:
                - overview
                - app-settings
                - seo-meta-tags
                - domains
                - publish
            - type: 'null'
          title: Redirect
          description: >-
            Builder screen where the app's owner makes this fix: `"overview"`,
            `"app-settings"`, `"seo-meta-tags"`, `"domains"`, or `"publish"`.
            The key is present only for the actions that change nothing.
          example: domains
      type: object
      required:
        - success
        - message
      title: SEOFixResult
      description: What one fix action did.
  securitySchemes:
    PersonalAccessTokenAuth:
      type: http
      scheme: bearer
      description: 'Personal access token, sent as `Authorization: Bearer <token>`.'

````