> ## 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/organizations/update-environment-notification",
  "feedback": "Description of the issue"
}
```

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

</AgentInstructions>

# Update environment notification

> Update a specific environments-notification for an org.



## OpenAPI

````yaml https://app.kosli.com/api/v2/openapi.json put /organizations/{org}/environments_notifications/{notification_number}
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:
  /organizations/{org}/environments_notifications/{notification_number}:
    put:
      tags:
        - Organizations
      summary: Update environment notification
      description: Update a specific environments-notification for an org.
      operationId: >-
        update_environment_notification_organizations__org__environments_notifications__notification_number__put
      parameters:
        - name: notification_number
          in: path
          required: true
          schema:
            type: integer
            title: Notification Number
        - name: org
          in: path
          required: true
          schema:
            type: string
            title: Org
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnvActionPutInput'
      responses:
        '200':
          description: Successfully updated environments notification.
          content:
            application/json:
              schema:
                type: string
                title: >-
                  Response Update Environment Notification Organizations  Org 
                  Environments Notifications  Notification Number  Put
        '404':
          description: Notification Not Found
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/fastapi_app__errors__NotFoundResponse___locals___NotFoundResponseModel__32
      security:
        - HTTPBearer: []
        - HTTPBasic: []
components:
  schemas:
    EnvActionPutInput:
      properties:
        name:
          type: string
          pattern: ^[a-zA-Z0-9][a-zA-Z0-9\-_\.~/]*$
          title: Name
          examples:
            - production-action
        targets:
          items:
            anyOf:
              - additionalProperties: true
                type: object
              - $ref: '#/components/schemas/SlackActionTarget'
              - $ref: '#/components/schemas/WebhookActionTarget'
              - $ref: '#/components/schemas/EmailActionTarget'
          type: array
          title: Targets
        type:
          type: string
          const: env
          title: Type
          default: env
        environments:
          items:
            type: string
          type: array
          title: Environments
        triggers:
          items:
            type: string
            enum:
              - ON_STARTED_ARTIFACT
              - ON_EXITED_ARTIFACT
              - ON_SCALED_ARTIFACT
              - ON_ALLOWED_ARTIFACT
              - ON_NON_COMPLIANT_ENV
              - ON_COMPLIANT_ENV
          type: array
          title: Triggers
      additionalProperties: false
      type: object
      required:
        - name
        - targets
        - environments
        - triggers
      title: EnvActionPutInput
    fastapi_app__errors__NotFoundResponse___locals___NotFoundResponseModel__32:
      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: NotFoundResponseModel
      description: Action not found
      examples:
        - message: Action not found
    SlackActionTarget:
      properties:
        type:
          type: string
          const: SLACK
          title: Type
          default: SLACK
        last_success_at:
          anyOf:
            - type: number
            - type: 'null'
          title: Last Success At
        last_failure_at:
          anyOf:
            - type: number
            - type: 'null'
          title: Last Failure At
        webhook:
          type: string
          title: Webhook
        context:
          anyOf:
            - $ref: '#/components/schemas/SlackAppContext'
            - type: 'null'
      additionalProperties: false
      type: object
      required:
        - webhook
      title: SlackActionTarget
    WebhookActionTarget:
      properties:
        type:
          type: string
          const: WEBHOOK
          title: Type
          default: WEBHOOK
        last_success_at:
          anyOf:
            - type: number
            - type: 'null'
          title: Last Success At
        last_failure_at:
          anyOf:
            - type: number
            - type: 'null'
          title: Last Failure At
        webhook:
          type: string
          title: Webhook
        payload_version:
          type: string
          const: '1.0'
          title: Payload Version
          default: '1.0'
      additionalProperties: false
      type: object
      required:
        - webhook
      title: WebhookActionTarget
    EmailActionTarget:
      properties:
        type:
          type: string
          const: EMAIL
          title: Type
          default: EMAIL
        last_success_at:
          anyOf:
            - type: number
            - type: 'null'
          title: Last Success At
        last_failure_at:
          anyOf:
            - type: number
            - type: 'null'
          title: Last Failure At
        emails:
          items:
            type: string
            format: email
          type: array
          title: Emails
      additionalProperties: false
      type: object
      required:
        - emails
      title: EmailActionTarget
    SlackAppContext:
      properties:
        channel_id:
          type: string
          title: Channel Id
        channel_name:
          type: string
          title: Channel Name
        team_id:
          type: string
          title: Team Id
      additionalProperties: false
      type: object
      required:
        - channel_id
        - channel_name
        - team_id
      title: SlackAppContext
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````