--- title: "Agent Preference" slug: "server-api-ticketing-agent-preference" updated: 2022-09-01T13:33:51Z published: 2022-09-01T13:33:51Z canonical: "developer.comm100.com/server-api-ticketing-agent-preference" --- > ## Documentation Index > Fetch the complete documentation index at: https://developer.comm100.com/llms.txt > Use this file to discover all available pages before exploring further. # Agent Preference ## Agent Preference Ticket agent preference. - `Agent Preference` - Agent Preference Manage - `GET ticketing/agentPreferences/{id}` - [Get a single Agent Preference](/docs/server-api-ticketing-agent-preference#get-a-single-agent-preference) - `PUT ticketing/agentPreferences/{id}` - [Update the Agent Preference](/docs/server-api-ticketing-agent-preference#update-the-agent-preference) ### Agent Preference JSON Format Agent Preference is represented as simple flat JSON objects with the following keys: | Name | Type | Description | | --- | --- | --- | | `agentId` | guid | Id of the agent. | | `ticketSettings` | string | JSON data for configuring sounds and pop-ups for Ticketing&Messaging. | | `ifAutoConvertVisitorToContact` | bool | Whether convert a visitor to contact automatically when agent replies ticket or not. | | `htmlSignature` | string | HTML signature. You can pass both plaintext and base64 encoded text. If the request containing plaintext is blocked by comm100 WAF, use base64 format. When using base64, add "data:text/plain;base64," before the content. | | `textSignature` | string | Plain text signature. You can pass both plaintext and base64 encoded text. If the request containing plaintext is blocked by comm100 WAF, use base64 format. When using base64, add "data:text/plain;base64," before the content. | | `tagSettings` | string | | ### Get a single Agent Preference `GET ticketing/agentPreferences/{id}` - #### Parameters: No Parameters - #### Response: [Agent Preference](/docs/server-api-ticketing-agent-preference#agent-preference-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/ticketing/agentPreferences/b13e222d-4832-4198-9f17-83e5612fa9da \ -X 'GET' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 200 OK ``` { "agentId": "b13e222d-4832-4198-9f17-83e5612fa9da", "ticketSettings": "[\n {\n \"id\": \"email-response\",\n \"name\": \"email-response\",\n \"soundId\": 9,\n \"ifMute\": false,\n \"volume\": 50,\n \"ifPop\": true\n },\n {\n \"id\": \"public-response\",\n \"name\": \"public-response\",\n \"soundId\": 9,\n \"ifMute\": false,\n \"volume\": 50,\n \"ifPop\": true\n },\n {\n \"id\": \"private-response\",\n \"name\": \"private-response\",\n \"soundId\": 9,\n \"ifMute\": false,\n \"volume\": 50,\n \"ifPop\": true\n }\n ]", "ifAutoConvertVisitorToContact": true, "htmlSignature": "data:text/plain;base64,PHA+MTExPC9wPg==", "textSignature": "data:text/plain;base64,MTEx", "tagSettings": "" } ``` ### Update the Agent Preference `PUT ticketing/agentPreferences/{id}` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `ticketSettings` | string | body | no | JSON data for configuring sounds and pop-ups for Ticketing&Messaging. | | `ifAutoConvertVisitorToContact` | bool | body | no | Whether convert a visitor to contact automatically when agent replies ticket or not. | | `htmlSignature` | string | body | no | HTML signature. You can pass both plaintext and base64 encoded text. If the request containing plaintext is blocked by comm100 WAF, use base64 format. When using base64, add "data:text/plain;base64," before the content. | | `textSignature` | string | body | no | Plain text signature. You can pass both plaintext and base64 encoded text. If the request containing plaintext is blocked by comm100 WAF, use base64 format. When using base64, add "data:text/plain;base64," before the content. | | `tagSettings` | string | body | no | | - #### Response: [Agent Preference](/docs/server-api-ticketing-agent-preference#agent-preference-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/ticketing/agentPreferences/b13e222d-4832-4198-9f17-83e5612fa9da \ -X 'PUT' \ -H 'Authorization: Bearer {access_token}' \ -H 'Content-Type: application/json' \ -D '{"ticketSettings":"[\n {\n \"id\": \"email-response\",\n \"name\": \"email-response\",\n \"soundId\": 9,\n \"ifMute\": false,\n \"volume\": 50,\n \"ifPop\": true\n },\n {\n \"id\": \"public-response\",\n \"name\": \"public-response\",\n \"soundId\": 9,\n \"ifMute\": false,\n \"volume\": 50,\n \"ifPop\": true\n },\n {\n \"id\": \"private-response\",\n \"name\": \"private-response\",\n \"soundId\": 9,\n \"ifMute\": false,\n \"volume\": 50,\n \"ifPop\": true\n }\n ]","ifAutoConvertVisitorToContact":true,"htmlSignature":"data:text/plain;base64,PHA+MTExPC9wPg==","textSignature":"data:text/plain;base64,MTEx","tagSettings":""}' ``` Response: HTTP/1.1 200 OK ``` { "agentId": "b13e222d-4832-4198-9f17-83e5612fa9da", "ticketSettings": "[\n {\n \"id\": \"email-response\",\n \"name\": \"email-response\",\n \"soundId\": 9,\n \"ifMute\": false,\n \"volume\": 50,\n \"ifPop\": true\n },\n {\n \"id\": \"public-response\",\n \"name\": \"public-response\",\n \"soundId\": 9,\n \"ifMute\": false,\n \"volume\": 50,\n \"ifPop\": true\n },\n {\n \"id\": \"private-response\",\n \"name\": \"private-response\",\n \"soundId\": 9,\n \"ifMute\": false,\n \"volume\": 50,\n \"ifPop\": true\n }\n ]", "ifAutoConvertVisitorToContact": true, "htmlSignature": "data:text/plain;base64,PHA+MTExPC9wPg==", "textSignature": "data:text/plain;base64,MTEx", "tagSettings": "" } ```