Update ticket template
curl --request PATCH \
--url https://app.msportal.ai/api/public/v1/ticket-templates/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "<string>",
"aiDescription": "<string>",
"category": "<string>",
"categoryId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"icon": "<string>",
"defaultPriority": "<string>",
"defaultBoard": "<string>",
"defaultStatus": "<string>",
"defaultTicketTypeId": "<string>",
"defaultTicketSubtypeId": "<string>",
"defaultTicketCategoryId": "<string>",
"defaultAutotaskWorkTypeId": "<string>",
"defaultAutotaskSourceId": "<string>",
"haloCategoryId": "<string>",
"haloImpactId": "<string>",
"haloUrgencyId": "<string>",
"useClientPsaDefaults": true,
"staticSubject": "<string>",
"lockSubject": true,
"priorityOverride": {
"enabled": true,
"rules": [
{
"overridePriorityId": "<string>",
"condition": {
"when": "<string>",
"value": null
}
}
]
},
"flowWebhook": {
"enabled": true,
"url": "",
"secret": "<string>",
"integrationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"rules": [
{
"name": "<string>",
"action": {
"payload": null
},
"condition": null
}
],
"name": "<string>",
"isActive": true,
"defaultCompanyEnabled": true,
"sections": [
{
"title": "<string>",
"fields": [
{
"label": "<string>",
"key": "<string>",
"placeholder": "<string>",
"helpText": "<string>",
"required": "never",
"defaultValue": null,
"options": [
{
"value": "<string>",
"label": "<string>"
}
],
"validation": {},
"conditional": {
"when": "<string>",
"value": null,
"then": {
"required": true,
"show": true,
"setDefault": null
}
},
"embeddedTemplateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"description": "<string>"
}
],
"expectedUpdatedAt": "<string>"
}
'import requests
url = "https://app.msportal.ai/api/public/v1/ticket-templates/{id}"
payload = {
"description": "<string>",
"aiDescription": "<string>",
"category": "<string>",
"categoryId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"icon": "<string>",
"defaultPriority": "<string>",
"defaultBoard": "<string>",
"defaultStatus": "<string>",
"defaultTicketTypeId": "<string>",
"defaultTicketSubtypeId": "<string>",
"defaultTicketCategoryId": "<string>",
"defaultAutotaskWorkTypeId": "<string>",
"defaultAutotaskSourceId": "<string>",
"haloCategoryId": "<string>",
"haloImpactId": "<string>",
"haloUrgencyId": "<string>",
"useClientPsaDefaults": True,
"staticSubject": "<string>",
"lockSubject": True,
"priorityOverride": {
"enabled": True,
"rules": [
{
"overridePriorityId": "<string>",
"condition": {
"when": "<string>",
"value": None
}
}
]
},
"flowWebhook": {
"enabled": True,
"url": "",
"secret": "<string>",
"integrationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"rules": [
{
"name": "<string>",
"action": { "payload": None },
"condition": None
}
],
"name": "<string>",
"isActive": True,
"defaultCompanyEnabled": True,
"sections": [
{
"title": "<string>",
"fields": [
{
"label": "<string>",
"key": "<string>",
"placeholder": "<string>",
"helpText": "<string>",
"required": "never",
"defaultValue": None,
"options": [
{
"value": "<string>",
"label": "<string>"
}
],
"validation": {},
"conditional": {
"when": "<string>",
"value": None,
"then": {
"required": True,
"show": True,
"setDefault": None
}
},
"embeddedTemplateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"description": "<string>"
}
],
"expectedUpdatedAt": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
description: '<string>',
aiDescription: '<string>',
category: '<string>',
categoryId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
icon: '<string>',
defaultPriority: '<string>',
defaultBoard: '<string>',
defaultStatus: '<string>',
defaultTicketTypeId: '<string>',
defaultTicketSubtypeId: '<string>',
defaultTicketCategoryId: '<string>',
defaultAutotaskWorkTypeId: '<string>',
defaultAutotaskSourceId: '<string>',
haloCategoryId: '<string>',
haloImpactId: '<string>',
haloUrgencyId: '<string>',
useClientPsaDefaults: true,
staticSubject: '<string>',
lockSubject: true,
priorityOverride: {
enabled: true,
rules: [{overridePriorityId: '<string>', condition: {when: '<string>', value: null}}]
},
flowWebhook: {
enabled: true,
url: '',
secret: '<string>',
integrationId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
},
rules: [{name: '<string>', action: {payload: null}, condition: null}],
name: '<string>',
isActive: true,
defaultCompanyEnabled: true,
sections: [
{
title: '<string>',
fields: [
{
label: '<string>',
key: '<string>',
placeholder: '<string>',
helpText: '<string>',
required: 'never',
defaultValue: null,
options: [{value: '<string>', label: '<string>'}],
validation: {},
conditional: {
when: '<string>',
value: null,
then: {required: true, show: true, setDefault: null}
},
embeddedTemplateId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
],
description: '<string>'
}
],
expectedUpdatedAt: '<string>'
})
};
fetch('https://app.msportal.ai/api/public/v1/ticket-templates/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.msportal.ai/api/public/v1/ticket-templates/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'description' => '<string>',
'aiDescription' => '<string>',
'category' => '<string>',
'categoryId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'icon' => '<string>',
'defaultPriority' => '<string>',
'defaultBoard' => '<string>',
'defaultStatus' => '<string>',
'defaultTicketTypeId' => '<string>',
'defaultTicketSubtypeId' => '<string>',
'defaultTicketCategoryId' => '<string>',
'defaultAutotaskWorkTypeId' => '<string>',
'defaultAutotaskSourceId' => '<string>',
'haloCategoryId' => '<string>',
'haloImpactId' => '<string>',
'haloUrgencyId' => '<string>',
'useClientPsaDefaults' => true,
'staticSubject' => '<string>',
'lockSubject' => true,
'priorityOverride' => [
'enabled' => true,
'rules' => [
[
'overridePriorityId' => '<string>',
'condition' => [
'when' => '<string>',
'value' => null
]
]
]
],
'flowWebhook' => [
'enabled' => true,
'url' => '',
'secret' => '<string>',
'integrationId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'rules' => [
[
'name' => '<string>',
'action' => [
'payload' => null
],
'condition' => null
]
],
'name' => '<string>',
'isActive' => true,
'defaultCompanyEnabled' => true,
'sections' => [
[
'title' => '<string>',
'fields' => [
[
'label' => '<string>',
'key' => '<string>',
'placeholder' => '<string>',
'helpText' => '<string>',
'required' => 'never',
'defaultValue' => null,
'options' => [
[
'value' => '<string>',
'label' => '<string>'
]
],
'validation' => [
],
'conditional' => [
'when' => '<string>',
'value' => null,
'then' => [
'required' => true,
'show' => true,
'setDefault' => null
]
],
'embeddedTemplateId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'description' => '<string>'
]
],
'expectedUpdatedAt' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.msportal.ai/api/public/v1/ticket-templates/{id}"
payload := strings.NewReader("{\n \"description\": \"<string>\",\n \"aiDescription\": \"<string>\",\n \"category\": \"<string>\",\n \"categoryId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"icon\": \"<string>\",\n \"defaultPriority\": \"<string>\",\n \"defaultBoard\": \"<string>\",\n \"defaultStatus\": \"<string>\",\n \"defaultTicketTypeId\": \"<string>\",\n \"defaultTicketSubtypeId\": \"<string>\",\n \"defaultTicketCategoryId\": \"<string>\",\n \"defaultAutotaskWorkTypeId\": \"<string>\",\n \"defaultAutotaskSourceId\": \"<string>\",\n \"haloCategoryId\": \"<string>\",\n \"haloImpactId\": \"<string>\",\n \"haloUrgencyId\": \"<string>\",\n \"useClientPsaDefaults\": true,\n \"staticSubject\": \"<string>\",\n \"lockSubject\": true,\n \"priorityOverride\": {\n \"enabled\": true,\n \"rules\": [\n {\n \"overridePriorityId\": \"<string>\",\n \"condition\": {\n \"when\": \"<string>\",\n \"value\": null\n }\n }\n ]\n },\n \"flowWebhook\": {\n \"enabled\": true,\n \"url\": \"\",\n \"secret\": \"<string>\",\n \"integrationId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"rules\": [\n {\n \"name\": \"<string>\",\n \"action\": {\n \"payload\": null\n },\n \"condition\": null\n }\n ],\n \"name\": \"<string>\",\n \"isActive\": true,\n \"defaultCompanyEnabled\": true,\n \"sections\": [\n {\n \"title\": \"<string>\",\n \"fields\": [\n {\n \"label\": \"<string>\",\n \"key\": \"<string>\",\n \"placeholder\": \"<string>\",\n \"helpText\": \"<string>\",\n \"required\": \"never\",\n \"defaultValue\": null,\n \"options\": [\n {\n \"value\": \"<string>\",\n \"label\": \"<string>\"\n }\n ],\n \"validation\": {},\n \"conditional\": {\n \"when\": \"<string>\",\n \"value\": null,\n \"then\": {\n \"required\": true,\n \"show\": true,\n \"setDefault\": null\n }\n },\n \"embeddedTemplateId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"description\": \"<string>\"\n }\n ],\n \"expectedUpdatedAt\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://app.msportal.ai/api/public/v1/ticket-templates/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"<string>\",\n \"aiDescription\": \"<string>\",\n \"category\": \"<string>\",\n \"categoryId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"icon\": \"<string>\",\n \"defaultPriority\": \"<string>\",\n \"defaultBoard\": \"<string>\",\n \"defaultStatus\": \"<string>\",\n \"defaultTicketTypeId\": \"<string>\",\n \"defaultTicketSubtypeId\": \"<string>\",\n \"defaultTicketCategoryId\": \"<string>\",\n \"defaultAutotaskWorkTypeId\": \"<string>\",\n \"defaultAutotaskSourceId\": \"<string>\",\n \"haloCategoryId\": \"<string>\",\n \"haloImpactId\": \"<string>\",\n \"haloUrgencyId\": \"<string>\",\n \"useClientPsaDefaults\": true,\n \"staticSubject\": \"<string>\",\n \"lockSubject\": true,\n \"priorityOverride\": {\n \"enabled\": true,\n \"rules\": [\n {\n \"overridePriorityId\": \"<string>\",\n \"condition\": {\n \"when\": \"<string>\",\n \"value\": null\n }\n }\n ]\n },\n \"flowWebhook\": {\n \"enabled\": true,\n \"url\": \"\",\n \"secret\": \"<string>\",\n \"integrationId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"rules\": [\n {\n \"name\": \"<string>\",\n \"action\": {\n \"payload\": null\n },\n \"condition\": null\n }\n ],\n \"name\": \"<string>\",\n \"isActive\": true,\n \"defaultCompanyEnabled\": true,\n \"sections\": [\n {\n \"title\": \"<string>\",\n \"fields\": [\n {\n \"label\": \"<string>\",\n \"key\": \"<string>\",\n \"placeholder\": \"<string>\",\n \"helpText\": \"<string>\",\n \"required\": \"never\",\n \"defaultValue\": null,\n \"options\": [\n {\n \"value\": \"<string>\",\n \"label\": \"<string>\"\n }\n ],\n \"validation\": {},\n \"conditional\": {\n \"when\": \"<string>\",\n \"value\": null,\n \"then\": {\n \"required\": true,\n \"show\": true,\n \"setDefault\": null\n }\n },\n \"embeddedTemplateId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"description\": \"<string>\"\n }\n ],\n \"expectedUpdatedAt\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.msportal.ai/api/public/v1/ticket-templates/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"<string>\",\n \"aiDescription\": \"<string>\",\n \"category\": \"<string>\",\n \"categoryId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"icon\": \"<string>\",\n \"defaultPriority\": \"<string>\",\n \"defaultBoard\": \"<string>\",\n \"defaultStatus\": \"<string>\",\n \"defaultTicketTypeId\": \"<string>\",\n \"defaultTicketSubtypeId\": \"<string>\",\n \"defaultTicketCategoryId\": \"<string>\",\n \"defaultAutotaskWorkTypeId\": \"<string>\",\n \"defaultAutotaskSourceId\": \"<string>\",\n \"haloCategoryId\": \"<string>\",\n \"haloImpactId\": \"<string>\",\n \"haloUrgencyId\": \"<string>\",\n \"useClientPsaDefaults\": true,\n \"staticSubject\": \"<string>\",\n \"lockSubject\": true,\n \"priorityOverride\": {\n \"enabled\": true,\n \"rules\": [\n {\n \"overridePriorityId\": \"<string>\",\n \"condition\": {\n \"when\": \"<string>\",\n \"value\": null\n }\n }\n ]\n },\n \"flowWebhook\": {\n \"enabled\": true,\n \"url\": \"\",\n \"secret\": \"<string>\",\n \"integrationId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"rules\": [\n {\n \"name\": \"<string>\",\n \"action\": {\n \"payload\": null\n },\n \"condition\": null\n }\n ],\n \"name\": \"<string>\",\n \"isActive\": true,\n \"defaultCompanyEnabled\": true,\n \"sections\": [\n {\n \"title\": \"<string>\",\n \"fields\": [\n {\n \"label\": \"<string>\",\n \"key\": \"<string>\",\n \"placeholder\": \"<string>\",\n \"helpText\": \"<string>\",\n \"required\": \"never\",\n \"defaultValue\": null,\n \"options\": [\n {\n \"value\": \"<string>\",\n \"label\": \"<string>\"\n }\n ],\n \"validation\": {},\n \"conditional\": {\n \"when\": \"<string>\",\n \"value\": null,\n \"then\": {\n \"required\": true,\n \"show\": true,\n \"setDefault\": null\n }\n },\n \"embeddedTemplateId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"description\": \"<string>\"\n }\n ],\n \"expectedUpdatedAt\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"templateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"key": "<string>",
"sectionCount": 123,
"fieldCount": 123,
"isActive": true
}
}{
"error": "<string>",
"requestId": "<string>",
"details": "<unknown>",
"code": "<string>"
}{
"error": "<string>",
"requestId": "<string>",
"details": "<unknown>",
"code": "<string>"
}{
"error": "<string>",
"requestId": "<string>",
"details": "<unknown>",
"code": "<string>"
}{
"error": "<string>",
"requestId": "<string>",
"details": "<unknown>",
"code": "<string>"
}{
"error": "<string>",
"requestId": "<string>",
"details": "<unknown>",
"code": "<string>"
}Ticket Templates
Update ticket template
Change a template’s settings, sections or rules. Requires templates.write. MSP staff only. Settings > Tickets gates every endpoint: Read lists and reads, Write creates and changes, Manage deletes.
PATCH
/
api
/
public
/
v1
/
ticket-templates
/
{id}
Update ticket template
curl --request PATCH \
--url https://app.msportal.ai/api/public/v1/ticket-templates/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "<string>",
"aiDescription": "<string>",
"category": "<string>",
"categoryId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"icon": "<string>",
"defaultPriority": "<string>",
"defaultBoard": "<string>",
"defaultStatus": "<string>",
"defaultTicketTypeId": "<string>",
"defaultTicketSubtypeId": "<string>",
"defaultTicketCategoryId": "<string>",
"defaultAutotaskWorkTypeId": "<string>",
"defaultAutotaskSourceId": "<string>",
"haloCategoryId": "<string>",
"haloImpactId": "<string>",
"haloUrgencyId": "<string>",
"useClientPsaDefaults": true,
"staticSubject": "<string>",
"lockSubject": true,
"priorityOverride": {
"enabled": true,
"rules": [
{
"overridePriorityId": "<string>",
"condition": {
"when": "<string>",
"value": null
}
}
]
},
"flowWebhook": {
"enabled": true,
"url": "",
"secret": "<string>",
"integrationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"rules": [
{
"name": "<string>",
"action": {
"payload": null
},
"condition": null
}
],
"name": "<string>",
"isActive": true,
"defaultCompanyEnabled": true,
"sections": [
{
"title": "<string>",
"fields": [
{
"label": "<string>",
"key": "<string>",
"placeholder": "<string>",
"helpText": "<string>",
"required": "never",
"defaultValue": null,
"options": [
{
"value": "<string>",
"label": "<string>"
}
],
"validation": {},
"conditional": {
"when": "<string>",
"value": null,
"then": {
"required": true,
"show": true,
"setDefault": null
}
},
"embeddedTemplateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"description": "<string>"
}
],
"expectedUpdatedAt": "<string>"
}
'import requests
url = "https://app.msportal.ai/api/public/v1/ticket-templates/{id}"
payload = {
"description": "<string>",
"aiDescription": "<string>",
"category": "<string>",
"categoryId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"icon": "<string>",
"defaultPriority": "<string>",
"defaultBoard": "<string>",
"defaultStatus": "<string>",
"defaultTicketTypeId": "<string>",
"defaultTicketSubtypeId": "<string>",
"defaultTicketCategoryId": "<string>",
"defaultAutotaskWorkTypeId": "<string>",
"defaultAutotaskSourceId": "<string>",
"haloCategoryId": "<string>",
"haloImpactId": "<string>",
"haloUrgencyId": "<string>",
"useClientPsaDefaults": True,
"staticSubject": "<string>",
"lockSubject": True,
"priorityOverride": {
"enabled": True,
"rules": [
{
"overridePriorityId": "<string>",
"condition": {
"when": "<string>",
"value": None
}
}
]
},
"flowWebhook": {
"enabled": True,
"url": "",
"secret": "<string>",
"integrationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"rules": [
{
"name": "<string>",
"action": { "payload": None },
"condition": None
}
],
"name": "<string>",
"isActive": True,
"defaultCompanyEnabled": True,
"sections": [
{
"title": "<string>",
"fields": [
{
"label": "<string>",
"key": "<string>",
"placeholder": "<string>",
"helpText": "<string>",
"required": "never",
"defaultValue": None,
"options": [
{
"value": "<string>",
"label": "<string>"
}
],
"validation": {},
"conditional": {
"when": "<string>",
"value": None,
"then": {
"required": True,
"show": True,
"setDefault": None
}
},
"embeddedTemplateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"description": "<string>"
}
],
"expectedUpdatedAt": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
description: '<string>',
aiDescription: '<string>',
category: '<string>',
categoryId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
icon: '<string>',
defaultPriority: '<string>',
defaultBoard: '<string>',
defaultStatus: '<string>',
defaultTicketTypeId: '<string>',
defaultTicketSubtypeId: '<string>',
defaultTicketCategoryId: '<string>',
defaultAutotaskWorkTypeId: '<string>',
defaultAutotaskSourceId: '<string>',
haloCategoryId: '<string>',
haloImpactId: '<string>',
haloUrgencyId: '<string>',
useClientPsaDefaults: true,
staticSubject: '<string>',
lockSubject: true,
priorityOverride: {
enabled: true,
rules: [{overridePriorityId: '<string>', condition: {when: '<string>', value: null}}]
},
flowWebhook: {
enabled: true,
url: '',
secret: '<string>',
integrationId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
},
rules: [{name: '<string>', action: {payload: null}, condition: null}],
name: '<string>',
isActive: true,
defaultCompanyEnabled: true,
sections: [
{
title: '<string>',
fields: [
{
label: '<string>',
key: '<string>',
placeholder: '<string>',
helpText: '<string>',
required: 'never',
defaultValue: null,
options: [{value: '<string>', label: '<string>'}],
validation: {},
conditional: {
when: '<string>',
value: null,
then: {required: true, show: true, setDefault: null}
},
embeddedTemplateId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
],
description: '<string>'
}
],
expectedUpdatedAt: '<string>'
})
};
fetch('https://app.msportal.ai/api/public/v1/ticket-templates/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.msportal.ai/api/public/v1/ticket-templates/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'description' => '<string>',
'aiDescription' => '<string>',
'category' => '<string>',
'categoryId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'icon' => '<string>',
'defaultPriority' => '<string>',
'defaultBoard' => '<string>',
'defaultStatus' => '<string>',
'defaultTicketTypeId' => '<string>',
'defaultTicketSubtypeId' => '<string>',
'defaultTicketCategoryId' => '<string>',
'defaultAutotaskWorkTypeId' => '<string>',
'defaultAutotaskSourceId' => '<string>',
'haloCategoryId' => '<string>',
'haloImpactId' => '<string>',
'haloUrgencyId' => '<string>',
'useClientPsaDefaults' => true,
'staticSubject' => '<string>',
'lockSubject' => true,
'priorityOverride' => [
'enabled' => true,
'rules' => [
[
'overridePriorityId' => '<string>',
'condition' => [
'when' => '<string>',
'value' => null
]
]
]
],
'flowWebhook' => [
'enabled' => true,
'url' => '',
'secret' => '<string>',
'integrationId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'rules' => [
[
'name' => '<string>',
'action' => [
'payload' => null
],
'condition' => null
]
],
'name' => '<string>',
'isActive' => true,
'defaultCompanyEnabled' => true,
'sections' => [
[
'title' => '<string>',
'fields' => [
[
'label' => '<string>',
'key' => '<string>',
'placeholder' => '<string>',
'helpText' => '<string>',
'required' => 'never',
'defaultValue' => null,
'options' => [
[
'value' => '<string>',
'label' => '<string>'
]
],
'validation' => [
],
'conditional' => [
'when' => '<string>',
'value' => null,
'then' => [
'required' => true,
'show' => true,
'setDefault' => null
]
],
'embeddedTemplateId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'description' => '<string>'
]
],
'expectedUpdatedAt' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.msportal.ai/api/public/v1/ticket-templates/{id}"
payload := strings.NewReader("{\n \"description\": \"<string>\",\n \"aiDescription\": \"<string>\",\n \"category\": \"<string>\",\n \"categoryId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"icon\": \"<string>\",\n \"defaultPriority\": \"<string>\",\n \"defaultBoard\": \"<string>\",\n \"defaultStatus\": \"<string>\",\n \"defaultTicketTypeId\": \"<string>\",\n \"defaultTicketSubtypeId\": \"<string>\",\n \"defaultTicketCategoryId\": \"<string>\",\n \"defaultAutotaskWorkTypeId\": \"<string>\",\n \"defaultAutotaskSourceId\": \"<string>\",\n \"haloCategoryId\": \"<string>\",\n \"haloImpactId\": \"<string>\",\n \"haloUrgencyId\": \"<string>\",\n \"useClientPsaDefaults\": true,\n \"staticSubject\": \"<string>\",\n \"lockSubject\": true,\n \"priorityOverride\": {\n \"enabled\": true,\n \"rules\": [\n {\n \"overridePriorityId\": \"<string>\",\n \"condition\": {\n \"when\": \"<string>\",\n \"value\": null\n }\n }\n ]\n },\n \"flowWebhook\": {\n \"enabled\": true,\n \"url\": \"\",\n \"secret\": \"<string>\",\n \"integrationId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"rules\": [\n {\n \"name\": \"<string>\",\n \"action\": {\n \"payload\": null\n },\n \"condition\": null\n }\n ],\n \"name\": \"<string>\",\n \"isActive\": true,\n \"defaultCompanyEnabled\": true,\n \"sections\": [\n {\n \"title\": \"<string>\",\n \"fields\": [\n {\n \"label\": \"<string>\",\n \"key\": \"<string>\",\n \"placeholder\": \"<string>\",\n \"helpText\": \"<string>\",\n \"required\": \"never\",\n \"defaultValue\": null,\n \"options\": [\n {\n \"value\": \"<string>\",\n \"label\": \"<string>\"\n }\n ],\n \"validation\": {},\n \"conditional\": {\n \"when\": \"<string>\",\n \"value\": null,\n \"then\": {\n \"required\": true,\n \"show\": true,\n \"setDefault\": null\n }\n },\n \"embeddedTemplateId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"description\": \"<string>\"\n }\n ],\n \"expectedUpdatedAt\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://app.msportal.ai/api/public/v1/ticket-templates/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"<string>\",\n \"aiDescription\": \"<string>\",\n \"category\": \"<string>\",\n \"categoryId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"icon\": \"<string>\",\n \"defaultPriority\": \"<string>\",\n \"defaultBoard\": \"<string>\",\n \"defaultStatus\": \"<string>\",\n \"defaultTicketTypeId\": \"<string>\",\n \"defaultTicketSubtypeId\": \"<string>\",\n \"defaultTicketCategoryId\": \"<string>\",\n \"defaultAutotaskWorkTypeId\": \"<string>\",\n \"defaultAutotaskSourceId\": \"<string>\",\n \"haloCategoryId\": \"<string>\",\n \"haloImpactId\": \"<string>\",\n \"haloUrgencyId\": \"<string>\",\n \"useClientPsaDefaults\": true,\n \"staticSubject\": \"<string>\",\n \"lockSubject\": true,\n \"priorityOverride\": {\n \"enabled\": true,\n \"rules\": [\n {\n \"overridePriorityId\": \"<string>\",\n \"condition\": {\n \"when\": \"<string>\",\n \"value\": null\n }\n }\n ]\n },\n \"flowWebhook\": {\n \"enabled\": true,\n \"url\": \"\",\n \"secret\": \"<string>\",\n \"integrationId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"rules\": [\n {\n \"name\": \"<string>\",\n \"action\": {\n \"payload\": null\n },\n \"condition\": null\n }\n ],\n \"name\": \"<string>\",\n \"isActive\": true,\n \"defaultCompanyEnabled\": true,\n \"sections\": [\n {\n \"title\": \"<string>\",\n \"fields\": [\n {\n \"label\": \"<string>\",\n \"key\": \"<string>\",\n \"placeholder\": \"<string>\",\n \"helpText\": \"<string>\",\n \"required\": \"never\",\n \"defaultValue\": null,\n \"options\": [\n {\n \"value\": \"<string>\",\n \"label\": \"<string>\"\n }\n ],\n \"validation\": {},\n \"conditional\": {\n \"when\": \"<string>\",\n \"value\": null,\n \"then\": {\n \"required\": true,\n \"show\": true,\n \"setDefault\": null\n }\n },\n \"embeddedTemplateId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"description\": \"<string>\"\n }\n ],\n \"expectedUpdatedAt\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.msportal.ai/api/public/v1/ticket-templates/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"<string>\",\n \"aiDescription\": \"<string>\",\n \"category\": \"<string>\",\n \"categoryId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"icon\": \"<string>\",\n \"defaultPriority\": \"<string>\",\n \"defaultBoard\": \"<string>\",\n \"defaultStatus\": \"<string>\",\n \"defaultTicketTypeId\": \"<string>\",\n \"defaultTicketSubtypeId\": \"<string>\",\n \"defaultTicketCategoryId\": \"<string>\",\n \"defaultAutotaskWorkTypeId\": \"<string>\",\n \"defaultAutotaskSourceId\": \"<string>\",\n \"haloCategoryId\": \"<string>\",\n \"haloImpactId\": \"<string>\",\n \"haloUrgencyId\": \"<string>\",\n \"useClientPsaDefaults\": true,\n \"staticSubject\": \"<string>\",\n \"lockSubject\": true,\n \"priorityOverride\": {\n \"enabled\": true,\n \"rules\": [\n {\n \"overridePriorityId\": \"<string>\",\n \"condition\": {\n \"when\": \"<string>\",\n \"value\": null\n }\n }\n ]\n },\n \"flowWebhook\": {\n \"enabled\": true,\n \"url\": \"\",\n \"secret\": \"<string>\",\n \"integrationId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"rules\": [\n {\n \"name\": \"<string>\",\n \"action\": {\n \"payload\": null\n },\n \"condition\": null\n }\n ],\n \"name\": \"<string>\",\n \"isActive\": true,\n \"defaultCompanyEnabled\": true,\n \"sections\": [\n {\n \"title\": \"<string>\",\n \"fields\": [\n {\n \"label\": \"<string>\",\n \"key\": \"<string>\",\n \"placeholder\": \"<string>\",\n \"helpText\": \"<string>\",\n \"required\": \"never\",\n \"defaultValue\": null,\n \"options\": [\n {\n \"value\": \"<string>\",\n \"label\": \"<string>\"\n }\n ],\n \"validation\": {},\n \"conditional\": {\n \"when\": \"<string>\",\n \"value\": null,\n \"then\": {\n \"required\": true,\n \"show\": true,\n \"setDefault\": null\n }\n },\n \"embeddedTemplateId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"description\": \"<string>\"\n }\n ],\n \"expectedUpdatedAt\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"templateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"key": "<string>",
"sectionCount": 123,
"fieldCount": 123,
"isActive": true
}
}{
"error": "<string>",
"requestId": "<string>",
"details": "<unknown>",
"code": "<string>"
}{
"error": "<string>",
"requestId": "<string>",
"details": "<unknown>",
"code": "<string>"
}{
"error": "<string>",
"requestId": "<string>",
"details": "<unknown>",
"code": "<string>"
}{
"error": "<string>",
"requestId": "<string>",
"details": "<unknown>",
"code": "<string>"
}{
"error": "<string>",
"requestId": "<string>",
"details": "<unknown>",
"code": "<string>"
}Authorizations
Body
application/json
Omitted fields keep their stored values; the key cannot change. sections and rules replace the whole list when given: send each existing field's key to keep the answers and settings tied to it, and expectedUpdatedAt (the updatedAt from GET), which is required with them. The Flow webhook stays as stored unless flowWebhook is given.
Was this page helpful?