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

# Attest system

> Add a system attestation to a trail.



## OpenAPI

````yaml https://app.kosli.com/api/v2/openapi.json post /attestations/{org}/{flow_name}/trail/{trail_name}/system
openapi: 3.1.0
info:
  title: Kosli API
  summary: The API for communicating with Kosli
  description: >

    # Authentication 


    When making requests against Kosli API, you can authenticate your requests
    using a bearer token. 

    Set the bearer token in the request Authorization header to a valid API
    key. 

    API Keys can be personal or for service accounts. Check the [service
    accounts
    documentation](https://docs.kosli.com/getting_started/service-accounts/) for
    details. 


    ## Curl example


    ```shell

    curl -H "Authorization: Bearer <<your-api-key>>"
    https://app.kosli.com/api/v2/environments/<<your-org-name>>

    ```
  version: '2.0'
servers:
  - url: https://app.kosli.com/api/v2
    description: EU
  - url: https://app.us.kosli.com/api/v2
    description: US
security:
  - HTTPBearer: []
paths:
  /attestations/{org}/{flow_name}/trail/{trail_name}/system:
    post:
      tags:
        - Attestation
      summary: Attest system
      description: Add a system attestation to a trail.
      operationId: attest_system
      parameters:
        - name: flow_name
          in: path
          required: true
          schema:
            type: string
            pattern: ^[a-zA-Z0-9][a-zA-Z0-9\.\-_~]*$
            title: Flow Name
            description: Name of a flow in the org
          description: Name of a flow in the org
        - name: trail_name
          in: path
          required: true
          schema:
            type: string
            pattern: ^[a-zA-Z0-9][a-zA-Z0-9\.\-_~]*$
            title: Trail Name
            description: Name of a trail in the flow
          description: Name of a trail in the flow
        - name: org
          in: path
          required: true
          schema:
            type: string
            title: Org
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Body_attest_system'
      responses:
        '201':
          description: Creation Success
          content:
            application/json:
              schema:
                type: string
                title: Response 201 Attest System
        '400':
          description: Validation Error
        '404':
          description: Not Found
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              example:
                message: Unprocessable Entity
              schema:
                $ref: '#/components/schemas/UnprocessableEntityResponseModel'
      security:
        - HTTPBearer: []
        - HTTPBasic: []
components:
  schemas:
    Body_attest_system:
      properties:
        data_json:
          type: string
          contentMediaType: application/json
          contentSchema:
            $ref: '#/components/schemas/SystemAttestationPostInput'
          title: Data Json
          description: Attestation data in JSON format
        attachment_file:
          anyOf:
            - type: string
              contentMediaType: application/octet-stream
            - type: 'null'
          title: Attachment File
          description: 'Optional attachment file (max size: 10MB)'
      type: object
      required:
        - data_json
      title: Body_attest_system
    UnprocessableEntityResponseModel:
      properties:
        message:
          type: string
          title: Message
          description: Error message
        errors:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Errors
          description: Validation errors by field
      type: object
      required:
        - message
      title: UnprocessableEntityResponseModel
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````

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