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

# Seed test data

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

Fills the app's test data with sample records for the testing agent to work with. A run on the app's preview uses test data, and [Run test](/api-reference/run-test) seeds it when such a run starts, so call this only to refresh the test data yourself.

For each entity other than `User`:

- When the entity has live records, up to 5 copies of them are written to test data, including any personal details they hold. Live data is only read, never changed.
- Otherwise, for up to 5 such entities, AI makes up to 3 records each from the entity's schema. This is skipped for an entity whose test data has records someone added by hand, and for an entity with no schema fields.

New records replace the ones an earlier seed wrote. Test records someone added by hand are kept.

Copying is free. Making up records costs credits, and the call is refused when it needs to make some up and the workspace is out of credits, though records already copied are kept. It runs while you wait, usually for 20 to 45 seconds and up to a few minutes on an app with many entities, so allow a long timeout. Seeds of one app run one at a time. A call made while another is running waits for it and then usually seeds again, replacing what the first one wrote and charging again for any AI-made records. If the wait runs too long, it gives up and reports no records written.

This is limited to 30 requests per minute per caller for each app. Some workspaces have a different limit.

<Note>This endpoint accepts a personal API key belonging to a user with editor access to the app. Read-only keys and workspace API keys are refused.</Note>

<Warning>The response includes fields beyond the ones documented here. Don't rely on undocumented response fields, as they can change at any time.</Warning>



## OpenAPI

````yaml /developers/references/app-management/app-management-openapi.json post /api/apps/{app_id}/testing-agent/data/seed
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}/testing-agent/data/seed:
    post:
      summary: Seed test data
      description: >-
        <Info>This API is in beta. Endpoints, fields, and behavior may still
        change, so avoid depending on it in production.</Info>


        Fills the app's test data with sample records for the testing agent to
        work with. A run on the app's preview uses test data, and [Run
        test](/api-reference/run-test) seeds it when such a run starts, so call
        this only to refresh the test data yourself.


        For each entity other than `User`:


        - When the entity has live records, up to 5 copies of them are written
        to test data, including any personal details they hold. Live data is
        only read, never changed.

        - Otherwise, for up to 5 such entities, AI makes up to 3 records each
        from the entity's schema. This is skipped for an entity whose test data
        has records someone added by hand, and for an entity with no schema
        fields.


        New records replace the ones an earlier seed wrote. Test records someone
        added by hand are kept.


        Copying is free. Making up records costs credits, and the call is
        refused when it needs to make some up and the workspace is out of
        credits, though records already copied are kept. It runs while you wait,
        usually for 20 to 45 seconds and up to a few minutes on an app with many
        entities, so allow a long timeout. Seeds of one app run one at a time. A
        call made while another is running waits for it and then usually seeds
        again, replacing what the first one wrote and charging again for any
        AI-made records. If the wait runs too long, it gives up and reports no
        records written.


        This is limited to 30 requests per minute per caller for each app. Some
        workspaces have a different limit.


        <Note>This endpoint accepts a personal API key belonging to a user with
        editor access to the app. Read-only keys and workspace API keys are
        refused.</Note>


        <Warning>The response includes fields beyond the ones documented here.
        Don't rely on undocumented response fields, as they can change at any
        time.</Warning>
      operationId: seed_data_api_apps__app_id__testing_agent_data_seed_post
      parameters:
        - name: app_id
          in: path
          required: true
          schema:
            type: string
            description: ID of the app.
            title: App Id
          description: ID of the app.
          example: 6820f3a4e7b91d003c45a1f2
      responses:
        '200':
          description: What was written into the app's test data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SeededTestData'
        '400':
          description: >-
            Some entities need AI-made records and the workspace is out of
            credits.
        '401':
          description: Missing or invalid credentials.
        '403':
          description: >-
            You don't have editor access to this app, the app is blocked, or
            your API key is read-only or a workspace API key.
        '404':
          description: App not found.
        '409':
          description: Your workspace requires an unlocked SSO session.
        '429':
          description: Rate limit exceeded.
components:
  schemas:
    SeededTestData:
      properties:
        seeded:
          additionalProperties:
            type: integer
          type: object
          title: Seeded
          description: >-
            Records written for each entity, keyed by entity name. `0` when
            nothing was written.
          example:
            Project: 5
            Task: 3
        total:
          type: integer
          title: Total
          description: Records written across all entities.
          example: 8
        generated_total:
          type: integer
          title: Generated Total
          description: >-
            How many of the records were made up by AI rather than copied from
            live data.
          example: 3
        entities_with_data:
          type: integer
          title: Entities With Data
          description: Entities that got records, or whose own test records were kept.
          example: 2
        entities_without_prod_data:
          items:
            type: string
          type: array
          title: Entities Without Prod Data
          description: >-
            Entities that got nothing copied from live data and didn't report an
            error. When this call gave up waiting for another seed of the app,
            every entity is listed.
          example:
            - Task
        entities_with_errors:
          items:
            type: string
          type: array
          title: Entities With Errors
          description: >-
            Entities whose seeding reported an error, for example because
            generating records timed out. An entity whose record writes all
            failed isn't listed. Its `seeded` count is `0`.
          example: []
      type: object
      required:
        - seeded
        - total
        - generated_total
        - entities_with_data
        - entities_without_prod_data
        - entities_with_errors
      title: SeededTestData
      description: What a seed wrote into the app's test data.
  securitySchemes:
    PersonalAccessTokenAuth:
      type: http
      scheme: bearer
      description: 'Personal access token, sent as `Authorization: Bearer <token>`.'

````

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