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

# Test draft health guidance on accounts

> Rates 1 to 50 accounts with the draft guidance (the saved guidance with the pillars sent changed) and pairs each result with the account's stored health. Saves nothing: change the guidance with PATCH /v1/settings/health. Answers 202 at once; each account takes about a minute, so poll GET /v1/settings/health/tests/{test_id} until status is done or failed. Counts as one write per account against the key's rate limit, at least 10 (50 for a view). Needs a plan that has account health.



## OpenAPI

````yaml /api/statisfy-api.openapi.json post /v1/settings/health/tests
openapi: 3.1.0
info:
  description: >-
    The agent-first Statisfy API. Authenticate with an API key (`Authorization:
    Bearer stfy_live_…`), then call `GET /v1/meta/capabilities` to discover
    every operation and its schemas.
  title: Statisfy API
  version: 1.0.0
servers:
  - url: https://api.statisfy.com
    description: Production
security: []
paths:
  /v1/settings/health/tests:
    post:
      tags:
        - settings
      summary: Test draft health guidance on accounts
      description: >-
        Rates 1 to 50 accounts with the draft guidance (the saved guidance with
        the pillars sent changed) and pairs each result with the account's
        stored health. Saves nothing: change the guidance with PATCH
        /v1/settings/health. Answers 202 at once; each account takes about a
        minute, so poll GET /v1/settings/health/tests/{test_id} until status is
        done or failed. Counts as one write per account against the key's rate
        limit, at least 10 (50 for a view). Needs a plan that has account
        health.
      operationId: settings_health_tests_start
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              properties:
                account_ids:
                  anyOf:
                    - items:
                        type: string
                      maxItems: 50
                      minItems: 1
                      type: array
                    - type: 'null'
                  default: null
                  description: The accounts to test, 1 to 50
                  title: Account Ids
                instructions:
                  $ref: '#/components/schemas/InstructionChanges'
                  description: >-
                    The draft, over the saved guidance: the test runs the saved
                    guidance with these pillars changed
                view_id:
                  anyOf:
                    - minimum: 1
                      type: integer
                    - type: 'null'
                  default: null
                  description: >-
                    Or a saved account view (GET /v1/views) that selects 1 to 50
                    accounts
                  title: View Id
              required:
                - instructions
              type: object
        required: true
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HealthTest'
          description: Successful Response
      security:
        - HTTPBearer: []
components:
  schemas:
    InstructionChanges:
      additionalProperties: false
      description: >-
        Only the pillars sent change. A pillar left out keeps its saved
        guidance.
      properties:
        experience:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: New guidance for experience; null or blank removes it
          title: Experience
        featureRequests:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: New guidance for feature requests; null or blank removes it
          title: Featurerequests
        outcomes:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: New guidance for outcomes; null or blank removes it
          title: Outcomes
        overallHealth:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: New guidance for the overall health; null or blank removes it
          title: Overallhealth
        productUsage:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: New guidance for product usage; null or blank removes it
          title: Productusage
        relationship:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: New guidance for the relationship; null or blank removes it
          title: Relationship
        risks:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: New guidance for risks; null or blank removes it
          title: Risks
      title: InstructionChanges
      type: object
    HealthTest:
      properties:
        accounts_done:
          title: Accounts Done
          type: integer
        accounts_total:
          title: Accounts Total
          type: integer
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
        finished_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Finished At
        id:
          title: Id
          type: string
        instructions:
          additionalProperties:
            anyOf:
              - type: string
              - type: 'null'
          description: 'The draft tested, by pillar; null: guidance removed'
          title: Instructions
          type: object
        results:
          description: One per account that has finished, in the test's account order
          items:
            $ref: '#/components/schemas/HealthTestAccount'
          title: Results
          type: array
        started_at:
          format: date-time
          title: Started At
          type: string
        status:
          description: >-
            queued, then running; done when every account has a result; failed
            when the run broke, or when it has not ended an hour after it
            started
          enum:
            - queued
            - running
            - done
            - failed
          title: Status
          type: string
      required:
        - id
        - status
        - instructions
        - accounts_total
        - accounts_done
        - error
        - started_at
        - finished_at
        - results
      title: HealthTest
      type: object
    HealthTestAccount:
      properties:
        account:
          title: Account
          type: string
        error:
          anyOf:
            - type: string
            - type: 'null'
          description: Why the account has no updated health; null when it has
          title: Error
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        pillars:
          items:
            $ref: '#/components/schemas/HealthTestPillar'
          title: Pillars
          type: array
      required:
        - account
        - name
        - error
        - pillars
      title: HealthTestAccount
      type: object
    HealthTestPillar:
      properties:
        changed:
          description: The 7-point rating differs between current and updated
          title: Changed
          type: boolean
        current:
          anyOf:
            - $ref: '#/components/schemas/HealthValue'
            - type: 'null'
          description: 'The account''s stored health now (/v1/health?latest); null: none'
        pillar:
          title: Pillar
          type: string
        updated:
          anyOf:
            - $ref: '#/components/schemas/HealthValue'
            - type: 'null'
          description: The health the draft gives; null when the account was not assessed
      required:
        - pillar
        - current
        - updated
        - changed
      title: HealthTestPillar
      type: object
    HealthValue:
      properties:
        confidence:
          anyOf:
            - type: number
            - type: 'null'
          title: Confidence
        health:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The label, as /v1/health returns it; null when the AI had too little
            data
          title: Health
        level:
          anyOf:
            - type: string
            - type: 'null'
          description: The 7-point rating; null when the AI had too little data
          title: Level
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
      required:
        - health
        - level
        - confidence
        - reason
      title: HealthValue
      type: object
  securitySchemes:
    HTTPBearer:
      scheme: bearer
      type: http
      description: >-
        An API key, sent as `Authorization: Bearer stfy_live_…`. See
        [Authentication](/rest-api/authentication) for how to get one and which
        scopes it needs.

````

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