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

# Attach evidence to a rule result

> Attach evidence to a rule result, satisfying an evidence rule.

Send the field that matches the rule's `evidenceType`: `storageUri` for an uploaded document,
`text` for a written statement, or `url` for a link.

For a document, upload the file first with `POST /storage/presigned-url` and send the resulting
storage URI as `storageUri`.

Attaching evidence re-evaluates the rule result. If the rule sets `renewalCadenceDays`, the
renewal window restarts from this evidence.




## OpenAPI

````yaml post /rule-results/{ruleResultId}/evidence
openapi: 3.0.3
info:
  contact:
    email: support@openlayer.com
    name: Openlayer
    url: https://openlayer.com/
  description: API for interacting with the Openlayer server.
  title: Openlayer API
  version: '1.0'
  x-logo:
    url: https://logo.clearbit.com/openlayer.com
servers:
  - url: https://api.openlayer.com/v1
    description: Our prod backend
security:
  - bearerAuth: []
paths:
  /rule-results/{ruleResultId}/evidence:
    post:
      tags:
        - Governance
      summary: Attach evidence to a rule result
      description: >
        Attach evidence to a rule result, satisfying an evidence rule.


        Send the field that matches the rule's `evidenceType`: `storageUri` for
        an uploaded document,

        `text` for a written statement, or `url` for a link.


        For a document, upload the file first with `POST /storage/presigned-url`
        and send the resulting

        storage URI as `storageUri`.


        Attaching evidence re-evaluates the rule result. If the rule sets
        `renewalCadenceDays`, the

        renewal window restarts from this evidence.
      operationId: createRuleResultEvidence
      parameters:
        - $ref: '#/components/parameters/ruleResultId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name: 4eaf19e1-3240-4c40-9817-2254bbf5edd1
                description: 6a4da2d1-1096-492e-af90-8e714f3dc9ee
                storageUri: 514eefd9-b021-42c9-9afa-1fa850f48525
                text: 2672d3cd-c346-4bcb-9f6f-0d8d0bb44d6c
                url: ffc98973-1247-43a2-90fd-18ed684aa662
      responses:
        '201':
          description: Evidence created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Evidence'
        default:
          $ref: '#/components/responses/UnexpectedError'
      x-codeSamples:
        - lang: curl
          source: |
            curl --request POST \
              --url https://api.openlayer.com/v1/rule-results/2c4e6a8b-1d3f-4b5c-9e7a-0f1b2c3d4e5f/evidence \
              --header 'Authorization: Bearer <token>' \
              --header 'Content-Type: application/json' \
              --data '{
                "name": "2026 model risk review",
                "description": "Signed off by the risk committee.",
                "url": "https://example.com/reviews/2026-model-risk.pdf"
              }'
components:
  parameters:
    ruleResultId:
      name: ruleResultId
      in: path
      description: The rule result id.
      required: true
      schema:
        type: string
        format: uuid
  schemas:
    Evidence:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
          description: The evidence id.
        name:
          type: string
          nullable: true
          maxLength: 120
          description: The evidence name.
          example: Model risk assessment 2026
        description:
          type: string
          nullable: true
          description: A description of what the evidence shows.
        storageUri:
          type: string
          nullable: true
          description: >
            Where the uploaded file is stored. Set when the rule's
            `evidenceType` is `document`.
          example: s3://openlayer-evidence/evidence.pdf
        text:
          type: string
          nullable: true
          description: The evidence text. Set when the rule's `evidenceType` is `text`.
        url:
          type: string
          format: uri
          nullable: true
          description: A link to the evidence. Set when the rule's `evidenceType` is `url`.
          example: https://openlayer.com/evidence
        creatorId:
          type: string
          format: uuid
          nullable: true
          readOnly: true
          description: The user who attached the evidence.
        dateCreated:
          type: string
          format: date-time
          readOnly: true
          description: The creation date.
          example: '2026-03-22T11:31:01.185Z'
        dateUpdated:
          type: string
          format: date-time
          readOnly: true
          description: The last update date.
          example: '2026-03-22T11:31:01.185Z'
      required:
        - id
        - creatorId
        - dateCreated
        - dateUpdated
  responses:
    UnexpectedError:
      description: Unexpected error.
      content:
        application/json:
          schema:
            type: object
            required:
              - code
              - error
            properties:
              code:
                type: integer
                format: int32
              error:
                type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is your workspace API key. See [Find your API
        key](https://www.openlayer.com/docs/workspace-and-projects/find-your-api-key)
        for more information.

````