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

# Put v1datasets assertions



## OpenAPI

````yaml /api/openapi.json put /v1/datasets/{datasetSlug}/assertions/{assertionSlug}
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/{assertionSlug}:
    put:
      operationId: PUT:mcp.SetDatasetAssertionAPI
      parameters:
        - allowEmptyValue: true
          explode: false
          in: path
          name: datasetSlug
          required: true
          schema:
            type: string
          style: simple
        - allowEmptyValue: true
          explode: false
          in: path
          name: assertionSlug
          required: true
          schema:
            type: string
          style: simple
      requestBody:
        content:
          application/json:
            schema:
              properties:
                description:
                  type: string
                expected_version:
                  description: >
                    assertion is still that version (0 means it must not exist
                    yet).
                  format: int32
                  maximum: 2147483647
                  minimum: -2147483648
                  title: >
                    ExpectedVersion, when set, applies the change only if the
                    active
                  type: integer
                key_column:
                  type: string
                severity:
                  type: string
                sql:
                  type: string
                template:
                  $ref: '#/components/schemas/dataset.DatasetAssertionTemplate'
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  assertion:
                    $ref: '#/components/schemas/dataset.DatasetAssertion'
                type: object
          description: Success response
        default:
          $ref: '#/components/responses/APIError'
components:
  schemas:
    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
    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
    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
  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.