> For the complete documentation index, see [llms.txt](https://spaceone-dev.gitbook.io/spaceone-apis/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://spaceone-dev.gitbook.io/spaceone-apis/notification/v1/user-channel.md).

# User Channel

> **Package : spaceone.api.notification.v1**

## UserChannel

{% hint style="info" %}
**UserChannel Methods:**
{% endhint %}

| Method                                     | Request                                                                       | Response                                                                                                           |
| ------------------------------------------ | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| [**create**](#create)                      | [CreateUserChannelRequest](#createuserchannelrequest)                         | [UserChannelInfo](#userchannelinfo)                                                                                |
| [**update**](#update)                      | [UpdateUserChannelRequest](#updateuserchannelrequest)                         | [UserChannelInfo](#userchannelinfo)                                                                                |
| [**set\_schedule**](#set_schedule)         | [UpdateUserChannelScheduleRequest](#updateuserchannelschedulerequest)         | [UserChannelInfo](#userchannelinfo)                                                                                |
| [**set\_subscription**](#set_subscription) | [UpdateUserChannelSubscriptionRequest](#updateuserchannelsubscriptionrequest) | [UserChannelInfo](#userchannelinfo)                                                                                |
| [**enable**](#enable)                      | [UserChannelRequest](#userchannelrequest)                                     | [UserChannelInfo](#userchannelinfo)                                                                                |
| [**disable**](#disable)                    | [UserChannelRequest](#userchannelrequest)                                     | [UserChannelInfo](#userchannelinfo)                                                                                |
| [**delete**](#delete)                      | [UserChannelRequest](#userchannelrequest)                                     | [google.protobuf.Empty](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/empty.proto)   |
| [**get**](#get)                            | [GetUserChannelRequest](#getuserchannelrequest)                               | [UserChannelInfo](#userchannelinfo)                                                                                |
| [**list**](#list)                          | [UserChannelQuery](#userchannelquery)                                         | [UserChannelsInfo](#userchannelsinfo)                                                                              |
| [**stat**](#stat)                          | [UserChannelStatQuery](#userchannelstatquery)                                 | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |

### create

> **POST** /notification/v1/user-channels

> Creates a new User Channel.User channel is the definition of the channel that delivers the notification to users when the notification is created.When creating a User Channel, one of the protocols must be selected, and an notification is dispatched through the selected protocol.

| Type     | Message                                               |
| -------- | ----------------------------------------------------- |
| Request  | [CreateUserChannelRequest](#createuserchannelrequest) |
| Response | [UserChannelInfo](#userchannelinfo)                   |

### update

> **PUT** /notification/v1/user-channel/{user\_channel\_id}

> Updates a User Channel information.Protocol that has already been set cannot be changed. Instead, the data required to be dispatched notification for user channel is can be updated.

| Type     | Message                                               |
| -------- | ----------------------------------------------------- |
| Request  | [UpdateUserChannelRequest](#updateuserchannelrequest) |
| Response | [UserChannelInfo](#userchannelinfo)                   |

### set\_schedule

> **PUT** /notification/v1/user-channel/{user\_channel\_id}/schedule

> Schedule settings for user channels.When a notification is created, you can set the day and time you want to receive it through the schedule.When you set the day of the week in the schedule, you can receive a notification only on the set day of the week.If you also set the start time and end time with day of the week, you can receive a notification only at the set time on the set day of the week.If there is no schedule, notifications will be dispatched at all times through user channel.

| Type     | Message                                                               |
| -------- | --------------------------------------------------------------------- |
| Request  | [UpdateUserChannelScheduleRequest](#updateuserchannelschedulerequest) |
| Response | [UserChannelInfo](#userchannelinfo)                                   |

### set\_subscription

> **PUT** /notification/v1/user-channel/{user\_channel\_id}/subscription

> Subscription settings for user channelsIf the user channel have subscriptions, notification is dispatched only if the topic of the notification is the same as the one set in the subscriptions.If no subscriptions in user channel, notifications will be dispatched all.

| Type     | Message                                                                       |
| -------- | ----------------------------------------------------------------------------- |
| Request  | [UpdateUserChannelSubscriptionRequest](#updateuserchannelsubscriptionrequest) |
| Response | [UserChannelInfo](#userchannelinfo)                                           |

### enable

> **PUT** /notification/v1/user-channel/{user\_channel\_id}/enable

> Enables a User Channel.If the disabled user channel is enabled, the user channel can be used again and the notification can be dispatched.Even if the user channel is enabled, if the protocol being used in the user channel is disabled, the notification is not dispatched.

| Type     | Message                                   |
| -------- | ----------------------------------------- |
| Request  | [UserChannelRequest](#userchannelrequest) |
| Response | [UserChannelInfo](#userchannelinfo)       |

### disable

> **PUT** /notification/v1/user-channel/{user\_channel\_id}/disable

> Disables a User Channel.If you disable the user channel, the notification will not be dispatched, even if they are created.

| Type     | Message                                   |
| -------- | ----------------------------------------- |
| Request  | [UserChannelRequest](#userchannelrequest) |
| Response | [UserChannelInfo](#userchannelinfo)       |

### delete

> **DELETE** /notification/v1/user-channel/{user\_channel\_id}

> Delete the User Channel.

| Type     | Message                                                                                                          |
| -------- | ---------------------------------------------------------------------------------------------------------------- |
| Request  | [UserChannelRequest](#userchannelrequest)                                                                        |
| Response | [google.protobuf.Empty](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/empty.proto) |

### get

> **GET** /notification/v1/user-channel/{user\_channel\_id}

> Gets a single User Channel.

| Type     | Message                                         |
| -------- | ----------------------------------------------- |
| Request  | [GetUserChannelRequest](#getuserchannelrequest) |
| Response | [UserChannelInfo](#userchannelinfo)             |

### list

> **GET** /notification/v1/user-channels
>
> **POST** /notification/v1/user-channels/search

> Lists the specified User Channel.Can search information using the query format provided by SpaceONE.Detailed information about Query format can be checked in the Search Query pages.

| Type     | Message                               |
| -------- | ------------------------------------- |
| Request  | [UserChannelQuery](#userchannelquery) |
| Response | [UserChannelsInfo](#userchannelsinfo) |

### stat

> **POST** /notification/v1/user-channels/stat

| Type     | Message                                                                                                            |
| -------- | ------------------------------------------------------------------------------------------------------------------ |
| Request  | [UserChannelStatQuery](#userchannelstatquery)                                                                      |
| Response | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |

##

## Message

### CreateUserChannelRequest

| Field         | Type                                                                                                               | Required | Description                                                                                                                                                                                                                                                                                                                                                                                                  |
| ------------- | ------------------------------------------------------------------------------------------------------------------ | :------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| protocol\_id  | string                                                                                                             |     ✔    | The ID of protocol that will be set in user channel.                                                                                                                                                                                                                                                                                                                                                         |
| name          | string                                                                                                             |     ✔    | The name of User Channel. It can have a maximum of 255 characters.                                                                                                                                                                                                                                                                                                                                           |
| data          | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |     ✔    | The data for using user channel.This data is encrypted and stored in the Secret service if JSON schema in the protocol's metadata is set to SECRET type.In this case, the secret ID that is stored in the security service will be returned and the data value will be empty.if JSON schema in the protocol's metadata is set to PLAIN\_TEXT type, This data is not encrypted and stored directly in the DB. |
| is\_subscribe | bool                                                                                                               |     ✘    | Indicates whether subscriptions will be used.                                                                                                                                                                                                                                                                                                                                                                |
| subscriptions | list of string                                                                                                     |     ✔    | When using subscriptions, it indicates the topic list to subscription.If is\_subscribe is set to false, this value is ignored.                                                                                                                                                                                                                                                                               |
| is\_scheduled | bool                                                                                                               |     ✘    | Indicates whether schedule will be used.                                                                                                                                                                                                                                                                                                                                                                     |
| schedule      | [UserChannelSchedule](#userchannelschedule)                                                                        |     ✘    | Schedule for which you want to receive notifications through the user channel.                                                                                                                                                                                                                                                                                                                               |
| tags          | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |     ✘    | The tags for user channel.                                                                                                                                                                                                                                                                                                                                                                                   |
| user\_id      | string                                                                                                             |     ✔    | The ID of user                                                                                                                                                                                                                                                                                                                                                                                               |
| domain\_id    | string                                                                                                             |     ✔    | The ID of domain.                                                                                                                                                                                                                                                                                                                                                                                            |

### GetUserChannelRequest

| Field             | Type           | Required | Description                                                                                                           |
| ----------------- | -------------- | :------: | --------------------------------------------------------------------------------------------------------------------- |
| user\_channel\_id | string         |     ✔    | The ID of user channel.                                                                                               |
| domain\_id        | string         |     ✔    | The ID of domain.                                                                                                     |
| only              | list of string |     ✘    | The list of the user channel information column you want to be returned. It must be specified in the UserChannelInfo. |

### UpdateUserChannelRequest

| Field             | Type                                                                                                               | Required | Description                                                                                                                                                                                                                                                                                                                                                                                                  |
| ----------------- | ------------------------------------------------------------------------------------------------------------------ | :------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| user\_channel\_id | string                                                                                                             |     ✔    | The ID of user channel.                                                                                                                                                                                                                                                                                                                                                                                      |
| name              | string                                                                                                             |     ✘    | The name of user channel. It can have a maximum of 255 characters.                                                                                                                                                                                                                                                                                                                                           |
| data              | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |     ✔    | The data for using user channel.This data is encrypted and stored in the Secret service if JSON schema in the protocol's metadata is set to SECRET type.In this case, the secret ID that is stored in the security service will be returned and the data value will be empty.if JSON schema in the protocol's metadata is set to PLAIN\_TEXT type, This data is not encrypted and stored directly in the DB. |
| schedule          | [UserChannelSchedule](#userchannelschedule)                                                                        |     ✔    | Set the level of notification.If a notification has a level and a notification level that this channel can receive is set, a notification is dispatched only if the notification level is the same.                                                                                                                                                                                                          |
| tags              | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) |     ✘    | The tags for user channel.                                                                                                                                                                                                                                                                                                                                                                                   |
| domain\_id        | string                                                                                                             |     ✔    | The ID of domain.                                                                                                                                                                                                                                                                                                                                                                                            |

### UpdateUserChannelScheduleRequest

| Field             | Type                                        | Required | Description                                                                    |
| ----------------- | ------------------------------------------- | :------: | ------------------------------------------------------------------------------ |
| user\_channel\_id | string                                      |     ✔    | The ID of user channel.                                                        |
| is\_scheduled     | bool                                        |     ✔    | Indicates whether schedule will be used.                                       |
| schedule          | [UserChannelSchedule](#userchannelschedule) |     ✘    | Schedule for which you want to receive notifications through the user channel. |
| domain\_id        | string                                      |     ✔    | The ID of domain.                                                              |

### UpdateUserChannelSubscriptionRequest

| Field             | Type           | Required | Description                                   |
| ----------------- | -------------- | :------: | --------------------------------------------- |
| user\_channel\_id | string         |     ✔    | The ID of user channel.                       |
| is\_subscribe     | bool           |     ✔    | Indicates whether subscriptions will be used. |
| subscriptions     | list of string |     ✔    |                                               |
| domain\_id        | string         |     ✔    | The ID of domain.                             |

### UserChannelInfo

| Field             | Type                                                                                                               | Description                                                                    |
| ----------------- | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
| user\_channel\_id | string                                                                                                             | The ID of user channel.                                                        |
| name              | string                                                                                                             | The name of user channel                                                       |
| state             | <ul><li>NONE</li><li>ENABLED</li><li>DISABLED</li></ul>                                                            | The state of user channel. ENABLED or DISABLED only.                           |
| data              | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) | The data for using user channel.                                               |
| secret\_id        | string                                                                                                             | The ID of secret encrypted data in the security service                        |
| is\_subscribe     | bool                                                                                                               | Indicates whether subscriptions will be used.                                  |
| subscriptions     | list of string                                                                                                     | The topic list to subscription.                                                |
| is\_scheduled     | bool                                                                                                               | Indicates whether schedule will be used.                                       |
| schedule          | [UserChannelSchedule](#userchannelschedule)                                                                        | Schedule for which you want to receive notifications through the user channel. |
| tags              | [google.protobuf.Struct](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto) | The tags for user channel.                                                     |
| protocol\_id      | string                                                                                                             | The ID of protocol set in the user channel.                                    |
| user\_id          | string                                                                                                             | The ID of user using the user channel.                                         |
| domain\_id        | string                                                                                                             | The ID of domain.                                                              |
| created\_at       | string                                                                                                             | User channel creation time.                                                    |

### UserChannelQuery

| Field             | Type                                                                                               | Required | Description                                                                    |
| ----------------- | -------------------------------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------ |
| query             | [spaceone.api.core.v1.Query](https://spaceone-dev.gitbook.io/api-reference/common-v1/search-query) | ✘        | Query format provided by SpaceONE. Please check the link for more information. |
| user\_channel\_id | string                                                                                             | ✘        | The ID of user channel.                                                        |
| name              | string                                                                                             | ✘        | The name of user channel. It can have a maximum of 255 characters.             |
| state             | <ul><li>NONE</li><li>ENABLED</li><li>DISABLED</li></ul>                                            | ✘        | The state of user channel. ENABLED or DISABLED only.                           |
| secret\_id        | string                                                                                             | ✔        |                                                                                |
| protocol\_id      | string                                                                                             | ✘        | The ID of protocol set in the user channel.                                    |
| user\_id          | string                                                                                             | ✘        | The ID of user using the user channel.                                         |
| domain\_id        | string                                                                                             | ✔        | The ID of domain.                                                              |

### UserChannelRequest

| Field             | Type   | Required | Description             |
| ----------------- | ------ | :------: | ----------------------- |
| user\_channel\_id | string |     ✔    | The ID of user channel. |
| domain\_id        | string |     ✔    | The ID of domain.       |

### UserChannelSchedule

| Field         | Type                                                                                                       | Description                                                                                                 |
| ------------- | ---------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| day\_of\_week | <ul><li>NONE</li><li>MON</li><li>TUE</li><li>WED</li><li>THU</li><li>FRI</li><li>SAT</li><li>SUN</li></ul> | Day of the week to be notified.As a list type, only types that can be specified from MON to SUN can be set. |
| start\_hour   | [int32](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/type.proto)            | Start time to receive notifications.Only integer type can be set, and 0 to 23 can be.                       |
| end\_hour     | [int32](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/type.proto)            | End time to receive notifications.Only integer type can be set, and 1 to 24 can be.                         |

### UserChannelStatQuery

| Field      | Type                                                                                                             | Required | Description                                                                               |
| ---------- | ---------------------------------------------------------------------------------------------------------------- | :------: | ----------------------------------------------------------------------------------------- |
| query      | [spaceone.api.core.v1.StatisticsQuery](https://spaceone-dev.gitbook.io/api-reference/common-v1/statistics-query) |     ✔    | Statistics Query format provided by SpaceONE. Please check the link for more information. |
| domain\_id | string                                                                                                           |     ✔    | The ID of domain.                                                                         |

### UserChannelsInfo

| Field        | Type                                                                                            | Description                            |
| ------------ | ----------------------------------------------------------------------------------------------- | -------------------------------------- |
| results      | [list of UserChannelInfo](#userchannelinfo)                                                     | List of queried user channels.         |
| total\_count | [int32](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/type.proto) | Total counts of queried user channels. |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://spaceone-dev.gitbook.io/spaceone-apis/notification/v1/user-channel.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
