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

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.kosli.com/feedback

```json
{
  "path": "/api-reference/attestation/override-attestation",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# Override attestation

> Override an attestation in a trail.



## OpenAPI

````yaml https://app.kosli.com/api/v2/openapi.json post /attestations/{org}/{flow_name}/trail/{trail_name}/override
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}/override:
    post:
      tags:
        - Attestation
      summary: Override attestation
      description: Override an attestation in a trail.
      operationId: >-
        post_override_attestation_attestations__org___flow_name__trail__trail_name__override_post
      parameters:
        - name: flow_name
          in: path
          required: true
          schema:
            type: string
            title: Flow Name
        - name: trail_name
          in: path
          required: true
          schema:
            type: string
            title: Trail Name
        - name: org
          in: path
          required: true
          schema:
            type: string
            title: Org
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OverrideAttestationPostInput'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '201':
          description: Creation Success
        '400':
          description: Validation Error
        '404':
          description: Not Found
      security:
        - HTTPBearer: []
        - HTTPBasic: []
components:
  schemas:
    OverrideAttestationPostInput:
      properties:
        attestation_name:
          type: string
          pattern: ^[a-zA-Z0-9\-_,]+$
          title: Attestation Name
        origin_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Origin Url
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        artifact_fingerprint:
          anyOf:
            - type: string
              pattern: ^[a-f0-9]{64}$
            - type: 'null'
          title: Artifact Fingerprint
        target_artifacts:
          anyOf:
            - items:
                type: string
                pattern: ^[a-zA-Z0-9\-_,]+$
              type: array
            - type: 'null'
          title: Target Artifacts
        git_commit_info:
          anyOf:
            - $ref: '#/components/schemas/GitCommit'
            - type: 'null'
        repo_info:
          anyOf:
            - $ref: '#/components/schemas/RepoInfoPostInput'
            - type: 'null'
        external_urls:
          anyOf:
            - patternProperties:
                ^[^=.]+$:
                  $ref: '#/components/schemas/ExternalAttachmentUrl'
              type: object
            - type: 'null'
          title: External Urls
        annotations:
          anyOf:
            - patternProperties:
                ^[A-Za-z0-9_-]+$:
                  type: string
              type: object
            - type: 'null'
          title: Annotations
        user_data:
          anyOf:
            - additionalProperties: true
              type: object
            - items: {}
              type: array
            - type: 'null'
          title: User Data
        reason:
          type: string
          title: Reason
        new_compliance_status:
          type: boolean
          title: New Compliance Status
        original_attestation_type:
          anyOf:
            - type: string
              enum:
                - generic
                - junit
                - snyk
                - pull_request
                - jira
                - sonar
            - type: string
              pattern: ^custom:.*$
          title: Original Attestation Type
      additionalProperties: false
      type: object
      required:
        - attestation_name
        - reason
        - new_compliance_status
        - original_attestation_type
      title: OverrideAttestationPostInput
    GitCommit:
      properties:
        sha1:
          type: string
          title: Sha1
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
        author:
          anyOf:
            - type: string
            - type: 'null'
          title: Author
        author_username:
          anyOf:
            - type: string
            - type: 'null'
          title: Author Username
        branch:
          anyOf:
            - type: string
            - type: 'null'
          title: Branch
        timestamp:
          anyOf:
            - type: number
            - type: 'null'
          title: Timestamp
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
        parents:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Parents
      type: object
      required:
        - sha1
      title: GitCommit
    RepoInfoPostInput:
      properties:
        name:
          type: string
          title: Name
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
        url:
          type: string
          title: Url
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        provider:
          anyOf:
            - type: string
              enum:
                - github
                - gitlab
                - bitbucket
                - azure-devops
                - circleci
            - type: 'null'
          title: Provider
      type: object
      required:
        - name
        - url
      title: RepoInfoPostInput
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````