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

# Create a set of test situations

> Stores the situations a run will replay, with what the worker is expected to do in each. Send the cases with the set: a run against a half-written set reports a score over whichever cases happened to land, and nothing downstream can tell that from a complete set that scored badly.



## OpenAPI

````yaml /api/statisfy-api.openapi.json post /v1/evaluations/case_sets
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/evaluations/case_sets:
    post:
      tags:
        - evaluations
      summary: Create a set of test situations
      description: >-
        Stores the situations a run will replay, with what the worker is
        expected to do in each. Send the cases with the set: a run against a
        half-written set reports a score over whichever cases happened to land,
        and nothing downstream can tell that from a complete set that scored
        badly.
      operationId: evaluations_create_case_set
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              properties:
                cases:
                  description: >-
                    Sent with the set rather than appended after, so a run can
                    never score a half-written set.
                  items:
                    $ref: '#/components/schemas/CaseInput'
                  maxItems: 200
                  title: Cases
                  type: array
                description:
                  anyOf:
                    - maxLength: 2000
                      type: string
                    - type: 'null'
                  default: null
                  title: Description
                mode:
                  description: >-
                    `proactive` tests whether the worker reaches out unprompted;
                    `reactive` tests its replies.
                  enum:
                    - reactive
                    - proactive
                  title: Mode
                  type: string
                name:
                  maxLength: 200
                  minLength: 1
                  title: Name
                  type: string
                worker_id:
                  description: The worker being evaluated.
                  title: Worker Id
                  type: string
              required:
                - worker_id
                - name
                - mode
              type: object
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CaseSet'
          description: Successful Response
      security:
        - HTTPBearer: []
components:
  schemas:
    CaseInput:
      additionalProperties: false
      description: One situation, and what the worker is expected to do with it.
      properties:
        contact_people_id:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: The contact in play, when there is one.
          title: Contact People Id
        customer_id:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: The account this situation concerns.
          title: Customer Id
        expected:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          default: null
          description: >-
            What good looks like, which is what the run is scored against.
            Proactive: {"should_act": true, "rationale": "quiet 60 days, renewal
            in March"}. Reactive: {"label": "answerable", "reference_answer":
            "..."} — `answerable` when the worker should reply itself,
            `deferral` when it should hand the thread to a human.
          title: Expected
        payload:
          additionalProperties: true
          description: >-
            The situation. Proactive: the account's state and the date it was
            taken, e.g. {"as_of": "2026-10-13", "account_state": {...}}.
            Reactive: the message the worker has to answer and who sent it, e.g.
            {"message": "Our dashboards stopped refreshing after the upgrade —
            is this a known issue?", "sender_name": "Priya"}. A reactive case
            may add `context`, what the app the person is signed in to says
            about them (the in-app SDK token's `context` claim), so the run
            answers as it would for them, e.g. "context": {"user_type":
            "Corporate non-administrator"}: up to 20 keys, each a short value or
            a short list. A reactive case without a message, or with a context
            the run could not use as written, is refused at preflight.
          title: Payload
          type: object
        source_activity_id:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: >-
            The real thread this was taken from. Worth setting: a case nobody
            can trace is a case nobody trusts.
          title: Source Activity Id
      title: CaseInput
      type: object
    CaseSet:
      properties:
        case_count:
          default: 0
          title: Case Count
          type: integer
        cases:
          items:
            $ref: '#/components/schemas/Case'
          title: Cases
          type: array
        created_at:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            When the situations were written. Read it before trusting an old
            set's numbers: a run reads each account as it is today, so a set
            written weeks ago may be scored against a world that has moved.
          title: Created At
        created_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Created By
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        id:
          title: Id
          type: string
        mode:
          title: Mode
          type: string
        name:
          title: Name
          type: string
        worker_id:
          title: Worker Id
          type: string
      required:
        - id
        - worker_id
        - name
        - mode
      title: CaseSet
      type: object
    Case:
      properties:
        contact_people_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Contact People Id
        customer_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Customer Id
        expected:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Expected
        id:
          title: Id
          type: string
        payload:
          additionalProperties: true
          title: Payload
          type: object
        source_activity_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Activity Id
      required:
        - id
      title: Case
      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.