> ## 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/allowlists/allow-artifact-for-environment",
  "feedback": "Description of the issue"
}
```

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

</AgentInstructions>

# Allow artifact for environment

> Allow an artifact for an environment.



## OpenAPI

````yaml https://app.kosli.com/api/v2/openapi.json put /allowlists/{org}/{env_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:
  /allowlists/{org}/{env_name}:
    put:
      tags:
        - Allowlists
      summary: Allow artifact for environment
      description: Allow an artifact for an environment.
      operationId: allow_artifact_for_env_allowlists__org___env_name__put
      parameters:
        - name: env_name
          in: path
          required: true
          schema:
            type: string
            title: Env Name
        - name: org
          in: path
          required: true
          schema:
            type: string
            title: Org
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AllowlistPutInput'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllowlistPutInput'
        '400':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/fastapi_app__errors__ValidationErrorResponse___locals___ValidationErrorResponseModel__11
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/fastapi_app__errors__ForbiddenResponse___locals___ForbiddenResponseModel__4
      security:
        - HTTPBearer: []
        - HTTPBasic: []
components:
  schemas:
    AllowlistPutInput:
      properties:
        artifact_name:
          type: string
          title: Artifact Name
          description: The name of the artifact that is allowed
        artifact_fingerprint:
          type: string
          pattern: ^[a-f0-9]{64}$
          title: Artifact Fingerprint
          description: The sha256 fingerprint of the artifact that is allowed
        description:
          type: string
          title: Description
          description: The reason for allow listing this artifact
      additionalProperties: false
      type: object
      required:
        - artifact_name
        - artifact_fingerprint
        - description
      title: AllowlistPutInput
      description: Input model for an allowlist record
      examples:
        - artifact_fingerprint: fffd6d98c2da601a514797f0db9cc380ffe29a4312bebec5430d6fcb31d5bf4c
          artifact_name: linus-git
          description: Allowlist for linus-git
    fastapi_app__errors__ValidationErrorResponse___locals___ValidationErrorResponseModel__11:
      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: ValidationErrorResponseModel
      examples:
        - errors:
            email: Field must be a valid email address
            name: Field cannot be empty
          message: Input payload validation failed
    fastapi_app__errors__ForbiddenResponse___locals___ForbiddenResponseModel__4:
      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: ForbiddenResponseModel
      examples:
        - message: You don't have permission to access this resource
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````