# Chat

**All the endpoints that can be called on the Chat controller.**

All endpoints require the `API_CHAT` permission.

## requestChatConfig

> \*\*Requests chat configuration by this chat's details.\*\*

OpenAPI:

```json
{"openapi":"3.0.3","info":{"title":"Omnidesk API documentation","version":"2.0.0"},"tags":[{"name":"Chat","description":"**All the endpoints that can be called on the Chat controller.**\n\nAll endpoints require the `API_CHAT` permission."}],"servers":[{"url":"{{base_url}}"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","name":"apiKey","in":"header"}}},"paths":{"/api/v2/chat/requestChatConfig":{"post":{"tags":["Chat"],"summary":"requestChatConfig","description":"**Requests chat configuration by this chat's details.**","operationId":"requestChatConfigPOST","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","required":["chatServer","chatAccountToken"],"properties":{"chatServer":{"type":"string","pattern":"^[a-zA-Z0-9\\.\\:\\/\\-]+$","minLength":5},"chatAccountToken":{"type":"string","pattern":"^[a-zA-Z0-9]+$","minLength":10}}}}}},"responses":{"200":{"description":""}}}}}}
```

## notifyUserNewChatMessage

> \*\*Notifies the user of a new chat message.\*\*

OpenAPI:

```json
{"openapi":"3.0.3","info":{"title":"Omnidesk API documentation","version":"2.0.0"},"tags":[{"name":"Chat","description":"**All the endpoints that can be called on the Chat controller.**\n\nAll endpoints require the `API_CHAT` permission."}],"servers":[{"url":"{{base_url}}"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","name":"apiKey","in":"header"}}},"paths":{"/api/v2/chat/notifyUserNewChatMessage":{"post":{"tags":["Chat"],"summary":"notifyUserNewChatMessage","description":"**Notifies the user of a new chat message.**","operationId":"notifyUserNewChatMessagePOST","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","required":["chatServer","chatSessionID","chatAccountToken","message"],"properties":{"chatServer":{"type":"string","pattern":"^[a-zA-Z0-9\\.\\:\\/\\-]+$","minLength":5},"chatSessionID":{"type":"string","pattern":"^\\+?[a-zA-Z0-9\\-]+$","minLength":10,"maxLength":65},"chatAccountToken":{"type":"string","pattern":"^[a-zA-Z0-9]+$","minLength":10},"channelID":{"type":"number","minLength":1,"default":8},"message":{"type":"string","minLength":1,"default":""},"url":{"type":"string","minLength":1,"default":""},"messageNumber":{"type":"number","minLength":1,"maxLength":50,"default":1},"usedPredefinedUserInput":{"type":"string","minLength":1,"default":false},"additionalData":{"type":"string","minLength":1,"default":""},"externalAddressOverwrite":{"type":"string","minLength":1,"default":""},"customerName":{"type":"string","pattern":"^[a-zA-Z 0-9]+$"},"emailAddress":{"type":"string","format":"email"},"phoneNumber":{"type":"string","pattern":"^\\+[0-9]+$"}}}}}},"responses":{"200":{"description":""}}}}}}
```

## notifyUserNewChatEvent

> \*\*Notifies the user of a new chat event.\*\*

OpenAPI:

```json
{"openapi":"3.0.3","info":{"title":"Omnidesk API documentation","version":"2.0.0"},"tags":[{"name":"Chat","description":"**All the endpoints that can be called on the Chat controller.**\n\nAll endpoints require the `API_CHAT` permission."}],"servers":[{"url":"{{base_url}}"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","name":"apiKey","in":"header"}}},"paths":{"/api/v2/chat/notifyUserNewChatEvent":{"post":{"tags":["Chat"],"summary":"notifyUserNewChatEvent","description":"**Notifies the user of a new chat event.**","operationId":"notifyUserNewChatEventPOST","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","required":["chatServer","chatSessionID","event"],"properties":{"chatServer":{"type":"string","pattern":"^[a-zA-Z0-9\\.\\:\\/\\-]+$","minLength":5},"chatSessionID":{"type":"string","pattern":"^[a-zA-Z0-9\\-]+$","minLength":10},"event":{"type":"string","enum":["startedtyping","stoppedtyping","expandechat","minimizedchat"]}}}}}},"responses":{"200":{"description":""}}}}}}
```

## notifyUserVisited

> \*\*Notifies the user of a new chat URL visited.\*\*

OpenAPI:

```json
{"openapi":"3.0.3","info":{"title":"Omnidesk API documentation","version":"2.0.0"},"tags":[{"name":"Chat","description":"**All the endpoints that can be called on the Chat controller.**\n\nAll endpoints require the `API_CHAT` permission."}],"servers":[{"url":"{{base_url}}"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","name":"apiKey","in":"header"}}},"paths":{"/api/v2/chat/notifyUserVisited":{"post":{"tags":["Chat"],"summary":"notifyUserVisited","description":"**Notifies the user of a new chat URL visited.**","operationId":"notifyUserVisitedPOST","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","required":["chatServer","chatSessionID","url"],"properties":{"chatServer":{"type":"string","pattern":"^[a-zA-Z0-9\\.\\:\\/\\-]+$","minLength":5},"chatSessionID":{"type":"string","pattern":"^[a-zA-Z0-9\\-]+$","minLength":10},"url":{"type":"string","minLength":4}}}}}},"responses":{"200":{"description":""}}}}}}
```

## notifyUserEndChat

> \*\*Notifies the user that the chat has ended.\*\*

