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

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:
              $ref: '#/components/schemas/FixRequest'
            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, or your token or key is
            read-only. These endpoints accept a personal access token or a
            workspace API key, 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.
        '503':
          description: >-
            Database temporarily unavailable (`database_unavailable`): the data
            cluster did not answer in time. Retry after the `Retry-After`
            seconds.
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
              examples:
                database_unavailable:
                  summary: database_unavailable
                  value:
                    error:
                      code: database_unavailable
                      message: Database temporarily unavailable, please retry
                      details: {}
      security:
        - PersonalAccessTokenAuth:
            - full_access
        - WorkspaceApiKeyAuth:
            - full_access
        - WorkspaceApiKeyBearerAuth:
            - full_access
components:
  schemas:
    FixRequest:
      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
          title: Fix Type
          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:
          additionalProperties: true
          type: object
          title: Params
          description: >-
            Arguments for the action, the `params` of the same `fix_action`,
            sent as they are. Defaults to an empty object.
          default: {}
          example: {}
      type: object
      required:
        - fix_type
      title: FixRequest
    SEOFixResponse:
      properties:
        result:
          $ref: '#/components/schemas/SEOFixResult'
          description: Outcome of the action.
      type: object
      required:
        - result
      title: SEOFixResponse
    StandardErrorEnvelope:
      properties:
        error:
          $ref: '#/components/schemas/StandardError'
          description: What went wrong.
      type: object
      required:
        - error
      title: StandardErrorEnvelope
      description: The error body returned in the standard envelope.
    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.
    StandardError:
      properties:
        code:
          type: string
          title: Code
          description: >-
            Stable machine-readable cause of the failure. Match on this, not on
            `message`.
          example: not_found
        message:
          type: string
          title: Message
          description: Human-readable explanation. It isn't a stable contract.
          example: App not found
        details:
          additionalProperties: true
          type: object
          title: Details
          description: >-
            Structured context for the failure, or an empty object when there's
            none.
          example: {}
      type: object
      required:
        - code
        - message
      title: StandardError
  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`.
    WorkspaceApiKeyAuth:
      type: apiKey
      in: header
      name: api_key
      description: >-
        Workspace API key, sent as `api_key: <key>`. Each operation that accepts
        one lists what the key needs: a permission, `read_only` or
        `full_access`, like a personal access token, or a scope. A key without
        the scope gets 403 `workspace_api_key_scope_required`.
    WorkspaceApiKeyBearerAuth:
      type: http
      scheme: bearer
      description: >-
        Workspace API key, sent as `Authorization: Bearer <key>`. Accepted
        wherever `api_key` is, with the same permission.

````

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