> ## 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/artifacts/report-artifact",
  "feedback": "Description of the issue"
}
```

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

</AgentInstructions>

# Report artifact

> Create an artifact for organization.



## OpenAPI

````yaml https://app.kosli.com/api/v2/openapi.json post /artifacts/{org}/{flow_name}
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:
  /artifacts/{org}/{flow_name}:
    post:
      tags:
        - Artifacts
      summary: Report artifact
      description: Create an artifact for organization.
      operationId: create_artifact_artifacts__org___flow_name__post
      parameters:
        - name: flow_name
          in: path
          required: true
          schema:
            type: string
            title: Flow Name
        - name: org
          in: path
          required: true
          schema:
            type: string
            title: Org
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateArtifact'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema: {}
      security:
        - HTTPBearer: []
        - HTTPBasic: []
components:
  schemas:
    CreateArtifact:
      properties:
        trail_name:
          anyOf:
            - type: string
              pattern: ^[a-zA-Z0-9][a-zA-Z0-9\-_.~]*$
            - type: 'null'
          title: Trail Name
        template_reference_name:
          anyOf:
            - type: string
              pattern: ^[a-zA-Z0-9\-_]+$
            - type: 'null'
          title: Template Reference Name
        fingerprint:
          type: string
          pattern: ^[a-f0-9]{64}$
          title: Fingerprint
        filename:
          type: string
          title: Filename
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        git_commit:
          anyOf:
            - type: string
              pattern: ^[a-f0-9]{40}$
            - type: 'null'
          title: Git Commit
        git_commit_info:
          anyOf:
            - $ref: '#/components/schemas/GitCommit'
            - type: 'null'
        repo_info:
          anyOf:
            - $ref: '#/components/schemas/RepoInfoPostInput'
            - type: 'null'
        commits_list:
          anyOf:
            - items:
                $ref: '#/components/schemas/GitCommit'
              type: array
            - type: 'null'
          title: Commits List
        repo_url:
          anyOf:
            - type: string
            - type: string
              const: ''
            - type: 'null'
          title: Repo Url
        is_compliant:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Compliant
        build_url:
          type: string
          title: Build Url
        commit_url:
          type: string
          title: Commit Url
        template:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
            - type: 'null'
          title: Template
        external_urls:
          anyOf:
            - patternProperties:
                ^[^=.]+$:
                  $ref: '#/components/schemas/ExternalAttachmentUrl'
              type: object
            - type: 'null'
          title: External Urls
        annotations:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Annotations
        user_data:
          anyOf:
            - additionalProperties: true
              type: object
            - items: {}
              type: array
            - type: 'null'
          title: User Data
      type: object
      required:
        - fingerprint
        - filename
        - build_url
        - commit_url
      title: CreateArtifact
    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

````