# Channel

These endpoints can be used to manage custom channels.

## index

> \*\*Returns all the channels.\*\*\
> \
> This endpoint requires the \`CHANNEL\_READ\` permission.

```json
{"openapi":"3.0.0","info":{"title":"Omnidesk API documentation","version":"1.0.0"},"tags":[{"name":"Channel","description":"These endpoints can be used to manage custom channels."}],"servers":[{"url":"http://{{base_url}}"}],"security":[{"apikeyAuth":[]}],"components":{"securitySchemes":{"apikeyAuth":{"type":"http","scheme":"apikey"}}},"paths":{"/api/v2/channel":{"get":{"tags":["Channel"],"summary":"index","description":"**Returns all the channels.**\n\nThis endpoint requires the `CHANNEL_READ` permission.","responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}}}}
```

## index

> \*\*Creates a new channel.\*\*\
> \
> Most parameters are optional but depending on the presence of other parameters.\
> \
> This endpoint requires the \`CHANNEL\_CUD\` permission.

```json
{"openapi":"3.0.0","info":{"title":"Omnidesk API documentation","version":"1.0.0"},"tags":[{"name":"Channel","description":"These endpoints can be used to manage custom channels."}],"servers":[{"url":"http://{{base_url}}"}],"security":[{"apikeyAuth":[]}],"components":{"securitySchemes":{"apikeyAuth":{"type":"http","scheme":"apikey"}}},"paths":{"/api/v2/channel":{"post":{"tags":["Channel"],"summary":"index","description":"**Creates a new channel.**\n\nMost parameters are optional but depending on the presence of other parameters.\n\nThis endpoint requires the `CHANNEL_CUD` permission.","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"type: `^[a-zA-Z0-9 \\.\\-\\_]+$`"},"icon":{"type":"string","description":"type: `^[a-zA-Z0-9\\-\\_]+$` = 'chat'"},"custom_channel_endpoint":{"type":"string","description":"type: `^[a-zA-Z0-9\\.\\:\\/\\-?&=]+$`"},"custom_channel_secret":{"type":"string","description":"type: `string` = ''"},"include_signature":{"type":"string","description":"type: `boolean` = 'false'"}}}}}},"parameters":[{"name":"Content-Type","in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}}}}
```

## item

> \*\*Returns all the data of this channel.\*\*\
> \
> This endpoint requires the \`CHANNEL\_CUD\` permission.

```json
{"openapi":"3.0.0","info":{"title":"Omnidesk API documentation","version":"1.0.0"},"tags":[{"name":"Channel","description":"These endpoints can be used to manage custom channels."}],"servers":[{"url":"http://{{base_url}}"}],"security":[{"apikeyAuth":[]}],"components":{"securitySchemes":{"apikeyAuth":{"type":"http","scheme":"apikey"}}},"paths":{"/api/v2/channel/{id}":{"get":{"tags":["Channel"],"summary":"item","description":"**Returns all the data of this channel.**\n\nThis endpoint requires the `CHANNEL_CUD` permission.","parameters":[{"name":"id","in":"path","schema":{"type":"integer"},"required":true,"description":"type: `number`"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}}}}
```

## item

> \*\*Updates an existing channel\*\*\
> \
> This endpoint requires the \`CHANNEL\_CUD\` permission.\
> \
> \- \`name\`: Name of the custom channel.\
> &#x20;   \
> \- \`icon\`: The icon the custom channel uses.\
> &#x20;   \
> \- \`custom\_channel\_endpoint\`: The endpoint Omnidesk POSTs a message to when the agent sends an outbound message.\
> &#x20;   \
> \- \`custom\_channel\_secret\`: The optional secret that gets used for request to your \`custom\_channel\_endpoint\` value\
> &#x20;   \
> \- \`custom\_channel\_warning\_en\`: Optional warning.\
> &#x20;   \
> \- \`custom\_channel\_warning\_nl\`: Optional warning.\
> &#x20;   \
> \- \`include\_signature\`: Include the signature in outbound messages for this channel.\
> &#x20;   \
> \- \`custom\_channel\_available\_in\_quick\_ticket\`: Make this channel available in quick ticket.

```json
{"openapi":"3.0.0","info":{"title":"Omnidesk API documentation","version":"1.0.0"},"tags":[{"name":"Channel","description":"These endpoints can be used to manage custom channels."}],"servers":[{"url":"http://{{base_url}}"}],"security":[{"apikeyAuth":[]}],"components":{"securitySchemes":{"apikeyAuth":{"type":"http","scheme":"apikey"}}},"paths":{"/api/v2/channel/{id}":{"put":{"tags":["Channel"],"summary":"item","description":"**Updates an existing channel**\n\nThis endpoint requires the `CHANNEL_CUD` permission.\n\n- `name`: Name of the custom channel.\n    \n- `icon`: The icon the custom channel uses.\n    \n- `custom_channel_endpoint`: The endpoint Omnidesk POSTs a message to when the agent sends an outbound message.\n    \n- `custom_channel_secret`: The optional secret that gets used for request to your `custom_channel_endpoint` value\n    \n- `custom_channel_warning_en`: Optional warning.\n    \n- `custom_channel_warning_nl`: Optional warning.\n    \n- `include_signature`: Include the signature in outbound messages for this channel.\n    \n- `custom_channel_available_in_quick_ticket`: Make this channel available in quick ticket.","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"type: `^[a-zA-Z0-9 \\.\\-\\_]+$`"},"icon":{"type":"string","description":"type: `^[a-zA-Z0-9\\-\\_]+$` = 'chat'"},"custom_channel_endpoint":{"type":"string","description":"type: `^[a-zA-Z0-9\\.\\:\\/\\-?&=]+$`"},"custom_channel_secret":{"type":"string","description":"type: `string` = ''"},"custom_channel_warning_en":{"type":"string","description":"type: `^[0-9a-zA-Z\\-\\_\\:\\;\\>\\+\\(\\)\\/\\!\\?\\,\\.\\#\\@\\$\\*\\&À-ȕ\\' ]+$` = ''"},"custom_channel_warning_nl":{"type":"string","description":"type: `^[0-9a-zA-Z\\-\\_\\:\\;\\>\\+\\(\\)\\/\\!\\?\\,\\.\\#\\@\\$\\*\\&À-ȕ\\' ]+$` = ''"},"include_signature":{"type":"string","description":"type: `boolean` = 'false'"},"custom_channel_available_in_quick_ticket":{"type":"string","description":"type: `boolean` = 'false'"}}}}}},"parameters":[{"name":"id","in":"path","schema":{"type":"integer"},"required":true,"description":"type: `number`"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}}}}
```

## item

> \*\*Deletes the provided channel.\*\*\
> \
> This endpoint requires the \`CHANNEL\_CUD\` permission.

```json
{"openapi":"3.0.0","info":{"title":"Omnidesk API documentation","version":"1.0.0"},"tags":[{"name":"Channel","description":"These endpoints can be used to manage custom channels."}],"servers":[{"url":"http://{{base_url}}"}],"security":[{"apikeyAuth":[]}],"components":{"securitySchemes":{"apikeyAuth":{"type":"http","scheme":"apikey"}}},"paths":{"/api/v2/channel/{id}":{"delete":{"tags":["Channel"],"summary":"item","description":"**Deletes the provided channel.**\n\nThis endpoint requires the `CHANNEL_CUD` permission.","parameters":[{"name":"id","in":"path","schema":{"type":"string"},"required":true,"description":"type: `number`"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}}}}
```

## customChannelMessage

> \*\*Creates a inbound custom channel message.\*\*\
> \
> Most parameters are optional but depending on the presence of other parameters.\
> \
> This endpoint requires the \`MESSAGE\_CREATE\` permission.

```json
{"openapi":"3.0.0","info":{"title":"Omnidesk API documentation","version":"1.0.0"},"tags":[{"name":"Channel","description":"These endpoints can be used to manage custom channels."}],"servers":[{"url":"http://{{base_url}}"}],"security":[{"apikeyAuth":[]}],"components":{"securitySchemes":{"apikeyAuth":{"type":"http","scheme":"apikey"}}},"paths":{"/api/v2/channel/customChannelMessage":{"post":{"tags":["Channel"],"summary":"customChannelMessage","description":"**Creates a inbound custom channel message.**\n\nMost parameters are optional but depending on the presence of other parameters.\n\nThis endpoint requires the `MESSAGE_CREATE` permission.","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"ticketID":{"type":"string","description":"type: `^[0-9]+$`"},"channelID":{"type":"string","description":"type: `^[0-9]+$`"},"message":{"type":"string","description":"type: `string`"},"title":{"type":"string","description":"type: `string`=''"},"toAddress":{"type":"string","description":"type: `string`=''"},"fromAddress":{"type":"string","description":"type: `string`=''"},"userID":{"type":"string","description":"type: `^[0-9]+$` = 0"}}}}}},"parameters":[{"name":"Content-Type","in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}}}}
```


---

# Agent Instructions: 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:

```
GET https://docs.omnidesk.io/omnidesk/api-specification/channel.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
