WhiteLabel API
Ticketing
Create Ticket Category
this api endpoint (post) (post) creates a ticket category if the request succeeds, it returns a ticket category object docid\ iirlfdoodrfywg6u0jwxc body parameters title string the title of the category auto reply string text that will be used as an automated response when a ticket is created for this category language string ( appendix docid\ kfbmx4q3dxjtduqf75yx1 ) the language of the ticket teammate id string the id of a teammate associated with this category when provided, any tickets created will be automatically assigned to the teammate billing plans array of strings an array of billing plans to associated with this category when provided, only clients that have purchased any of the billing plans will be able to open a ticket in this category subcategory array of strings the titles of any subcategories that you want to associate with this category when provided, clients can choose one of the subcategories when creating a ticket require "uri" require "json" require "net/http" url = uri("https //api tamio com/v2/whitelabel/ticket categories/create") https = net http new(url host, url port) https use ssl = true request = net http post new(url) request\["accept"] = "application/json" request\["authorization"] = "bearer your token here" data = { 	title "premium support", 	language "en", 	auto reply "thank you for contacting our premium support an agent will reply to your ticket within 48 hours ", 	subcategories \[ 	 "technical support", "account inquiries" 	] } request body = data to json response = https request(request) puts response read bodycurl location request post 'https //api tamio com/v2/whitelabel/ticket categories/create' \\ \ header 'accept application/json' \\ \ header 'authorization bearer your token here' \\ \ data raw '{ "title" "premium support", "language" "en", "auto reply" "thank you for contacting our premium support an agent will reply to your ticket within 48 hours ", "subcategories" \[ "technical support", "account inquiries" ]}'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("authorization", "bearer your token here"); var data = { 	title "premium support", 	language "en", 	auto reply "thank you for contacting our premium support an agent will reply to your ticket within 48 hours ", 	subcategories \[ 	 "technical support", "account inquiries" 	] }; var body = json stringify(data); var requestoptions = { method 'post', headers myheaders, body body }; fetch("https //api tamio com/v2/whitelabel/ticket categories/create", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));{ "status" 200, "ticket category" { "id" "eda4d840 e22a 407c 8352 2729cae98870", "title" "premium support", "object" "ticket category", "created at" 1671452578, "language" "en", "subcategories" \[ "technical support", "account inquiries" ], "teammate id" null, "billing plans" null, "auto reply" "thank you for contacting our premium support an agent will reply to your ticket within 48 hours " } }