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

# Post v1datasets assertionsrun



## OpenAPI

````yaml /api/openapi.json post /v1/datasets/{datasetSlug}/assertions/run
openapi: 3.0.0
info:
  title: Erdo API
  description: >-
    Erdo's REST API: query and write datasets, run agents, manage threads,
    integrations, pages, evals, workstreams, experiments, and bounded outreach.
    Authenticate with a Bearer API key (erdo_api_...) or scoped token
    (erdo_token_...).
  version: '2026-11-21'
servers:
  - url: https://api.erdo.ai
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/datasets/{datasetSlug}/assertions/run:
    post:
      operationId: POST:mcp.RunDatasetAssertionsAPI
      parameters:
        - allowEmptyValue: true
          explode: false
          in: path
          name: datasetSlug
          required: true
          schema:
            type: string
          style: simple
      requestBody:
        content:
          application/json:
            schema:
              properties:
                slugs:
                  items:
                    type: string
                  type: array
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  assertions:
                    items:
                      $ref: '#/components/schemas/dataset.DatasetAssertion'
                    type: array
                  dataset_slug:
                    type: string
                  evaluated_generation:
                    format: int64
                    type: integer
                  summary:
                    $ref: '#/components/schemas/types.DatasetAssertionSummary'
                  write_generation:
                    format: int64
                    type: integer
                type: object
          description: Success response
        default:
          $ref: '#/components/responses/APIError'
components:
  schemas:
    dataset.DatasetAssertion:
      properties:
        created_at:
          format: date-time
          type: string
        description:
          type: string
        key_column:
          type: string
        reader_state:
          type: string
        result:
          $ref: '#/components/schemas/dataset.DatasetAssertionResult'
        severity:
          type: string
        slug:
          type: string
        sql:
          type: string
        stale:
          type: boolean
        status:
          type: string
        template:
          $ref: '#/components/schemas/dataset.DatasetAssertionTemplate'
        updated_at:
          format: date-time
          type: string
        version:
          format: int32
          maximum: 2147483647
          minimum: -2147483648
          type: integer
      type: object
    types.DatasetAssertionSummary:
      description: >
        count in both Failing and Stale, so a stale read never hides a known
        failure.
      properties:
        could_not_run:
          format: int64
          type: integer
        could_not_run_slugs:
          items:
            type: string
          type: array
        failing:
          format: int64
          type: integer
        failing_slugs:
          items:
            type: string
          type: array
        passing:
          format: int64
          type: integer
        stale:
          format: int64
          type: integer
        unchecked:
          format: int64
          type: integer
      title: >
        DatasetAssertionSummary counts current reader states. Stale failing
        results
      type: object
    dataset.DatasetAssertionResult:
      properties:
        assertion_version:
          format: int32
          maximum: 2147483647
          minimum: -2147483648
          type: integer
        data_generation:
          format: int64
          type: integer
        duration_ms:
          format: int64
          type: integer
        episode_opened_at:
          format: date-time
          type: string
        evaluated_at:
          format: date-time
          type: string
        failing_count:
          format: int64
          type: integer
        reason:
          type: string
        samples:
          type: object
        state:
          type: string
      type: object
    dataset.DatasetAssertionTemplate:
      properties:
        column:
          type: string
        columns:
          items:
            type: string
          type: array
        kind:
          type: string
        max:
          type: number
        min:
          type: number
        predicate:
          type: string
        values:
          items:
            type: object
          type: array
        where:
          type: string
      title: >
        DatasetAssertionTemplate describes rows that must satisfy one table
        rule.
      type: object
  responses:
    APIError:
      content:
        application/json:
          schema:
            externalDocs:
              url: https://pkg.go.dev/encore.dev/beta/errs#Error
            properties:
              code:
                description: Error code
                example: not_found
                externalDocs:
                  url: https://pkg.go.dev/encore.dev/beta/errs#ErrCode
                type: string
              details:
                description: Error details
                type: object
              message:
                description: Error message
                type: string
            title: APIError
            type: object
      description: Error response
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: An Erdo API key (erdo_api_...) or scoped token (erdo_token_...).

````

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