Skip to main content

Create a ticket

Create a new ticket.

Paramaters​

title - required​

Title of ticket.

description - optional​

Additional information for ticket.

status - required​

The flow or column to add the ticket to.

notify - required​

True(1) or false(0). If true, you may specify email or phone numbers to notify of creation and movement of ticket.

Notify requirements
If notify = 1 the following are also required

time - optional.
Specify a specific time to send notification of ticket creation.

type - required.
Can be email or sms.

contacts - required.
- If type = email send a concated string of email contacts seperated by a ,. E.g. example@example.com,example1@example.com
- If type = sms send a concated string of phone numbers contacts seperated by a ,. E.g. 1112223333,4445556666

notifySubject - optional.
Subject of message to be sent.

notifyMessage - optional.
Body of message to be sent.

automated - required​

True(1) or false(0). If true, involved partied specified in notify will be notified if a ticket remains in a flow longer than a specified length of time.

Code Example​

POST - https://api.particlespace.com/api/v1/ticket/new
var axios = require('axios');
var qs = require('qs');
const BEARER_TOKEN = 'SET_ME';
var data = qs.stringify({
'title': 'Leaking faucet',
'description': 'Leak under the kitchen sink in 1A needs repair.',
'status': 'NEW',
'notify': 1,
'time': '',
'type': 'sms',
'contacts': '1112223333',
'automated': 0
});
var config = {
method: 'post',
url: 'https://api.particlespace.com/api/v1/ticket/new',
headers: {
'Authorization': 'Bearer ' + BEARER_TOKEN
},
data : data
};

axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});