Create support ticket
curl --request POST \
--url https://demo.onlinebillingform.com/api/v2/ticket/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"subject": "<string>",
"user_id": 123,
"message": "<string>",
"support_department": "<string>",
"priority": "low",
"status": "open",
"assignee_by": 123
}
'import requests
url = "https://demo.onlinebillingform.com/api/v2/ticket/create"
payload = {
"subject": "<string>",
"user_id": 123,
"message": "<string>",
"support_department": "<string>",
"priority": "low",
"status": "open",
"assignee_by": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
subject: '<string>',
user_id: 123,
message: '<string>',
support_department: '<string>',
priority: 'low',
status: 'open',
assignee_by: 123
})
};
fetch('https://demo.onlinebillingform.com/api/v2/ticket/create', 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://demo.onlinebillingform.com/api/v2/ticket/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'subject' => '<string>',
'user_id' => 123,
'message' => '<string>',
'support_department' => '<string>',
'priority' => 'low',
'status' => 'open',
'assignee_by' => 123
]),
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://demo.onlinebillingform.com/api/v2/ticket/create"
payload := strings.NewReader("{\n \"subject\": \"<string>\",\n \"user_id\": 123,\n \"message\": \"<string>\",\n \"support_department\": \"<string>\",\n \"priority\": \"low\",\n \"status\": \"open\",\n \"assignee_by\": 123\n}")
req, _ := http.NewRequest("POST", 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.post("https://demo.onlinebillingform.com/api/v2/ticket/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"subject\": \"<string>\",\n \"user_id\": 123,\n \"message\": \"<string>\",\n \"support_department\": \"<string>\",\n \"priority\": \"low\",\n \"status\": \"open\",\n \"assignee_by\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://demo.onlinebillingform.com/api/v2/ticket/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"subject\": \"<string>\",\n \"user_id\": 123,\n \"message\": \"<string>\",\n \"support_department\": \"<string>\",\n \"priority\": \"low\",\n \"status\": \"open\",\n \"assignee_by\": 123\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"ticket": {
"id": 1,
"subject": "Cannot access my invoices",
"user_id": 42,
"assignee_by": null,
"status": "open",
"support_department": "Billing",
"priority": "low",
"last_action": "Created",
"messages": [
{
"id": 10,
"support_ticket_id": 1,
"replay_by": 5,
"message": "<p>Thanks for reaching out, we are looking into this.</p>"
}
]
}
}{
"success": false,
"errors": "Invalid API Key"
}{
"success": false,
"errors": "Insufficient permissions for this endpoint."
}{
"success": false,
"errors": {
"id": [
"The id field is required."
]
}
}Support
Create support ticket
POST
/
ticket
/
create
Create support ticket
curl --request POST \
--url https://demo.onlinebillingform.com/api/v2/ticket/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"subject": "<string>",
"user_id": 123,
"message": "<string>",
"support_department": "<string>",
"priority": "low",
"status": "open",
"assignee_by": 123
}
'import requests
url = "https://demo.onlinebillingform.com/api/v2/ticket/create"
payload = {
"subject": "<string>",
"user_id": 123,
"message": "<string>",
"support_department": "<string>",
"priority": "low",
"status": "open",
"assignee_by": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
subject: '<string>',
user_id: 123,
message: '<string>',
support_department: '<string>',
priority: 'low',
status: 'open',
assignee_by: 123
})
};
fetch('https://demo.onlinebillingform.com/api/v2/ticket/create', 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://demo.onlinebillingform.com/api/v2/ticket/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'subject' => '<string>',
'user_id' => 123,
'message' => '<string>',
'support_department' => '<string>',
'priority' => 'low',
'status' => 'open',
'assignee_by' => 123
]),
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://demo.onlinebillingform.com/api/v2/ticket/create"
payload := strings.NewReader("{\n \"subject\": \"<string>\",\n \"user_id\": 123,\n \"message\": \"<string>\",\n \"support_department\": \"<string>\",\n \"priority\": \"low\",\n \"status\": \"open\",\n \"assignee_by\": 123\n}")
req, _ := http.NewRequest("POST", 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.post("https://demo.onlinebillingform.com/api/v2/ticket/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"subject\": \"<string>\",\n \"user_id\": 123,\n \"message\": \"<string>\",\n \"support_department\": \"<string>\",\n \"priority\": \"low\",\n \"status\": \"open\",\n \"assignee_by\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://demo.onlinebillingform.com/api/v2/ticket/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"subject\": \"<string>\",\n \"user_id\": 123,\n \"message\": \"<string>\",\n \"support_department\": \"<string>\",\n \"priority\": \"low\",\n \"status\": \"open\",\n \"assignee_by\": 123\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"ticket": {
"id": 1,
"subject": "Cannot access my invoices",
"user_id": 42,
"assignee_by": null,
"status": "open",
"support_department": "Billing",
"priority": "low",
"last_action": "Created",
"messages": [
{
"id": 10,
"support_ticket_id": 1,
"replay_by": 5,
"message": "<p>Thanks for reaching out, we are looking into this.</p>"
}
]
}
}{
"success": false,
"errors": "Invalid API Key"
}{
"success": false,
"errors": "Insufficient permissions for this endpoint."
}{
"success": false,
"errors": {
"id": [
"The id field is required."
]
}
}Authorizations
Use Authorization: Bearer <live_api_key>.
Body
application/json
Ticket subject. Letters, numbers, spaces, and basic punctuation only.
ID of the customer the ticket belongs to.
Initial ticket message. Standard rich text formatting is allowed; emojis and unsupported HTML tags are rejected.
Support department the ticket is filed under. Required when departments are configured.
Available options:
low, medium, high, emergency Available options:
open, pending, close, awaiting_reply Staff user ID to assign the ticket to.
Response
OK
⌘I