OpenAPI:

```json
{"openapi":"3.0.3","info":{"title":"Omnidesk API documentation","version":"2.0.0"},"tags":[{"name":"Chat","description":"**All the endpoints that can be called on the Chat controller.**\n\nAll endpoints require the `API_CHAT` permission."}],"servers":[{"url":"{{base_url}}"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","name":"apiKey","in":"header"}}},"paths":{"/api/v2/chat/notifyUserEndChat":{"post":{"tags":["Chat"],"summary":"notifyUserEndChat","description":"**Notifies the user that the chat has ended.**","operationId":"notifyUserEndChatPOST","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","required":["chatServer","chatSessionID"],"properties":{"chatServer":{"type":"string","pattern":"^[a-zA-Z0-9\\.\\:\\/\\-]+$","minLength":5},"chatSessionID":{"type":"string","pattern":"^[a-zA-Z0-9\\-]+$","minLength":10}}}}}},"responses":{"200":{"description":""}}}}}}
```

## addAttachment

> \*\*Adds an attachment to the chat.\*\*

OpenAPI:

```json
{"openapi":"3.0.3","info":{"title":"Omnidesk API documentation","version":"2.0.0"},"tags":[{"name":"Chat","description":"**All the endpoints that can be called on the Chat controller.**\n\nAll endpoints require the `API_CHAT` permission."}],"servers":[{"url":"{{base_url}}"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","name":"apiKey","in":"header"}}},"paths":{"/api/v2/chat/addAttachment":{"post":{"tags":["Chat"],"summary":"addAttachment","description":"**Adds an attachment to the chat.**","operationId":"addAttachmentPOST","parameters":[{"name":"chatServer","in":"query","required":true,"schema":{"type":"string","pattern":"^[a-zA-Z0-9\\.\\:\\/\\-]+$","minLength":5}},{"name":"chatSessionID","in":"query","required":true,"schema":{"type":"string","pattern":"^\\+?[a-zA-Z0-9\\-]+$","minLength":10}},{"name":"chatAccountToken","in":"query","required":true,"schema":{"type":"string","pattern":"^[a-zA-Z0-9]+$","minLength":10}},{"name":"phoneNumber","in":"query","schema":{"type":"string","pattern":"^\\+?[0-9]+$"}},{"name":"messageNumber","in":"query","schema":{"type":"number"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"byte"}}}}}},"responses":{"200":{"description":""}}}}}}
```

## checkOriginAndIP

> \*\*Checks the origin and IP address of this user.\*\*

OpenAPI:

```json
{"openapi":"3.0.3","info":{"title":"Omnidesk API documentation","version":"2.0.0"},"tags":[{"name":"Chat","description":"**All the endpoints that can be called on the Chat controller.**\n\nAll endpoints require the `API_CHAT` permission."}],"servers":[{"url":"{{base_url}}"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","name":"apiKey","in":"header"}}},"paths":{"/api/v2/chat/checkOriginAndIP":{"post":{"tags":["Chat"],"summary":"checkOriginAndIP","description":"**Checks the origin and IP address of this user.**","operationId":"checkOriginAndIPPOST","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","required":["chatServer","chatAccountToken","origin","ip"],"properties":{"chatServer":{"type":"string","pattern":"^[a-zA-Z0-9\\.\\:\\/\\-]+$","minLength":5},"chatAccountToken":{"type":"string","pattern":"^[a-zA-Z0-9]+$","minLength":10},"origin":{"description":"The hostname from the domain to be checked.","type":"string","pattern":"^[a-zA-Z0-9\\.\\-]+$","minLength":1},"ip":{"type":"string","minLength":5}}}}}},"responses":{"200":{"description":""}}}}}}
```

## whitelistedDomainsAndBlacklistedIPs

> \*\*Returns all the whitelisted domains and blacklisted IP addresses.\*\*

OpenAPI:

```json
{"openapi":"3.0.3","info":{"title":"Omnidesk API documentation","version":"2.0.0"},"tags":[{"name":"Chat","description":"**All the endpoints that can be called on the Chat controller.**\n\nAll endpoints require the `API_CHAT` permission."}],"servers":[{"url":"{{base_url}}"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","name":"apiKey","in":"header"}}},"paths":{"/api/v2/chat/whitelistedDomainsAndBlacklistedIPs":{"get":{"tags":["Chat"],"summary":"whitelistedDomainsAndBlacklistedIPs","description":"**Returns all the whitelisted domains and blacklisted IP addresses.**","operationId":"whitelistedDomainsAndBlacklistedIPsGET","responses":{"200":{"description":""}}}}}}
```

## requestChatQueue

> \*\*Returns the chat queue.\*\*

OpenAPI:

```json
{"openapi":"3.0.3","info":{"title":"Omnidesk API documentation","version":"2.0.0"},"tags":[{"name":"Chat","description":"**All the endpoints that can be called on the Chat controller.**\n\nAll endpoints require the `API_CHAT` permission."}],"servers":[{"url":"{{base_url}}"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","name":"apiKey","in":"header"}}},"paths":{"/api/v2/chat/requestChatQueue":{"post":{"tags":["Chat"],"summary":"requestChatQueue","description":"**Returns the chat queue.**","operationId":"requestChatQueuePOST","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","required":["chatAccountToken"],"properties":{"chatAccountToken":{"type":"string","pattern":"^[a-zA-Z0-9]+$","minLength":10}}}}}},"responses":{"200":{"description":""}}}}}}
```
