WhiteLabel API
Ticketing
Create Ticket
this api endpoint (post) (post) creates a ticket on behalf of a client if the request succeeds, it returns a ticket object docid\ vt2ibjporz4qfi9rsdme9 otherwise permissions clients view webhook event ticketing events (whitelabel) docid\ j6g94rtav5quxcabhjfrz body parameters title string the title of the ticket client id string the id of the client associated with the ticket description string a short description of the ticket category string the category id of the ticket subcategory string the subcategory of the ticket assets array of strings an object containing the ids of the assets associated with the ticket require "uri" require "json" require "net/http" url = uri("https //api tamio com/v2/whitelabel/tickets/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 "help with account", 	description "the client is having issues with the billing settings ", 	category "588fab92 773b 4cf7 b5b7 12dfac8a34e2", 	client id "3463a4ee 5eba 45cd 9ef9 3f3a0f64329e" } request body = data to json response = https request(request) puts response read bodycurl location request post 'https //api tamio com/v2/whitelabel/tickets/create' \\ \ header 'accept application/json' \\ \ header 'authorization bearer your token here' \\ \ data raw '{ "title" "help with account", "description" "the client is having issues with the billing settings ", "category" "588fab92 773b 4cf7 b5b7 12dfac8a34e2", "client id" "3463a4ee 5eba 45cd 9ef9 3f3a0f64329e" } 'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("authorization", "bearer your token here"); var data = { 	title "help with account", 	description "the client is having issues with the billing settings ", 	category "588fab92 773b 4cf7 b5b7 12dfac8a34e2", 	client id "3463a4ee 5eba 45cd 9ef9 3f3a0f64329e" }; var body = json stringify(data); var requestoptions = { method 'post', headers myheaders, body body }; fetch("https //api tamio com/v2/whitelabel/tickets/create", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));{ "status" 200, "ticket" { "id" "8dc1869d 0a0b 4c78 b40c 5b25bfa337eb", "title" "help with account", "is open" true, "object" "ticket", "created at" 1671462259, "updated at" 1671462259, "client" { "id" "3463a4ee 5eba 45cd 9ef9 3f3a0f64329e", "name" "james doe", "email" "client doe\@plugnpaid com" }, "teammate id" null, "replies" \[ { "id" "e6618a50 c0b6 49e9 8565 7b42e2027392", "text" "the client is having issues with the billing settings ", "is client reply" false, "created at" 1671462260, "assets" null }, { "id" "7dbc6406 3f5d 4c1e b3d6 88cbc464c8d7", "text" "thanks for contacting our support an agent will be with you shortly ", "is client reply" false, "created at" 1671462260, "assets" null } ], "category" "general support", "subcategory" null, "language" "en" } }