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

# Change a channel's notifications

> Replaces the notification types sent to a channel. `type` must match the channel's type. Your account must be verified. With `teamID`, this needs the `team.manage` permission.



## OpenAPI

````yaml /spec/platform-support.yaml put /v1/channels/{channelID}
openapi: 3.0.1
info:
  title: Support & Notifications
  version: 1.0.0
  description: |
    Open and follow support tickets, read your notifications, and choose
    where notifications are delivered (SMS, email or Telegram).

    With `teamID`, these endpoints work on the team's tickets, notifications
    and channels. The description of each endpoint says which permission it
    needs in the team.
servers:
  - url: https://api.liara.ir
security:
  - bearerAuth: []
tags:
  - name: Tickets
    description: Open, reply to and close support tickets.
  - name: Attachments
    description: Upload files to attach to tickets, and download them.
  - name: Notifications
    description: Read notifications and set the low-credit alert threshold.
  - name: Notification Channels
    description: Choose which notifications are sent by SMS, email or Telegram.
paths:
  /v1/channels/{channelID}:
    put:
      tags:
        - Notification Channels
      summary: Change a channel's notifications
      description: >-
        Replaces the notification types sent to a channel. `type` must match the
        channel's type. Your account must be verified. With `teamID`, this needs
        the `team.manage` permission.
      operationId: updateChannel
      parameters:
        - $ref: '#/components/parameters/TeamID'
        - $ref: '#/components/parameters/ChannelID'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - type
                - interestedNotifications
              properties:
                type:
                  $ref: '#/components/schemas/ChannelType'
                interestedNotifications:
                  type: array
                  minItems: 1
                  description: >-
                    The new list of notification types. For `sms`, use values
                    from `SMSNotificationType`; for `email` and `telegram`,
                    values from `EmailNotificationType`.
                  items:
                    type: string
            example:
              type: email
              interestedNotifications:
                - LowCredit
                - TicketCreated
                - TicketCommentCreated
      responses:
        '200':
          description: The channel was updated. The response body is empty.
        '400':
          description: The body, the channel ID or `teamID` is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                statusCode: 400
                error: Bad Request
                message: Request param is not valid.
                data: null
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: >-
            Your account isn't verified (`account_verification_required`), or,
            with `teamID`, you aren't a member (`team_not_found`) or lack
            `team.manage` (`no_permission`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: No active channel with this ID and type.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                statusCode: 404
                error: Not Found
                message: Channel not found.
                data: null
components:
  parameters:
    TeamID:
      name: teamID
      in: query
      required: false
      description: >-
        Run the request in the context of a team you belong to, instead of your
        personal account.
      schema:
        $ref: '#/components/schemas/ObjectID'
      example: '000000000000000000000002'
    ChannelID:
      name: channelID
      in: path
      required: true
      schema:
        $ref: '#/components/schemas/ObjectID'
  schemas:
    ChannelType:
      type: string
      enum:
        - sms
        - email
        - telegram
    Error:
      type: object
      description: Standard error body.
      properties:
        statusCode:
          type: integer
        error:
          type: string
          description: HTTP status text.
        message:
          type: string
          description: What went wrong.
        data:
          type: object
          nullable: true
          description: >-
            Extra details. When present, `code` is a stable, machine-readable
            error code.
          properties:
            code:
              type: string
    ObjectID:
      type: string
      pattern: ^[0-9a-fA-F]{24}$
      description: 24-character hexadecimal ID.
    AuthError:
      type: object
      description: Error body returned when the API token is rejected.
      properties:
        error:
          type: string
  responses:
    Unauthorized:
      description: The API token is missing, invalid or expired.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AuthError'
          example:
            error: Unauthorized.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Send your API token as `Authorization: Bearer <api-token>`.'

````

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