> ## 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.

> ## Agent Instructions
> Internal links on these pages omit the .md extension. Append .md to a docs page URL, or send an Accept: text/markdown header, to get that page as markdown.

# 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`.

The [fix actions](/developers/references/apps-api/sections/seo#fix-actions) fall into three groups. Some change the app's SEO settings, some change the app itself, and the rest change nothing and point you to the app editor screen where you make the fix. An action that changes settings replaces the value it sets, including a value someone edited by hand. The exception is `generate_page_meta` with `overwrite_existing` set to `false` in `params`, as the scan sends it: it keeps page titles and descriptions someone wrote by hand.

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.

A successful call means the change is saved. The live site can take a little while to catch up.

<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`.


        The [fix
        actions](/developers/references/apps-api/sections/seo#fix-actions) fall
        into three groups. Some change the app's SEO settings, some change the
        app itself, and the rest change nothing and point you to the app editor
        screen where you make the fix. An action that changes settings replaces
        the value it sets, including a value someone edited by hand. The
        exception is `generate_page_meta` with `overwrite_existing` set to
        `false` in `params`, as the scan sends it: it keeps page titles and
        descriptions someone wrote by hand.


        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.


        A successful call means the change is saved. The live site can take a
        little while to catch up.


        <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
                    [Run SEO scan](/api-reference/run-seo-scan) or [Get last SEO
                    scan](/api-reference/get-last-seo-scan). See [Fix
                    actions](/developers/references/apps-api/sections/seo#fix-actions)
                    for what each one does.
                  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 this one refuses a read-only
            credential.
        '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 for
            each app, counted across the workspace rather than per caller, and
            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.
      security:
        - PersonalAccessTokenAuth:
            - full_access
components:
  schemas:
    SEOFixResponse:
      properties:
        result:
          $ref: '#/components/schemas/SEOFixResult'
          description: Outcome of the action.
      type: object
      required:
        - result
      title: SEOFixResponse
    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: Summary of the outcome, 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: >-
            App editor screen where the app's owner makes this fix, either
            `"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>`. Each
        operation lists the permission it needs: `read_only` or `full_access`. A
        full-access token can call every operation. A read-only token can call
        only the operations that list `read_only`; anything else returns 403
        `read_only_credential_route_not_allowed`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.